CISSP ch 21 Flashcards
Virus functions
two main functions – propagation and payload execution
MBR (virus)
master boot record virus
One of the earliest known forms of infection
Attack the MBR – the portion of bootable media (e.g., hard disk or flash drive) that the computer uses to load the operating system during the boot process
MBR is extremely small, usually 512 bytes, can’t contain all the code required to implement the virus’ propagation and destructive functions
To bypass space limitation, store the majority of their code on another portion of the storage media
When system reads the infected MBR, virus instructs it to read and execute the code stored in this alternate location
Most MBR viruses are spread between systems through the use of infected media inadvertently shared between users
If the infected media is in the drive during the boot process, the target system reads the infected MBR, and the virus loads into memory, infects the MBR on the target’s system’s hard drive
Master boot record
not the boot sector
MBR is a single disk sector, normally the first sector of the media that is read in the initial stages of the boot process. MBR then determines which media partition contains the operating system and then directs the system to read that partition’s boot sector to load the operating system. Viruses can attack both the MBR and the boot sector, with similar results
File infector virus
Viruses that infect different types of executable files and trigger when the operating system attempts to execute them
Windows-based systems, viruses affect executable files and scripts:
.exe
.com
.msc
Standard file infector viruses that do not use cloaking techniques such as stealth or encryption are often easily detected by comparing file characteristics (size, modification date) before and after infection or by comparing hash values
Companion virus
Variation of the file infector virus
Self-contained executable files that escape detection by using a filename similar to, but slightly different from, a legitimate operating system file
Rely on the default file name extensions that Windows-based operating systems append to commands when executive program files (in this order)
.com
.exe
.bat
E.g., replacing game.exe with game.com – if you open a command prompt and simply type GAME, the operating system would execute the virus file (game.com) instead of game.exe
VBA
visual basic for applications = programming language used by scripting functionalities
Macro viruses
Leverages scripting functionality implemented in common software applications
E.g., Melissa Virus in 1999 and I Love You Virus in 2000 spread through Word Document that exploited a vulnerability in Outlook to replicate
Service injection virus
Inject themselves into trusted runtime processes of the operating system, such as svchost.exe, winlogon.exe and explorer.exe
Bypasses detection by any antivirus software running on the host
Best protection: ensure that all software allowing the viewing of web content (browsers, media players, helper applications) receives current security patches
Multipartite viruses
Use more than one propagation technique
E.g., virus might infect critical COM and EXE files by adding malicious code to each file (file infector virus), then write malicious code to the system’s master boot record (boot sector virus)
stealth viruses
Hide themselves by actually tampering with the operating system to fool antivirus packages into thinking that everything is functioning normally
E.g., overwriting the system’s master boot record but then modifying the operating system’s file access functionality to cover its tracks
polymortphic viruses
Modify their own code as they travel from system to system
Propagation and destruction techniques remain the same, but the signature of the virus is somewhat different each time it infects a new system
Current versions of anti-virus software are able to detect known polymorphic viruses
encrypted viruses
Use cryptographic techniques to avoid detection
In their outward appearance, quite similar to polymorphic viruses, each infected system has a virus with a different signature
However, do not generate these modified signatures by changing their code, instead they alter the way they are stored on the disk
Use a very short segment of code, known as the virus decryption routine, which contains the cryptographic information necessary to lead and decrypt the main virus code stored elsewhere on the disk. Each infection utilizes a different cryptographic key, causing the main code to appear completely different on each system.
However, the virus decryption routines often contain telltale signatures that render them vulnerable to updated antivirus software packages
trojan horses
software program that appears benevolent but carries a malicious, behind-the-scenes payload that has the potential to wreak havoc on a system or network
RATs
Remote access Trojans = open backdoors in systems that grant the attacker remote administrative control of the infected systems
E.g., a RAT might open a Secure Shell (SSH) port on a system that allows the attacker to use a preconfigured account to access the system and then send a notice to the attacker that the system is ready and waiting for a connection
cryptomalware
designed to steal computing power from infected systems for use in mining Bitcoin or other cryptocurrencies
worms
contain same destructive potential as other malicious code objects with an added twist – they propagate themselves without requiring any human intervention
PUPs
potentially unwanted programs = software that a user might consent to installing on their system that then carries out functions that the user did not desire or authorize
Scripting technology
automate input of commands = also available to improve the efficiency of malicious actors = commonly found in a class of malware known as fileless malware
Fileless malware
never write files to disk, making them more difficult to detect = e.g., link might exploit a browser vulnerability to execute code that downloads and runs a PowerShell script entirely in memory, where it triggers a malicious payload
Antivirus responses to detection
If the software can eradicate the virus, it disinfects the affected files and restores the machine to a safe condition
If the software recognizes the virus but doesn’t know how to disinfect the files, it may quarantine the files until the user or an administrator can examine them manually
If security setting/policies do not provide for the quarantine or the files exceed a predefined danger threshold, the antivirus package may delete the infected files in an attempt to preserve system integrity
File integrity monitoring tools
secondary anti-virus functionality = designed to alert administrator to unauthorized file modifications = maintain a database of hash values for al files stored on the system, archived hash values are then compared to current computed values to detect any files that were modified between two periods
EDR
endpoint detection and response packages = go beyond traditional antimalware protection to help protect endpoints against attack = contain antimalware capabilities found in traditional antirvirus packages with advanced techniques designed to better detect threats and take steps to eradicate them, some specific capabilities include:
Analyzing endpoint memory, filesystem, and network activity for signs of malicious activity
Automatically isolating possible malicious activity to contain the potential damage
Integration with threat intelligence sources to obtain a real-time insight into malicious behavior elsewhere on the internet
Integration with other incident response mechanisms to automate response efforts
MDR
managed detection and response services = where security vendors offer EDR capabilities and also provide installation, configuration, and monitoring services to reduce load on customer security teams
UEBA
user and entity behavior analytics packages
pay particular attention to user-based activity on endpoints and other devices, building a profile of each individual’s normal activity and then highlighting deviations from that profile that may indicate a potential compromise
UEBA tools differ from EDR capabilities in that UEBA has an analytic focus on the user, whereas EDR has an analytic focus on the endpoint
buffer overflow vulnerabilities
exist when a developer does not properly validate user input to ensure that is of an appropriate size, input that is too large can “overflow” a data structure to affect other data sored in the computer’s memory
can corrupt other data stored in memory or at worst, be used to overwrite system commands, allowing attacker to execute targeted commands on the server
buffer overflow defenses
The user can’t enter a value longer than the size of any buffer that will hold it
The user can’t enter an invalid value for the variable types that will hold it
The user can’t enter a value that will cause the program to operate outside its specific parameters
CGI
Common Gateway Interface = language that allows unskilled programmers to quickly create interactive web pages = buffer overflow vulnerabilities are especially prevalent in code developed rapidly for the web using this language and other similar languages
TOC and TOU
TOC = time of check = time at which the subject checks on the status of the object, there may be several decisions to make before returning to the object to access it
TOU = time of use = when the decision is made to access the object
TOCTTOU attacks / race conditiosn
when the difference between the TOC and the TOU is large enough for an attacker to replace the original object with another objects that suits their own needs, attacker is racing with the legitimate process to replace the object before it is used = example of a state attack (attack timing, data flow control and transition between on system state to another)
E.g., replacing a data file after its identity has been verified but before data is read
rootkits
common way that attackers wage privilege escalation attacks = freely available on the internet and exploit known vulnerabilities in various operating systems = root is the administrator level
injection vulnerabilities
allows an attacker to supply some type of code to the web application as input and trick the web server into either executing that code or supplying it to another server to execute
SQL injection attacks
attacker sends an unusual request to the web server, usually involving commands, including requests that execute commands that modify records, drop tables, or perform other actions that violate the integrity and/or availability of databases