[go: up one dir, main page]

0% found this document useful (0 votes)
40 views13 pages

Cyber Security Essentials Notes

Shellcode is a payload used to exploit software vulnerabilities, originally designed to spawn a shell but now capable of various tasks. It is written in assembly language and is platform dependent, facing challenges like avoiding NULL bytes and size constraints. Understanding shellcode is crucial for defending against cyber attacks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views13 pages

Cyber Security Essentials Notes

Shellcode is a payload used to exploit software vulnerabilities, originally designed to spawn a shell but now capable of various tasks. It is written in assembly language and is platform dependent, facing challenges like avoiding NULL bytes and size constraints. Understanding shellcode is crucial for defending against cyber attacks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Topic: Shellcode

Definition:
Shellcode is a small piece of code used as the payload in the exploitation of software vulnerabilities. Originally
designed to spawn a shell, modern shellcode can perform a wide range of tasks such as downloading files,
executing commands, or injecting malware.

Key Concepts:
- Purpose: Execute arbitrary code within a target process.
- Written in assembly language and injected into a vulnerable process.
- Platform dependent: Linux uses INT 0x80, Windows uses kernel32.dll.
- Challenges: Avoid NULL bytes, size constraints, alphanumeric encoding.
- Optimization: XOR operations, stage-loading, encoding.

Example:
MOV EBX, 0x00000000 ; Contains NULLs
XOR EBX, EBX ; NULL-free alternative

Tools:
- Metasploit Framework
- ShellForge

Detection:
- IDS/IPS
- Antivirus
- Emulation tools like libemu

Summary:
Shellcode is a powerful tool used in cyber attacks to gain control over systems. Understanding its structure and
behavior is essential for defending against exploitation.
Topic: Integer Overflow Vulnerabilities

Definition:
Occurs when an arithmetic operation exceeds the maximum limit of the data type used to store it.

Key Concepts:
- Signed vs Unsigned Integers
- Two?s Complement Representation
- Vulnerable operations: multiplication, addition, etc.

Examples:
Signed Overflow: 127 + 1 ? -128
Unsigned Overflow: 255 + 1 ? 0

Risks:
- Denial of Service
- Buffer Overflows
- Privilege Escalation

Mitigation:
- Input validation
- Safe integer libraries
- Compiler flags

Detection:
- Static analysis
- Monitoring

Summary:
Integer overflows can lead to serious security issues if exploited. Proper validation and safe coding practices are
essential.
Topic: Stack-Based Buffer Overflows

Definition:
Occurs when a program writes more data to a buffer on the stack than it can hold, potentially overwriting the
return address.

Key Concepts:
- Stack structure: ESP and EBP
- Overwriting return address with shellcode
- Use of NOP sleds

Example Layout:
[ Buffer ] [ NOPs ] [ Shellcode ] [ Overwritten Return Address ]

Risks:
- Arbitrary Code Execution
- Privilege Escalation

Mitigation:
- Bounds checking
- Stack canaries
- DEP and ASLR

Detection:
- Static analysis
- Monitoring

Summary:
Stack-based buffer overflows are dangerous vulnerabilities that require secure coding and system-level
protections.
Topic: Format String Vulnerabilities

Definition:
Occurs when user input is improperly used as a format string in functions like printf(), allowing attackers to
read or write memory.

Key Concepts:
- Format specifiers: %s, %d, %x, %n
- Exploits: reading stack memory, overwriting memory

Example:
printf(input); // Vulnerable
printf("%s", input); // Safe

Risks:
- Information Disclosure
- Arbitrary Code Execution

Mitigation:
- Use fixed format strings
- Compiler warnings
- Stack protections

Detection:
- Static analysis
- Monitoring

Summary:
Format string vulnerabilities can lead to memory leaks and code execution. Safe coding practices are essential.
Topic: SQL Injection

Definition:
A web security vulnerability that allows attackers to interfere with database queries by injecting malicious SQL
code.

Key Concepts:
- SQL operations: SELECT, INSERT, UPDATE, DELETE
- Injection via input fields or URLs

Examples:
SELECT * FROM users WHERE username = ' ' OR '1'='1';
SELECT * FROM users WHERE username = 'john'; DROP TABLE users;

Risks:
- Data Theft
- Authentication Bypass
- System Compromise

Mitigation:
- Input validation
- Parameterized queries
- Escaping inputs
- Least privilege
- WAFs

Detection:
- Log monitoring
- Penetration testing

Summary:
SQL Injection is a critical vulnerability that can be prevented with secure coding and input handling.
Topic: Malicious PDF Files

Definition:
Specially crafted PDFs that exploit vulnerabilities in PDF readers to execute harmful code.

Key Concepts:
- Embedded JavaScript or multimedia
- Exploiting parsing/rendering vulnerabilities

Examples:
Functions like collab.collectEmailInfo, util.printf, getAnnots

Risks:
- Remote Code Execution
- Data Theft

Mitigation:
- Disable JavaScript and multimedia
- Prevent auto-opening
- Use conversion tools
- Keep software updated

Detection:
- File analysis tools
- Monitoring

Summary:
Malicious PDFs are a serious threat. Disabling risky features and analyzing suspicious files are key defenses.
Topic: Race Conditions

Definition:
Occurs when multiple processes access shared resources simultaneously, leading to unpredictable outcomes.

Key Concepts:
- TOC/TOU (Time-of-Check to Time-of-Use)
- Multithreaded applications
- Shared memory and file systems

Examples:
File permission exploit, DNS race condition

Risks:
- Data corruption
- Privilege escalation

Mitigation:
- Atomic operations
- Locks and semaphores
- Avoid shared state

Detection:
- Monitoring
- Static analysis

Summary:
Race conditions are subtle vulnerabilities that require careful design and synchronization.
Topic: Web Exploit Tools

Definition:
Software packages used to automate exploitation of web browser vulnerabilities.

Key Concepts:
- Obfuscation and encoding
- Client profiling
- Redirection

Examples:
MPack, IcePack, Neosploit, WebAttacker

Commercial Models:
- Pay-Per-Install
- Pay-Per-Traffic
- Affiliate programs

Risks:
- Malware distribution
- Zero-day deployment

Mitigation:
- Software updates
- Security tools
- Domain blocking

Detection:
- Monitoring
- IDS/IPS

Summary:
Web exploit tools automate cyberattacks. Understanding their behavior is essential for defense.
Topic: Denial of Service (DoS) Conditions

Definition:
Occurs when a system becomes unavailable due to overwhelming traffic or resource exhaustion.

Key Concepts:
- Bandwidth consumption
- Resource starvation
- Application-level attacks

Examples:
SYN flood, Slowloris, DNS amplification

Risks:
- Service downtime
- Financial loss

Mitigation:
- Patch management
- Network defenses
- Monitoring

Detection:
- Traffic spikes
- Failed connections

Summary:
DoS conditions disrupt services and require layered defenses and active monitoring.
Topic: Cross-Site Scripting (XSS)

Definition:
Allows attackers to inject malicious scripts into web pages viewed by users.

Key Concepts:
- Stored, Reflected, DOM-based XSS
- Script execution in victim?s browser

Example:
http://example.com/search?q=<script>alert('XSS')</script>

Risks:
- Session hijacking
- Credential theft

Mitigation:
- Input validation
- Output encoding
- CSP
- HTTPOnly cookies

Detection:
- Suspicious scripts
- Security tools

Summary:
XSS is a common web vulnerability. Preventing it requires secure input/output handling.
Topic: Social Engineering

Definition:
Manipulation technique that exploits human psychology to gain unauthorized access.

Key Concepts:
- Phishing, Vishing, Smishing
- Impersonation, Tailgating, Pretexting

Example:
Attacker poses as IT support to extract credentials.

Risks:
- Credential theft
- Data breach

Mitigation:
- User training
- Verification protocols
- Incident reporting

Detection:
- Suspicious requests
- Unusual communication

Summary:
Social engineering targets people, not technology. Awareness and training are key defenses.
Topic: WarXing

Definition:
Searching for and mapping wireless networks by moving through physical locations.

Key Concepts:
- Uses laptops, GPS, antennas
- Detects SSID, signal strength, encryption

Tools:
- NetStumbler, Kismet, WiGLE

Risks:
- Unauthorized access
- Legal consequences

Mitigation:
- Strong encryption
- Network monitoring
- Physical security

Detection:
- Unknown devices
- Signal anomalies

Summary:
WarXing highlights the need for secure Wi-Fi configurations and monitoring.
Topic: DNS Amplification Attacks

Definition:
DDoS attack that uses DNS servers to flood a target with amplified traffic.

Key Concepts:
- Spoofed IP queries
- Large DNS responses
- Reflection via open DNS servers

Example:
Small query triggers large response to victim?s IP

Risks:
- Service outage
- Network congestion

Mitigation:
- Disable open recursion
- Rate limiting
- Ingress filtering

Detection:
- DNS traffic spikes
- Multiple responses to one IP

Summary:
DNS amplification is a powerful DDoS method. Securing DNS servers and filtering traffic are essential
defenses.

You might also like