0% found this document useful (0 votes)
101 views3 pages

CPTS Exam Preparation Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views3 pages

CPTS Exam Preparation Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

# OSCP, PNTP, and CPTS Preparation Notes

## Reconnaissance, Enumeration, and Attack Planning

### Network Enumeration with Nmap


- **Nmap**: A key tool for network discovery and security auditing.
- Common scans:
- `nmap -sS [target]`: SYN scan, stealthy and fast.
- `nmap -sV [target]`: Service version detection.
- `nmap -O [target]`: OS detection.
- Common options:
- `-p-`: Scans all ports.
- `-A`: Aggressive scan with OS and version detection.

### Footprinting
- Initial information gathering about a target network or system.
- Techniques:
- DNS queries, WHOIS lookups, and Reverse DNS.
- Identifying IP ranges and subdomains.

### Information Gathering - Web Edition


- Tools and techniques to extract information from a web server or application.
- **Whois**: Domain registration info.
- **nslookup**: DNS lookup.
- **traceroute**: Network path discovery.
- **theHarvester**: Collects emails, subdomains, hosts, and usernames.

### Vulnerability Assessment


- Identifying and assessing vulnerabilities in systems.
- Common tools:
- **Nessus**
- **OpenVAS**
- **Nikto** (web server vulnerabilities)

### File Transfer


- Methods to transfer files to/from a compromised host.
- **Python HTTP Server**: `python3 -m [Link] [port]`
- **Netcat**: File transfer between machines.
- **SMB**: `smbclient` for Windows shares.

### Shells and Payloads


- Types of shells: Bind, reverse, staged, and unstaged payloads.
- Common tools:
- **Netcat** for reverse/bind shells.
- **Msfvenom**: Payload generation.

### Metasploit Framework


- Framework for developing and executing exploit code against a remote target.
- Commands: `search`, `use`, `set`, `exploit`
- Example exploit: `use exploit/multi/handler`

## Exploitation and Lateral Movement

### Password Attacks


- **Hydra** and **John the Ripper** for brute force attacks.
- Dictionary attacks, rainbow tables, and hashcat.

### Attacking Common Services


- **SMB, FTP, SSH, RDP**: Common services with known vulnerabilities.
- Tools: **Metasploit**, **nmap scripts**, **enum4linux**.

### Pivoting, Tunneling, and Port Forwarding


- Using compromised machines as stepping stones.
- **SSH tunneling**: `ssh -L [local_port]:[target]:[target_port] [user]@[host]`
- **Metasploit’s portfwd** command.

### Active Directory Enumeration and Attack


- Tools:
- **BloodHound** for visualizing AD relationships.
- **Impacket** suite for Kerberos and SMB attacks.

## Web Exploitation

### Using Web Proxies


- **Burp Suite**: Intercept, modify, and replay web traffic.

### Attacking Web Apps with Ffuf


- **Ffuf**: Fuzzing web directories and parameter brute forcing.

### Login Brute Forcing


- Brute-forcing login pages with **Hydra** or **Burp Intruder**.

### SQL Injection Fundamentals


- Identifying and exploiting SQL injection vulnerabilities.
- Basic Payloads: `' OR 1=1 --`, `UNION SELECT`

### SQLMap Essentials


- Automate SQL injection attacks: `sqlmap -u [URL] --batch --dump`

### XSS (Cross-Site Scripting)


- Payloads: `<script>alert('XSS')</script>`
- Types: Reflected, stored, and DOM-based XSS.

### File Inclusion


- **LFI (Local File Inclusion)**: `../../../../etc/passwd`
- **RFI (Remote File Inclusion)**: Including external files if enabled.

### File Upload Attack


- Exploiting file upload mechanisms to upload malicious files (e.g., web shells).

### Command Injection


- Running OS commands through vulnerable web parameters.

### Web Attack


- General attacks against web servers and applications, using tools like **Nikto**.

### Attacking Common Applications


- Targeting applications with known vulnerabilities (e.g., Wordpress, Joomla).

## Post Exploitation

### Windows Privilege Escalation


- **PowerUp** and **WinPEAS** for privilege escalation.
- Techniques: Vulnerable services, DLL hijacking, token impersonation.

### Linux Privilege Escalation


- **LinPEAS** and **gtfobins** for privilege escalation.
- Techniques: SUID binaries, misconfigured sudo rights.

Common questions

Powered by AI

Attacking web application files through LFI (Local File Inclusion) and RFI (Remote File Inclusion) vulnerabilities involves exploiting poorly managed input validation to include unintended files in execution. LFI uses paths like `../../../../etc/passwd` to access local files, potentially exposing sensitive data. RFI enables the inclusion of external files if the web application permits, often leading to remote code execution if malicious scripts are executed. These attacks are significant as they can lead to full server compromise, highlighting the importance of secure coding practices in input validation .

Exploiting SQL injection vulnerabilities typically involves inserting malicious SQL statements into an application's input fields, which can manipulate the backend database. Basic payloads like `' OR 1=1 --` or using `UNION SELECT` enable attackers to bypass authentication and extract data. SQLMap automates this process by methodically testing input fields for vulnerabilities and executing attack scenarios. It simplifies exploitation with commands like `sqlmap -u [URL] --batch --dump`, making the process efficient and accessible to penetration testers .

In a compromised network environment, secure file transfer is crucial to avoid detection. The use of encrypted connections and minimizing traces are essential strategies. Common methods include utilizing a Python HTTP server (`python3 -m http.server [port]`) to create a temporary web server for file download, Netcat for direct file transfer between machines, and SMB with `smbclient` to access Windows shares. These methods are subtle and reduce the risk of triggering security alerts .

Privilege escalation techniques differ based on the operating system's architecture and security features. In Windows environments, tools like PowerUp and WinPEAS exploit vulnerable services, DLL hijacking, and token impersonation to elevate privileges. In contrast, Linux privilege escalation often uses tools like LinPEAS and gtfobins, focusing on exploiting SUID binaries and misconfigured sudo rights. The differing privilege mechanisms in each OS necessitate tailored tools and approaches for successful privilege escalation .

Pivoting, tunneling, and port forwarding present both challenges and opportunities for lateral movement within networks during penetration testing. These techniques enable access to otherwise unreachable network segments by using a compromised host as a bridge. Challenges include maintaining stealth, managing network latency, and ensuring data integrity. Tactics involve using SSH tunneling (`ssh -L [local_port]:[target]:[target_port] [user]@[host]`) and Metasploit’s `portfwd` command to route traffic securely and efficiently. These methods allow testers to map network infrastructure and conduct further exploits beyond initial access points .

Proxy tools like Burp Suite play a strategic role in web exploitation by acting as intermediaries between a user's browser and web servers, allowing penetration testers to intercept, modify, and analyze web traffic. This capability enables testers to identify vulnerabilities such as reflected and stored XSS, SQL injections, and flawed authentication mechanisms. By modifying requests, testers can replicate potential attacks and assess the security posture of web applications effectively .

Vulnerability assessment is crucial in cybersecurity as it identifies and evaluates vulnerabilities in systems, mitigating potential risks before exploitation occurs. It is a proactive measure for enhancing security posture. Common tools used for vulnerability assessment include Nessus and OpenVAS, which provide a comprehensive analysis of vulnerabilities, and Nikto, specifically used for identifying web server vulnerabilities .

Fingerprinting plays a critical role in the reconnaissance phase by gathering baseline information about a target network or system. This information is vital for planning subsequent attack strategies. Common fingerprinting techniques include DNS queries, WHOIS lookups, reverse DNS, and identifying IP ranges and subdomains. These techniques provide attackers with an initial map of the target environment, which aids in identifying potential vulnerabilities .

Nmap enhances network enumeration by allowing security professionals to discover hosts and services on a computer network, providing information necessary for security auditing. Common scanning techniques include the SYN scan (`nmap -sS [target]`), which is stealthy and fast, service version detection (`nmap -sV [target]`), and operating system detection (`nmap -O [target]`). Additionally, options like `-p-` for all-port scans and `-A` for aggressive scanning help in gathering comprehensive data about the target network .

The Metasploit framework facilitates the development and execution of exploit code by serving as an extensive library of exploit scripts and auxiliary tools. It allows cybersecurity professionals to simulate real-world exploits safely and evaluate system defenses. Key commands within Metasploit include `search` to find exploits, `use` to select an exploit or module, `set` to configure options, and `exploit` to launch the exploit against a target. These commands streamline the process of exploitation and penetration testing, enhancing efficiency and capability .

You might also like