Domain 8. Chapter 21 Flashcards
Domain 8. Chapter 21
1. Malware
2. Malware prevention
3. Application Attacks
4. Injection Vulnerabilities
5. Exploiting Authorization Vulnerabilities
6. Exploiting Web Application Vulnerabilities
7. Application Security Controls
8. Secure Coding Practices
- Malware
The script kiddie—the malicious individual who doesn’t understand the technology behind security vulnerabilities but downloads ready-to-use software (or scripts) from the internet and uses them to launch attacks against remote systems.
The advanced persistent threat (APT) - are sophisticated adversaries with advanced technical skills and significant financial resources.
1.1 Viruses
Like biological viruses, computer viruses have two main functions—propagation and payload execution распространение и выполнение полезной нагрузки.
1.1.1 Virus Propagation Techniques
- Master Boot Record Viruses MBR These viruses attack the MBR—the portion of bootable media (such as a hard disk or flash drive) that the computer uses to load the operating system during the boot process. 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 system’s hard drive, and spreads its infection to yet another machine.
- File Infector Viruses
Many viruses infect different types of executable files and trigger when the operating system attempts to execute them. For Windows-based systems, file infector viruses commonly affect executable files and scripts, such as those ending with .exe, .com, and .msc extensions. Standard file infector viruses that do not use cloaking techniques such as stealth or encryption (see the section “Virus Technologies,” later in this chapter) are often easily detected by comparing file characteristics (such as size and modification date) before and after infection or by comparing hash values.
A variation of the file infector virus is the companion virus. These viruses are self-contained executable files that escape detection by using a filename similar to, but slightly different from, a legitimate operating system file.
- Macro Viruses
Visual Basic for Applications (VBA) programming language, scripting functionality to assist with the automation of repetitive tasks. Macros.
- Service Injection Viruses - other technique to infect systems and escape detection—injecting themselves into trusted runtime processes of the operating system, such as svchost.exe, winlogon.exe, and explorer.exe.
One of the best techniques to protect systems against service injection is to ensure that all software allowing the viewing of web content (browsers, media players, helper applications) receives current security patches.
1.1.2 Virus Technologies
This section examines four specific types of viruses that use sneaky techniques in an attempt to escape detection:
- Multipartite Viruses Многочастные вирусы Multipartite viruses use more than one propagation technique in an attempt to penetrate systems that defend against only one method or the other.
- Stealth Viruses Stealth viruses hide themselves by actually tampering вмешиваясь в with the operating system to fool antivirus packages into thinking that everything is functioning normally.
- Polymorphic Viruses Polymorphic viruses actually modify their own code as they travel from system to system.
- Encrypted Viruses Encrypted viruses use cryptographic techniques to avoid detection. However, they do not generate these modified signatures by changing their code; instead, they alter the way they are stored on the disk.
1.1.3 Hoaxes мистификациями
Virus hoaxes - is the message that warns of “the latest virus threat roaming the internet”.
1.2 Logic Bombs
Logic bombs are malicious code objects that infect a system and lie dormant until лежать в спячке they are triggered by the occurrence of one or more conditions such as time, program launch, website logon, certain keystrokes, and so on.
1.4 Trojan Horses
A Trojan horse—a 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.
Remote access Trojans (RATs) are a subcategory of Trojans that open backdoors in systems that grant the attacker remote administrative control of the infected system.
Cryptomalware. Trojans are designed to steal computing power from infected systems for use in mining Bitcoin or other cryptocurrencies.
1.5 Worms
Worms pose a significant risk to network security. They contain the same destructive potential as other malicious code objects with an added twist—they propagate themselves without requiring any human intervention.
- Code Red Worm spread among web servers running unpatched versions of Microsoft’s Internet Information Server (IIS) in 2001. 1) It randomly selected hundreds of Internet Protocol (IP) addresses and then probed those addresses to see whether they were used by hosts running a vulnerable version of IIS. 2) It defaced HTML pages on the local web server. 3) It planted a logic bomb that would initiate a denial-of-service attack against the IP address 198.137.240.91, which at that time belonged to the web server hosting the White House’s home page.
-Stuxnet
In mid-2010, a worm named Stuxnet surfaced on the internet.
Stuxnet uses the following propagation techniques:
- Searching for unprotected administrative shares of systems on the local network
- Exploiting zero-day vulnerabilities in the Windows Server service and Windows Print Spooler service
- Connecting to systems using a default database password
- Spreading by the use of shared infected USB drives.
While Stuxnet spread from system to system with impunity, it was actually searching for a very specific type of system—one using a controller manufactured by Siemens and allegedly used in the production of material for nuclear weapons. When it found such a system, it executed a series of actions designed to destroy centrifuges attached to the Siemens controller.
Stuxnet appeared to begin its spread in the Middle East, specifically on systems located in Iran.
1.6 Spyware and Adware Шпионское и рекламное ПО
Spyware monitors your actions and transmits important details to a remote system that spies on your activity. For example, spyware might wait for you to log into a banking website and then transmit your username and password to the creator of the spyware. Alternatively, it might wait for you to enter your credit card number on an ecommerce site and transmit it to a fraudster to resell on the black market.
Adware, while quite similar to spyware in form, has a different purpose. It uses a variety of techniques to display advertisements on infected computers. The simplest forms of adware display pop-up ads всплывающие окна с рекламой on your screen while you surf the web. More nefarious гнусные versions may monitor your shopping behavior and redirect you to competitor websites.
Both spyware and adware fit into a category of software known as potentially unwanted programs (PUPs),
1.7 Ransomware Вирус-вымогатель
Ransomware is a type of malware that weaponizes cryptography. After infecting a system through many of the same techniques used by other types of malware, ransomware then generates an encryption key known only to the ransomware author and uses that key to encrypt critical files on the system’s hard drive and any mounted drives. This encryption renders the data inaccessible to the authorized user or anyone else other than the malware author.
The user is then presented with a message notifying them that their files were encrypted and demanding payment of a ransom и требующее уплаты выкупа before a specific deadline to prevent the files from becoming permanently inaccessible. Some attackers go further and threaten that they will publicly release sensitive information if the ransom is not paid.
1.8 Malicious Scripts
It’s not uncommon to find libraries of scripts written in languages such as PowerShell and Bash that execute sequences of command-line instructions in a highly automated fashion режиме. For example, an administrator might write a PowerShell script that runs on a Windows domain each time a new user is added to the organization.
Unfortunately, this same scripting technology is available to improve the efficiency of malicious actors. For example, they might have a PowerShell script to run each time they gain access to a new Windows system that attempts a series of privilege escalation attacks.
Malicious scripts are also commonly found in a class of malware known as fileless malware.
For example, a user might receive a malicious link in a phishing message. That 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.
1.9 Zero-Day Attacks
Many forms of malicious code take advantage of zero-day vulnerabilities, security flaws discovered by hackers that have not been thoroughly addressed by the security community.
There are two main reasons systems are affected by these vulnerabilities:
- The necessary delay between the discovery of a new type of malicious code and the issuance of patches and antivirus updates. This is known as the window of vulnerability.
- Slowness in applying updates on the part of system administrators.
- Malware Prevention
2.1 Antimalware Software
83 percent of malware in existence targets the Windows platform.
Signature-based detection to identify potential virus infections on a system with a database that contains the telltale характерные characteristics of all known viruses.
- 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 settings/policies do not provide for quarantine or the files exceed a predefined danger threshold, the antivirus package may delete the infected files in an attempt to preserve system integrity.
Heuristic mechanisms. These methods analyze the behavior of software, looking for the telltale signs of virus activity, such as attempts to elevate privilege level, cover their electronic tracks, and alter unrelated or operating system files. A common strategy is for systems to quarantine suspicious files and send them to a malware analysis tool, where they are executed in an isolated but monitored environment. If the software behaves suspiciously in that environment, it is added to blacklists throughout the organization, rapidly updating antivirus signatures to meet new threats.
2.2 Integrity Monitoring
file integrity monitoring tools, also provide a secondary antivirus functionality. These tools are designed to alert administrators to unauthorized file modifications. These systems work by maintaining a database of hash values for all files stored on the system. hese archived hash values are then compared to current computed values to detect any files that were modified between the two periods.
2.3 Advanced Threat Protection
Endpoint detection and response (EDR). They combine the antimalware capabilities found in traditional antivirus packages with advanced techniques designed to better detect threats and take steps to eradicate them. Some of the specific capabilities of EDR packages are as follows:
- 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 real-time insight into malicious behavior elsewhere on the internet
- Integration with other incident response mechanisms to automate response efforts.
Many security vendors offer EDR capabilities as a managed service offering where they provide installation, configuration, and monitoring services to reduce the load on customer security teams. These managed EDR offerings are known as managed detection and response (MDR) services.
User and entity behavior analytics (UEBA) 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.
- Application Attacks
The specific techniques that attackers use to exploit vulnerabilities left behind by sloppy небрежно coding practices.
3.1 Buffer Overflows
Buffer overflow vulnerabilities exist when a developer does not properly validate user input to ensure that it is of an appropriate size. Input that is too large can “overflow” a data structure to affect other data stored in the computer’s memory.
In the worst case, that data can be used to overwrite system commands, allowing an attacker to exploit the buffer overflow vulnerability to execute targeted commands on the server.
Any time a program variable allows user input, the programmer should take steps to ensure that each of the following conditions is met:
- The user can’t enter a value longer than the size of any buffer that will hold it (for example, a 10-letter word into a 5-letter string variable).
- The user can’t enter an invalid value for the variable types that will hold it (for example, a letter into a numeric variable).
- The user can’t enter a value that will cause the program to operate outside its specified parameters (for example, answer a “yes” or “no” question with “maybe”).
3.2 Time of Check to Time of Use
Attackers can develop attacks based on the predictability of task execution.
The time of check (TOC) is the time at which the subject checks on the status of the object.
When the decision is made to access the object, the procedure accesses it at the time of use (TOU).
he difference between the TOC and the TOU is sometimes large enough for an attacker to replace the original object with another object that suits their own needs. Time of check to time of use (TOCTTOU or TOC/TOU) attacks are often called race conditions because the attacker is racing with the legitimate process to replace the object before it is used.
These attacks must be addressed in your security policy and in your security model. TOCTTOU attacks, race condition exploits, and communication disconnects are known as state attacks because they attack timing, data flow control, and transition between one system state to another.
3.3 Backdoors
Backdoors are undocumented command sequences that allow individuals with knowledge of the backdoor to bypass normal access restrictions. They are often used during the development and debugging process to speed up the workflow and avoid forcing developers to continuously authenticate to the system.
3.4 Privilege Escalation and Rootkits
Privilege escalation attacks - expanding access from the normal user account to more comprehensive, administrative access. Through the use of rootkits. Rootkits are freely available on the internet and exploit known vulnerabilities in various operating systems. Privilege escalation attacks may also be waged using fileless malware, malicious scripts, or other attack vectors. Administrators must keep themselves informed about new security patches released for operating systems used in their environment and apply these corrective measures consistently.
- Injection Vulnerabilities
Injection vulnerabilities are among the primary mechanisms that attackers use to break through a web application and gain access to the systems supporting that application. These vulnerabilities allow 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.
4.1 SQL Injection Attacks
Web applications often receive input from users and use it to compose a database query that provides results that are sent back to a user.
SQL injection attacks may also be used to execute commands that modify records, drop tables, or perform other actions that violate the integrity and/or availability of databases.
Attackers use a technique called blind SQL injection to conduct an attack even when they don’t have the ability to view the results directly. We’ll discuss two forms of blind SQL injection: content-based and timing-based.