Report Soppi

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

INDIAN INSTITUTE OF

INFORMATION
TECHNOLOGY, GUWAHATI

Name: Ankit Raj Name: Gaurav Kumar


Roll: 2101038 Roll: 2101072

CS361: Computer Security


Assignment - 1

Title: Report on Virus Programming Assignments


Introduction:
This report documents the completion of assignments aimed at
exploring malware propagation techniques and antivirus program
responses. The assignments cover topics such as file infection,
USB drive infection, propagation on new computers, and an
analysis of antivirus program responses.
Note:
It emphasizes the importance of cybersecurity awareness and responsible
programming practices to mitigate the risks associated with malware
infections. This assignments serve as educational exercises to explore
cybersecurity concepts and the development of defensive strategies against
malware threats.
Task 1: File Infection

Objective:
The objective is to create a program named 'V' that searches for
files with a “.foo” extension in the user's documents folder and
infects them by appending malicious content.
Implementation:
“infect_files_in_folder” function scans a folder for files with the
".foo" extension and appends content of ‘V.py’ to each of them.
“os.listdir( )” filter files, then opens 'V.py' and reads its content. It
then opens the file and writes 'V.py' content.

Infected foo files:


Observations:
• If “.foo” file is present in user’s “Documents” folder,
contents of ‘V.py’ are appended in that foo files.

• If “foo” file is not present, it prints message in console as


“.foo file is not present in Documents folder.”

Actions taken by Antivirus present in the computer:


(i) Since this operation is occurring within our system, Antivirus
software is not bothering about appendation. So it ignores the
changes done to “.foo” file.
Task 2: USB Drive Infection

Objective:
The objective is to search for mounted USB drives, infect files with
a `.foo` extension on those drives, and create a copy of the “V.py”
script on the USB drive.
Implementation:
“infect_usb_drive” scans for mounted USB drives. It looks for
files with a ".foo" extension and appends the content of 'V.py' to
each ".foo" file found, copies 'V.py' itself and creates a batch file
on the drive. After completing the infection process, it waits for
further USB drive insertions, checking every 3 seconds.

Copied “V.py” script and infected foo files in USB:


Observations:
• This program waits until USB drive is inserted. After insertion,
if “.foo” file is present in USB drive, contents of ‘V.py’ are
appended in that foo files and a copy of ‘V.py’ is created.
• If “foo” file is not present, it only create a copy of ‘V.py’
script to USB drive.

Actions taken by Antivirus present in the computer:


(i) Similar to previous case, since this operation is occurring within
our system, Antivirus software is not bothering about
appendation. So it ignores the changes done to “.foo” file.
Task 3: Propagation on New Computer

Objective:
The objective is to search for “Documents” folder and infect
“.foo” files in a new computer when the USB drive is inserted.

Infected foo files in new computer (if permission allowed):


Implementation:
While running “run_infected.bat”, it triggers ‘V.py’ script by
invoking the batch content. It then infects “.foo” files in that new
computer present in “Documents” folder.
Observations:
• When infected USB drive is inserted in a new computer and
“run_infected.bat” is run, it faces an antivirus blockage.
• When permissions are granted, it searches for “Documents”
folder. If “.foo” files are present, their contents are appended
with ‘V.py’ script present in that USB.
• It does nothing if no any “.foo” files found.

Actions taken by Antivirus


present in the computer:
It tries to interrupt, block the
actions of batch file and shows
alert message. It firstly
quarantines and then ask for
permissions. If allowed, it then
executes.

You might also like