Module 3

Windows Forensics-Live Response: Data Collection

  • In some cases, it's beneficial to gather information about a live system before shutting it down and creating a bit-stream image of the hard drive.
  • The most interesting information is volatile, disappearing when the system loses power.
  • Volatile information typically resides in RAM and includes details about processes, network connections, clipboard contents, etc.
  • This data reflects the system's condition as it's being accessed, either directly or remotely.
  • Investigators might need to quickly capture and analyze data to understand the incident's nature and scope.
  • Traditional hard drive imaging loses this volatile data when the system is powered off.
  • Actions taken on a live system (antivirus scans, file searches, reconfiguration) create new artifacts and may overwrite critical data.
  • Collecting and preserving volatile data should be prioritized.
  • Live response involves accessing a running system to collect volatile (and sometimes nonvolatile) information, providing a comprehensive view of the system's state.
  • Live acquisition, often confused with live response, refers to acquiring the hard drive image while the system is running.

Locard’s Exchange Principle

  • Developed by Dr. Edmond Locard in the early 20th century, it states that contact between two objects results in material exchange.
  • This applies digitally: computers exchanging information over a network leave traces in process memory and log files.
  • Attaching a removable storage device to a Windows system leaves device-related information on the computer.
  • Investigator actions modify the system, causing transient (process memory, network connections) or permanent (log files, Registry entries) changes.

Order of Volatility

  • Collecting RAM contents first minimizes impact, considering Locard's Exchange Principle.
  • Tools used to collect volatile data will be loaded into memory, modifying its contents.
  • Specific volatile information types include:
    • System time
    • Logged-on user(s)
    • Open files
    • Network information
    • Network connections
    • Process information
    • Process-to-port mapping
    • Process memory
    • Network status
    • Clipboard contents
    • Service/driver information
    • Command history
    • Mapped drives
    • Shares

System Time

  • System Time the initial piece of information to gather when investigating an incident.
  • It provides context and aids in creating an accurate timeline of events.
  • The system's uptime (duration since last boot) offers crucial context.
  • Record both system time and real time ("wall time") to detect clock skew.
  • Clock skew information is valuable for correlating timestamps from multiple sources.
  • Time zone settings are important, especially for remote live response.
  • NTFS stores file times in UTC (Coordinated Universal Time), while FAT uses local system time.

Logged-on Users

  • Identifying logged-on users (local and remote) provides context to collected information.
  • It helps correlate user context to running processes or file access times.
  • Useful for correlating with the Security Event Log, particularly with logon/logoff auditing enabled.
  • PsLoggedOn: A tool to identify locally and remotely logged-on users, including those connected via mapped shares.
  • Net Sessions: A native Windows command to view usernames, IP addresses, and client types for remote login sessions.
  • LogonSessions: A Microsoft CLI tool listing all active logon sessions on a system.

Open Files

  • After identifying remotely logged-on users, examine which files they have open.
  • Remote users often access specific files of interest.
  • Poorly secured systems may be remotely accessed for file searching, viewing, and copying.
  • Tools like net file, psfile.exe, and openfiles.exe display files opened via remote connections.

Network Information

  • Intruders often seek to understand the network landscape accessible from a compromised system.
  • Attackers may use batch files or SQL injection to execute net view commands.
  • Systems maintain a list of "seen" systems via NetBIOS communications.
  • Cached name table contents can reveal other affected systems.
  • Example: Using nbtstat –A 192.168.1.22 to view a remote system's name table and nbtstat –c to view cached NetBIOS names on the host operating system.

Network Connections

  • Promptly collect information about network connections to and from the affected system, as this data can expire quickly.
  • Determine if the attacker is still connected or if malware (worms, IRC bots) is communicating externally.
  • This provides valuable clues and context.
  • Firewalls may not be installed or configured to log successful connections.
  • Tools like Port Reporter may not be present.
  • Rapid and efficient data collection is crucial.

Netstat

  • Netstat is a well-known tool for gathering network information on Windows systems.
  • It's a native CLI tool that shows TCP and UDP connections, their states, and network traffic statistics.
  • Common usage: netstat –ano to display TCP/UDP connections, listening ports, and associated process IDs (PIDs).
  • The output shows active network connections, their states, and the PIDs of the processes using those ports.
  • Using netstat -r displays the routing table and persistent routes, useful for investigation or troubleshooting.

Process Information

  • Always determine the processes running on a potentially compromised system.
  • Task Manager offers limited process information.
  • More detailed information includes:
    • Full path to the executable image (.exe file)
    • Command line used to launch the process
    • Process uptime
    • Security/user context
    • Loaded modules
    • Process memory contents
  • Malware may disguise itself under legitimate process names like svchost.exe.
  • Executable images in the system32 directory are protected by Windows File Protection (WFP), preventing modification without generating an event log entry.
  • Suspicious processes can be identified by examining the full executable path (e.g., svchost.exe not running from C:\Windows\system32) or the command line (e.g., inetinfo.exe with suspicious arguments indicating netcat usage).

Tlist

  • Tlist.exe (from Microsoft Debugging Tools) displays detailed information about running processes.
  • -v switch shows session ID, PID, process name, associated services, and command line.
  • -c switch shows the command line for each process.
  • -s switch shows associated services or window title.
  • -t switch displays the task tree (parent-child process relationships).
  • -m switch searches for processes with a specific module loaded.

Tasklist

  • Tasklist.exe: Native utility in Windows XP Pro and Windows 2003, replacing tlist.exe. Provides output formatting options: table, CSV, and list.
  • /v (verbose) switch provides image name (but not the full path), PID, session name/number, process status, username, and window title (if GUI).
  • /svc switch lists service information for each process.

PsList

  • Pslist.exe displays basic process information, including kernel and user mode uptime.
  • -x switch displays details about threads and memory usage.
  • -t switch displays a task tree.
  • Lacks information about executable path, command line, or user context.

ListDLLs

  • Listdlls.exe shows the modules (DLLs) used by a process.
  • Displays the full path to the loaded module and indicates if the on-disk image differs from the in-memory version.
  • Important for identifying DLL injection techniques used by malware, spyware, Trojans, and rootkits.
  • Programs load DLLs to access functions listed in their export tables, while programs reference these DLLs and functions in their import tables.
  • Internet Explorer can load toolbars and browser helper objects via DLLs.

Handle

  • Handle.exe displays the handles that processes have open, including file handles, ports, Registry keys, and threads.
  • Useful for determining which resources a process is accessing.

Process-to-Port Mapping

  • Every network connection and open port is associated with a process.
  • Several tools can retrieve this process-to-port mapping.

Netstat

  • netstat.exe with the -o switch displays the PID for the process responsible for the network connection (refer back to the netstat –ano command).
  • Correlate this PID with tools like tlist.exe or tasklist.exe to determine the process name and other details.

Fport

  • Fport.exe: A long-standing tool for obtaining the process-to-port mapping.
  • Requires Administrator privileges to run, posing an issue if the logged-in user lacks these privileges.

Tcpvcon

  • Tcpvcon.exe: Available from Microsoft, it's a valuable tool for retrieving process-to-port mapping.
  • Shows information about TCP connections by default.
  • The -a and -c switches display information about all connections (TCP and UDP) in CSV format.

Process Memory

  • Running processes may be suspicious or malicious.
  • Processes often share the same name as their executable file, which can be easily renamed to disguise malicious code.
  • Attackers may use names of common Windows programs (refer to the "Svchost" sidebar).

Network Status

  • Obtaining information about the status of network interface cards (NICs) is crucial.
  • Determine if a system is connected to a wireless access point and its IP address.
  • Provides insight for follow-on investigations.

Ipconfig

  • Ipconfig.exe: A native Windows utility for displaying NIC information and status.
  • /all switch is the most useful, displaying the network configuration of NICs, including state, DHCP status, IP address, etc.
  • Useful for examining network traffic logs where the system IP address may have changed.
  • Web-based email services (e.g., Yahoo! Mail) record the IP address of the system used to draft emails in the email header.

PromiscDetect and Promqry

  • Compromised systems may have a "sniffer" installed to capture network traffic.
  • Malware may include this capability or install it as a follow-on download.
  • NICs must be in "promiscuous" mode to capture all network traffic.
  • Tools such as promiscdetect.exe and promqry.exe identify whether the NIC is in promiscuous mode indicating if a system is capturing traffic.
  • promqry.exe can scan remote systems for sniffing activity.

Clipboard Contents

  • The Clipboard is a memory area for temporary data storage (accessed via Cut, Copy, Paste).
  • Can be valuable in intellectual property theft, fraud, or harassment cases.
  • May contain clues, images, or document sections.
  • Pclip.exe: A CLI utility to retrieve Clipboard contents, enabling automation via batch files and scripts.

Service/Driver Information

  • Services and drivers start automatically based on Registry entries.
  • Users often don't see these running processes.
  • Malware can install itself as a service or driver.

Command History

  • User-typed commands may contain valuable clues.
  • Scroll bar in the command prompt provides limited history.
  • doskey /history command displays the complete command history.

Mapped Drives

  • Identify mapped drives or shares.
  • Mappings could indicate malicious intent (accessing systems via guessed Administrator passwords).
  • Volatile information about drive mappings can be correlated to network connection information.

Shares

  • Gather information about resources the system is making available.
  • Share information is stored in the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lanmanserver\Shares key.
  • CLI tools like share.exe can retrieve this information from a live system.

Nonvolatile Information

  • Collect persistent information like Registry keys or files.
  • Extract Registry or file data for analysis, especially if an attacker is actively logged in.

Registry Settings

  • Certain Registry values and settings can impact forensic analysis.

ClearPageFileAtShutdown

  • This setting clears the page file upon shutdown.
  • The page file contains memory paged out by processes, potentially holding decrypted passwords, IM conversations, and other sensitive information.
  • Clearing this file makes data recovery and analysis more difficult.

DisableLastAccess

  • Disables updating of last access times on files.
  • Intended as a performance enhancement, but has minimal impact on typical workstations.

Autoruns

  • Autostart locations (Registry and file system) automatically start applications.
  • Useful for identifying malware that launched on system boot/login or initiated by user actions.
  • Administrators use Scheduled Tasks with elevated privileges.
  • Attackers may exploit this to maintain a persistent presence.

Protected Storage

  • Protected Storage area in the Registry holds encrypted information.
  • Forensic ToolKit can decrypt this data from a system image.
  • Tools like PassView, Protected Storage Explorer (GUI), and pstoreview.exe (CLI) simplify viewing this data.

Event Logs

  • Event Logs are files in the file system that change depending on audit policies.
  • First responders accessing the system may generate log entries.
  • Tools like psloglist.exe and dumpevt.exe can retrieve event records, or the .evt files can be copied.

Devices and Other Information

  • Collect other non-volatile information for documentation purposes.
  • Example: Hard drive details using Di.pl (a Perl script implementing WMI).

Live-Response Methodologies

  • Data retrieval methodologies vary based on several factors.
  • Two basic methodologies:
    • Local
    • Remote

Local Response Methodology

  • Responder is at the system console, entering commands and saving data locally (hard drive, removable drive, network share).
  • Common when the responder has immediate physical access to the system and tools on a CD or thumb drive.
  • Can be faster than establishing a network connection.
  • Batch files or scripts can automate activities.

Remote Response Methodology

  • Commands executed against a system across the network.
  • Scalable for use with many systems through automation.
  • Tools like psexec.exe and WMI can be used.
  • Requires login credentials for each system.
  • Logging in adds entries to the Security Event Log (if auditing is enabled).
  • Collect the Security Event Log first due to the order of volatility shifting.

Hybrid Approach

  • A combination of local and remote methodologies.
  • Used when remote login is not possible, but data needs to be collected from multiple systems and stored centrally.
  • Responder uses a CD or thumb drive with a write-protect switch to run tools and send output to a central "forensic server."
  • Minimizes interaction with the system, reduces input errors, and uses trusted tools from a non-modifiable source.
  • Implemented using a batch file.

ROOTKIT

  • A rootkit is a collection of software tools that an intruder uses to conceal their activity on a compromised computer system and maintain persistent remote access.
  • Rootkits have the ability to modify system binaries or hook OS functions which allow them to hide files, processes, other objects, and even API calls from administrators and security tools.

Rootkit Detection

  • Rootkit detection can occur in two modes: live and postmortem.
  • Live detection: Analyzing a running system to determine if a rootkit is present.
  • Postmortem detection: Analyzing an acquired image of the system.

Live Detection

  • Live detection can be challenging.
  • Behavioral or differential (high/low) analysis is a common technique: making two different kinds of queries for the same information and looking for differences in the responses, you can detect the presence of a rootkit.
RootkitRevealer
  • Detects rootkits that hide files and Registry keys
  • Does not detect kernel-mode rootkits that modify kernel objects
GMER
  • Detects Hidden processes, files, services, Registry keys, and drivers. Drivers hooking the system service descriptor table (SSDT), interrupt descriptortable (IDT), or IO request packet (IRP) calls
  • Detects Master Boot Record (MBR) rootkits and allows the inclusionof your preferred antivirus application in the GMER user interface.
Helios
  • detects rootkits using behavioral analysis
  • Helios is not open source, but it is free, andit does have an API that provides access to the product’s core functionality.
  • Helios will not only detect rootkits but also inoculate againstrootkit installation
MS Strider GhostBuster
  • detect rootkits that hookor subvert Window API functions
  • booting to “clean” media (a bootableWindows CD that is uninfected) and running the same query, you can then perform a “diff ”between the two outputs and determine what is hidden
ProDiscover
  • ProDiscover Incident Response (IR) edition includes functionality to assist the investigator in examining systems for rootkitsduring incident response activities
  • The investigator can attempt to locate unseen processes and filesas well as collect some information with regard to the active process list and system statevia the menu system in ProDiscover IR.
  • The ProScript API allows a bit more granularityand flexibility in the information that can be collected as well as how it is managed.
F-Secure BlackLight
  • detects objects hidden by rootkit technologies and provides the user with an opportunity to eliminate or remove the offending software.
  • BlackLight ships as an executableand does not include an installation program
Sophos Anti-Rootkit
  • can be usedto scan the infrastructure, in addition to single hosts, for rootkits, as well as remove them
  • Anti-Rootkit scans the system for hidden processes, Registry keys, and files on the localhard drives

Postmortem Detection

  • One method of postmortem detection of rootkits is to mount the image as a virtual file system on your analysis system using a tool such as Smart Mountor Mount Image Pro allowing the files to be readas a file system without engaging the operating system from the image to do so.

  • Mount the drive as read-only. It is read-only so that it can't be changed. From here,you can run any number of antivirus tools against the files in the image. The files within the image appear as just that—files. None of the processes and services from the image are running, so the rootkit will not be engaged, and the kernel of the analysis system is not subverted.

Another method that quickly check for the presence of a rootkit in an acquired image is to access the Registry Viewer within ProDiscover and navigate to the Services key in each available ControlSet.
  • Navigate to Services key, sort entries by LastWritetime. Rootkit driver installation will stand out with one or two entries on a specific date. (This value doesn't always correspond)This LastWritetime doesn’t always correspond to the dates provided in an incident report, but in most cases they will stand out like a sore thumb.
  • If the investigator dumps the contents of physical memory and quickly analyzes it, the system might still be running, but the analysis will actually occur on a snapshot of RAM.
    • By collecting the contents of RAM and searching for EPROCESS blocks, you can compare the processes that have not exited with those visible in the active process list to determine which, if any, were hidden by a rootkit

Prevention

  • The first step to rootkit detection is prevention, performed through system configuration and hardening, vulnerability testing, and so on, all of which is beyond the scope of this book.Taking a minimal approach to system configuration to prevent unauthorized access can help to prevent a rootkit from being installed properly.

OSI MODEL

  • The Open Systems Interconnect (OSI) model was developed circa 1981 by the International Standards Organization (ISO).
  • The OSI model comprises seven functional layers, which provide the basis for communication among computers overnetworks.The seven layers of the OSI model, from highest to lowest, are Application,Presentation, Session, Transport, Network, Data Link, and Physical (you caneasily remember them, using the mnemonic phrase All People Seem To NeedData Processing).

ICMP ATTACKS

  • The ICMP protocol is also used to investigate network performance. Even though analysts are using the ICMP most of the time, hackers will put their dirty hands to target machines via ICMP attacks.
  • An ICMP flood, a Smurf attack, and a ping of death attack are used to overwhelm a network device and prohibit regular performance.

TYPES OF ATTACK

  • ICMP Tunneling
  • ICMP Router Discovery
  • Smurf attack
  • Fraggle Attack
  • ICMP flood attack
  • Ping of death attack
  • Information Gathering
  • Trace Route
  • Port Scan
  • OS fingerprinting
  • Teardrop
ICMP Tunneling:
  • ICMP tunneling is a command-and-control (C2) attack mechanism that sends hostile traffic via perimeter defenses while remaining undetected.
  • Malicious data is buried within normal-looking ICMP echo requests and echo replies as it passes through the tunnel.
  • Because ICMP is a trusted protocol that aids administrators, it’s common for ICMP messages to pass through firewalls and network segments that generally block inbound and outbound harmful traffic.
How to Detect ICMP Tunneling
  • It can be difficult to detect ICMP tunnel traffic.
  • Keep an eye on your network traffic for unusually high ICMP traffic volumes and non-standard or odd ICMP datagram sizes.
How to Prevent ICMP Tunneling
  • Since ICMP is important for maintaining stable network connections, limiting all ICMP traffic can be problematic.
  • Threat intelligence-identified malicious endpoints and domains can be blocked at the perimeter.
  • Firewalls can also be configured to prevent outbound pings to external endpoints and only allow fixed-sized ICMP packets through.
ICMP Router Discovery:
  • The IP address of surrounding routers is discovered via the ICMP router discovery protocol.
  • “Router Advertisements” or “Router Solicitations” are the ICMP router discovery messages.
  • Attack: Spoofing ICMP router discovery messages allows attackers to remotely add bogusroute entries to a victim’s routing table. As a result, the frames would be forwarded to the erroneous address, and the victim’s system would be unable to connect to othernetworks
Mitigation:

Blocking all type 9 and type 10 ICMP packets is one of two techniques used to prevent ICMP route finding.

Smurf attack
  • An attacker uses a spoofed or forged IP address to send an ICMP packet in a Smurf attack. When network equipment responds, each response is forwarded to the falsified IP address, inundating the target with ICMP packets.
  • Smurf attack security measures: Filters should be applied on L3 devices to prevent them from responding to broadcast addresses. And to prevent address spoofing, implement filters on routers and firewalls.
Fraggle Attack
  • The Fraggle attack is similar to the Smurf attack, except instead of using the ICMP protocol, it uses the UDP protocol.
  • The defense against these attacks is nearly comparable to the defense against Fraggle attacks.
ICMP flood attack
  • An ICMP flood bombards the target resource with ICMP Echo Request (ping) packets, sending them as quickly as possible and without waiting for responses.
Ping of death attack:
  • The attacker sends repeated faulty or malicious pings to a computer in a ping of death (POD) assault.
  • The packet is broken before being transferred from source to destination. The fragments must be placed back together at the destination point.
Information Gathering
  • Sending an ICMP echo request (type 8) to target hosts should prompt them to react with ICMP echo reply messages is a standard approach to discover hosts on the network.
TraceRoute
  • Traceroute is a network diagnostic tool used to track in real-time the pathway taken by a packet on an IP network from source to destination, reporting the IP addresses of all the routers it pinged in between.
Port Scan
  • There are a variety of scanners on the market that use ICMP to determine whether a port is open or not.
  • ICMP Error Messages (Protocol/Port Unreachable) can be used to determine which IP addresses or LAN segments have open ports.
OS fingerprinting
  • Each Windows and Linux family uses a separate fingerprinting approach. Fingerprinting is a technique for determining the type of operating system a server is running by examining the ICMP packet response.
    (if the ICMP reply contains a TTL value of 128 or 64, it is a Windows machine); otherwise, TTL value of 128 or 64, it is a Linux machine
Teardrop
  • On the Internet, this form of attack is more widespread, and precautions must be made to protect against it. When a machine is exposed to a teardrop attack, it will crash or reboot.
  • The fragments must be placed back together at the destination point. Teardrop, on the other hand, results in overlapping fields in the IP fragments. When the destination attempts to reassemble them, it is unable to do so, and if it does not know how to join these packet pieces, it will fail rapidly.

FOOTPRINT

  • Footprints refer to the imprints left by the person walking. They play a very crucial role in the forensic analysis of the crime scene.
  • It helps to identify all the individuals present at the commission of a crime.
  • In the modern Internet, whenever you visit a website, send an e-mail, pay for a transaction or download an image you leave behind data called a digital footprint.
  • In simpler terms, this means leaving a trail of your activity on the Internet.
  • Systems administrators create logs that can track activities like visiting a website by IP address and replying to messages by e-mail address.
  • Unfortunately, cybercriminals can also use the information from a user’s digital footprints for their own devious means.

Search and Seizer in Cyber Crime investigation

  • The Cybercrime has no physical boundaries. The criminals seeking information stored in computers with dial-in-access can access the information virtually from anywhere.

Steps for the Search:

  • Labelling & Photographing the Set-up: IO is supposed to take some general photographs of the search place to document its pre-search condition for legal purposes, and to provide it as a reference during investigation. This documentation may prove essential when the system will be re-connected in the Forensic Laboratory. The IO should make sure to get close-ups of the front and back of all equipment and the way it is connected.
  • Labelling all Parts: The IO is supposed to label each part before he starts dismantling any of the equipment. All the connectors and plugs at both ends, the computer are supposed to be labelled so that re-assembly is easy and accurate.
  • Power System Down: If a computer is off, it should not be turned on. Hackers can make those computers erase data if a particular disk is not in the drive when the machine is booted up or if a particular password is not entered. One should check before turning off, if it is on, otherwise it may destroy data. The IO needs to shut the machine down through the operating system rather than just pulling the plug or he can instead disconnect it from the back of the machine, this is because if the machine is plugged into a back-up power supply it may initiate a shutdown process that could destroy files.
  • Dismantle the System: The system can be dismantled into separate components for transportation, once it is labeled and powered down. If a computer is at a business location and a part of a network, then a proper procedure should be followed to properly disconnect the computer from the network.
  • Seize Documentation: All manuals for the computer, its peripheral devices, and especially the software and operating system are seized. The examiners at the Forensic Laboratory need to refer to the manual to know the kind of hardware and its technicalities. Other documents like notes, passwords, and journals are also seized. Sticky notes, or other pieces of paper around the computer that may have passwords or login ID’s written on them, are also supposed to be seized.These are the techniques to search and seizer in investigation of cyber crime.

DRIVE BY DOWNLOAD

  • Drive by download assaults are precisely defined as malicious software installations on your devices that happen without your knowledge. This also applies to the unintentional downloading of any files or software bundles onto a computer system.
  • A drive-by download is a cyber-attack that unintentionally downloads malicious code onto a computer or mobile device that exposes the users to conduct one or more of the following things:
    Configure IoT devices like PCs and other tech. Analyzes all activity and traffic, both inbound and outbound. Destroys, alters, or renders your device inoperable.

Types of Drive By Download Attack

  • Malicious Ads: Ads that contain malicious code can be displayed by attackers who have gained access to ad networks. When a victim visits a website where the ads are displayed, the ads may then spread the infection to the victim’s device.
  • Exploit Kits: An intruder can use an exploit kit to take advantage of a victim’s device by gathering an inventory of software flaws, Attackers can send exploit tools via email or a website that links to a fake site.
  • Watering hole threats: Attackers may gain access to an online resource that is commonly used by a particular target market, and site visitors who engage with it may unknowingly download malware to their devices.
  • Cross-site scripting (XSS) assaults: When a website is compromised, malicious code is injected into it by attackers so that it can run when a target accesses it.
  • Phishing attacks: Attacks referred to as “phishing” entail tricking victims into opening a file or clicking on a link that downloads software. This may occur via email, social media, or other communications services.

OWASP

  • OWASP basically stands for the Open Web Application Security Project, it is a non-profit global online community consisting of tens of thousands of members and hundreds of chapters that produces articles, documentation, tools, and technologies in the field of web application security.
  • The OWASP Top 10 is a regularly-updated report outlining security concerns for web application security, focusing on the 10 most critical risks.

The top 10 OWASP vulnerabilities in 2020 are:

  1. Injection
  2. Broken Authentication
  3. Sensitive Data Exposure
  4. XML External Entities (XXE)
  5. Broken Access control
  6. Security misconfigurations
  7. Cross-Site Scripting (XSS)
  8. Insecure Deserialization
  9. Using Components with known vulnerabilities
  10. Insufficient logging and monitoring.

1. Injection

  • Injection vulnerabilities occur when an attacker uses a query or command to insert untrusted data into the interpreter via SQL, OS, NoSQL, or LDAP injection.
  • Injection attacks can be prevented by Using safer API which avoids the use of the interpreter, Using parameterized queries when coding Segregating commands from data to avoid exposure to attacks

2. Broken Authentication

  • Broken Authentication is a vulnerability that allows an attacker to use manual or automatic methods to try to gain control over any account they want in a system. In worse conditions, they could also gain complete control over the system.
    Broken authentication attacks can be prevented by
    Implementing multi-factor authentication, Protecting user credentials, Sending passwords over encrypted connections

3. Sensitive Data Exposure

  • This vulnerability is one of the most widespread vulnerabilities on the OWASP list and it occurs when applications and APIs don’t properly protect sensitive data such as financial data, social security numbers, usernames, and passwords, or health information, and this enables attackers to gain access to such information and commit fraud or steal identities.
    Sensitive data exposure attacks can be prevented by Using the secure URL’s Using strong and unique passwords Encrypting all sensitive information that does need to be stored

4. XML External Entities (XXE)

  • This vulnerability occurs for web applications that parse XML input. It happens when poorly configured XML processors evaluate external entity references within the XML documents and send sensitive data to an unauthorized external entity, i.e., a storage unit such as a hard drive.
  • XXE attacks can be prevented by Using less complex data formats such as JSON Keeping XML processors and libraries upgraded Using SAST tools

5. Broken Access Controls

  • This vulnerability occurs when there is broken access to resources, it means there are some improperly configured missing restrictions on authenticated users which allows them to access unauthorized functionality or data like access to others accounts, confidential documents, etc.
  • Broken access control attacks can be prevented by Deleting accounts that are no longer needed or are not active Shutting down unnecessary services to reduce the burden on servers Using penetration testing

6. Security Misconfiguration

  • It is estimated that up to 95% of cloud breaches are the result of human errors and this fact leads us to the next vulnerability called security misconfiguration. This vulnerability refers to the improper implementation of security intended to keep application data safe.
  • Security misconfiguration attacks can be prevented by Using Dynamic application security testing (DAST) Disabling the use of default passwords Keeping an eye on cloud resources, applications, and servers

7. Cross-Site Scripting (XSS)

  • This is also a widespread vulnerability that almost affects 53% of all web applications. XSS vulnerability allows a hacker to inject malicious client-side scripts into a website and then use the web application as an attack vector to hijack user sessions, or redirecting the victim to malicious websites.
    Using appropriate response headers Filtering the input and encoding the output Using the content security policy Applying a zero-trust approach to user input

8. Insecure Deserialization

  • Insecure Deserialization vulnerability allows an attacker to remotely execute code in the application, tamper or delete serialized (written to disk) objects, conduct injection attacks, replay attacks, and elevate privileges. This attack is also known as untrusted Deserialization. It is a serious application security issue that affects most of the modern systems
  • Insecure Deserialization attacks can be prevented by Implementing digital signatures. Using penetration testing. Isolating the code that deserializes and running it in low privilege environments to prevent unauthorized actions

9. Using Components with known vulnerabilities

  • Nowadays there are many open-source and freely available software components (libraries