Cardiff School of Computer Science and Informatics
Coursework Assessment Pro-forma
Module Code: CMT304
Module Title: Cybersecurity Operations
Lecturer: Philipp Reinecke
Assessment Title: Part 3: Scripting, Filters, Regular Expressions, Genetic Programming,
Assessment Number: 3 of 4
Date Set: 22 March 2021
Submission Date and Time: 24 May 2021 at 9.30am
Return Date: 14 June 2021
This assignment is worth 25% of the total marks available for this module. If coursework is
submitted late (and where there are no extenuating circumstances):
1 If the assessment is submitted no later than 24 hours after the deadline,
the mark for the assessment will be capped at the minimum pass mark;
2 If the assessment is submitted more than 24 hours after the deadline, a
mark of 0 will be given for the assessment.
Your submission must include the official Coursework Submission Cover sheet, which can be
Upload the following files in a single ZIP file:
|Cover sheet||Compulsory||One PDF (.pdf) file||[student_number].pdf|
|Task 1||Compulsory||Perl script file||task1.pl|
|Task 2||Compulsory||One PDF file||task2.pdf|
It is your responsibility to check that your submissions have been received successfully
before the deadline. Upon successful submission, you should receive a confirmation e-mail
from the system. If there are any difficulties with the submission process, you MUST e-mail
the assessment setter Philipp Reinecke ([email protected]) before the deadline.
Include your submission in the e-mail and use the following subject line in your e-mail:
“CMT304 2020/2021 Coursework Submission Problems”.
Any deviation from the submission instructions above (including the number and types of
files submitted) will result in a mark of zero for the assessment.
Staff reserve the right to invite students to a meeting to discuss coursework submissions
This is an individual assignment. Therefore,
DO NOT collaborate with other students.
DO NOT use solutions by other students.
DO NOT give other students access to your solution.
Your submissions will be checked for plagiarism and collusion. Your work must be your
own and you must independently solve the problem and submit your own solution.
Any material or sources of information you use must be referenced. Code and text you
submit will be compared with other submissions and various other sources on and off the
Internet. Any substantial similarities of your submission to unreferenced work or material
not created by yourself will be subject to Academic Misconduct procedures. If you are
found guilty, consequences may include a mark of zero for the coursework as well as
Marks will only be assigned for work you have done yourself (incl. finding and discussing
material from references, but not the referenced work; there are no marks for code
copied from elsewhere, but for either writing your own code or integrating and adapting
code that you have not written).
If you are in doubt whether you may be committing academic misconduct, please check the
University’s guidelines on referencing and contact your personal tutor and/or the assessment
This is assignment three of a portfolio that will be composed of four assignments. Each of
the four assignments is worth 25%, summing up to 100% of the total marks available for this
Assume the following scenario: A cyberattack on a web server has happened. The attackers
stole some files from the server. Your task is to identify and extract the files which have
been downloaded. You are given the following:
(a) A web server access log file where each line has the following format:
(b) A list of IP addresses.
(c) The name of a directory containing files and directories.
(d) The name of an output directory.
Write a Perl script that:
(a) Can be called as follows:
(b) finds all files in
GET by any of the IP addresses in
(c) prints out a warning on STDERR for every file that has been downloaded but cannot
be found in
(d) does not copy any files that have not been downloaded by any of the IP addresses in
(e) is well-structured and understandable.
Your program must handle errors correctly.
For this task, you are given an example in the file task1-example-1.zip. This archive contains
the following files and directories (the directories www/ and 184.108.40.206-accessed/ contain
When you run task1.pl is run in example-1/ as follows:
./task1.pl access.log www 220.127.116.11-accessed-2 18.104.22.168
the directory 22.214.171.124-accessed-2 should be created and contain exactly the same files as
Your script must run on lapis.cs.cf.ac.uk without installing any additional libraries or
programs. IF YOUR SCRIPT DOES NOT RUN AS SPECIFIED, NO ATTEMPT TO MAKE IT RUN
WILL BE MADE AND YOU WILL RECEIVE 0 MARKS.
You are given a processor with the following specification:
• 4 Registers: A, B, C, D
• Zero flag – set if last instruction resulted in zero
• Equal flag – set by CMP operation
• Instruction Set
the result in register1
store result in register1
• JMP @LABEL – unconditional jump to @LABEL
• JNZ @LABEL – jump if not zero
• JE @LABEL – jump if equal
• Addressing modes: Immediate, Direct, Indirect, Register Direct, Register Indirect
Design a genetic algorithm that generates a program for this processor. The program must
compute the function: x3 := x1 + x2, where x1 is memory location 1, x2 is memory location
2, and x3 is memory location 3. You do not need to implement the genetic algorithm.
Answer the following questions:
(1) How do you represent an individual?
(2) How do you compute the fitness function?
(3) How do you mutate an individual?
(4) Is genetic programming a suitable solution to this problem? State your answer and
provide a convincing argument to support it. If your answer is Yes, give an example
for a function for which genetic programming would not be a suitable solution. If
your answer is No, give an example for a function for which genetic programming
would be a suitable solution. In both cases, give a reason for your answer.
Learning Outcomes Assessed
LO02: Evaluate and apply a suitable programming paradigm and language from a selection
of them to solve a given problem.
LO03: Discuss and contrast the issues, features, design and concepts of a range of
programming paradigms and languages, such as imperative, functional, declarative, logic,
scripting, filter-based programming, pattern matching and quantum computing.
LO04: Explain the conceptual foundations of various programming paradigms.
Criteria for assessment
Breakdown of marks
The maximum number of marks to be achieved in this assessment is 25.
Your script must run on lapis.cs.cf.ac.uk. The script will be assessed as follows:
1. Your script will be run inside the directory example-1/ contained in the provided
archive, as follows:
rm -Rf 126.96.36.199-accessed-2/
./task1.pl access.log www/ 188.8.131.52-accessed-2 184.108.40.206
After execution, the contents of 220.127.116.11-accessed-2/ should be exactly like the
contents of 18.104.22.168-accessed/.
2. Your script will be run against several other directories, log files and/or combinations
of parameters, and checked as described above.
3. Your script will be manually inspected for code quality.
Please note: Your script must not depend on any software not present on the specified
machine (lapis.cs.cf.ac.uk), and you must not request that any software be installed on that
machine. Any such request will be denied. The script will be executed with a Bash shell.
If the script does not run exactly as specified, no attempt will be made to make it run, and
you will not earn any marks.
|Criterion||Detailed Criteria||Marks range|
|Operation with example
|The script runs||[0, 1]|
|All required files copied to
|No other files copied to
|Operation with unknown
|All required files copied to
|No other files copied to
|Missing files reported||[0, 2]|
|Error handling||Parameter errors||[0, 1]|
|File/directory errors||[0, 1]|
|Code quality||Comments present and
|Clear structure||[0, 1]|
|Use of existing tools||[0, 2]|
|1.||Correct and well-supported
|2.||Correct and well-supported
|3.||Correct and well-supported
|4.||(a) Convincing answer to the
|(b) Correct example given
and supported by
Feedback and suggestion for future learning
Feedback on your coursework will address the above criteria. Feedback will be useful for
your dissertation project. Feedback and marks will be returned on 14th June 2021 via
Learning Central. This will be supplemented with oral feedback on request.
- Assignment status: Already Solved By Our Experts
- (USA, AUS, UK & CA PhD. Writers)
- CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS, GET A NON PLAGIARIZED PAPER FROM OUR EXPERTS