forked from nanshihui/Scan-T
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
420 additions
and
240 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
spidermanage/spidertool/template_identify/poc_file/plugins/application/rsync/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
KEYWORDS = ['rsync', ] | ||
def rules(head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
|
||
|
||
if int(port) in [873] or productname.get('protocol','') in ['rsync']: | ||
return True | ||
else: | ||
|
||
return False |
58 changes: 58 additions & 0 deletions
58
spidermanage/spidertool/template_identify/poc_file/plugins/application/rsync/rsync_auth.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
from t import T | ||
|
||
import socket | ||
|
||
import time | ||
|
||
|
||
class P(T): | ||
def __init__(self): | ||
T.__init__(self) | ||
|
||
def verify(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
|
||
result = {} | ||
result['result']=False | ||
s=None | ||
|
||
|
||
try: | ||
|
||
payload = '\x40\x52\x53\x59\x4e\x43\x44\x3a\x20\x33\x31\x2e\x30\x0a' | ||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
socket.setdefaulttimeout(10) | ||
|
||
|
||
s.connect((ip, int(port))) | ||
s.sendall(payload) | ||
time.sleep(2) | ||
# server init. | ||
initinfo = s.recv(400) | ||
if "RSYNCD" in initinfo: | ||
s.sendall("\x0a") | ||
time.sleep(2) | ||
modulelist = s.recv(200) | ||
|
||
if len(modulelist) > 0: | ||
|
||
|
||
result['result'] = True | ||
result['VerifyInfo'] = {} | ||
result['VerifyInfo']['type'] = 'rsync unauth access vul' | ||
result['VerifyInfo']['URL'] = ip | ||
result['VerifyInfo']['Port'] = port | ||
|
||
result['VerifyInfo']['result'] = str(modulelist) | ||
|
||
|
||
except Exception,e: | ||
print e.text | ||
finally: | ||
if s is not None: | ||
s.close() | ||
return result | ||
if __name__ == '__main__': | ||
# print P().verify(ip='61.146.115.83',port='81') | ||
print P().verify(ip='118.244.21.121', port='873') |
40 changes: 40 additions & 0 deletions
40
spidermanage/spidertool/template_identify/poc_file/plugins/application/rsync/t.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
|
||
class T(object): | ||
def __init__(self): | ||
|
||
self.result = { | ||
'type': None, | ||
'version': None, | ||
} | ||
self.keywords = [] | ||
self.versions = [] | ||
def match_rule(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo='', **kw): | ||
## | ||
#head 返回的请求头 | ||
#context 返回请求正文html代码 | ||
#ip 请求ip | ||
#port 请求端口 | ||
#productname 请求的组件产品 | ||
#keywords 暂时已知的关键词组件 | ||
#hackinfo 备用字段 | ||
|
||
|
||
|
||
|
||
return True | ||
|
||
def verify(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
result = {} | ||
result['result']=False | ||
return result | ||
def attack(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
result = {} | ||
result['result']=False | ||
return result | ||
def parse_output(self, result): | ||
result = {} | ||
result['result']=False | ||
return result |
9 changes: 9 additions & 0 deletions
9
spidermanage/spidertool/template_identify/poc_file/plugins/component/redis/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
KEYWORDS = ['redis', ] | ||
def rules(head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
|
||
|
||
if int(port) in [6379] or productname.get('protocol','') in ['redis']: | ||
return True | ||
else: | ||
|
||
return False |
48 changes: 48 additions & 0 deletions
48
spidermanage/spidertool/template_identify/poc_file/plugins/component/redis/redis_unauth.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
from t import T | ||
|
||
import socket | ||
|
||
|
||
|
||
|
||
class P(T): | ||
def __init__(self): | ||
T.__init__(self) | ||
def verify(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
|
||
result = {} | ||
result['result']=False | ||
s=None | ||
|
||
|
||
try: | ||
|
||
payload = '\x2a\x31\x0d\x0a\x24\x34\x0d\x0a\x69\x6e\x66\x6f\x0d\x0a' | ||
s = socket.socket() | ||
socket.setdefaulttimeout(10) | ||
|
||
|
||
s.connect((ip, int(port))) | ||
s.send(payload) | ||
recvdata = s.recv(1024) | ||
if recvdata and 'redis_version' in recvdata: | ||
result['result'] = True | ||
result['VerifyInfo'] = {} | ||
result['VerifyInfo']['type'] = 'redis unauth access vul' | ||
result['VerifyInfo']['URL'] = ip | ||
result['VerifyInfo']['Port'] = port | ||
|
||
result['VerifyInfo']['result'] = recvdata | ||
|
||
|
||
except Exception,e: | ||
print e.text | ||
finally: | ||
if s is not None: | ||
s.close() | ||
return result | ||
if __name__ == '__main__': | ||
# print P().verify(ip='61.146.115.83',port='81') | ||
print P().verify(ip='121.41.28.130', port='7002') |
40 changes: 40 additions & 0 deletions
40
spidermanage/spidertool/template_identify/poc_file/plugins/component/redis/t.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
|
||
class T(object): | ||
def __init__(self): | ||
|
||
self.result = { | ||
'type': None, | ||
'version': None, | ||
} | ||
self.keywords = [] | ||
self.versions = [] | ||
def match_rule(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo='', **kw): | ||
## | ||
#head 返回的请求头 | ||
#context 返回请求正文html代码 | ||
#ip 请求ip | ||
#port 请求端口 | ||
#productname 请求的组件产品 | ||
#keywords 暂时已知的关键词组件 | ||
#hackinfo 备用字段 | ||
|
||
|
||
|
||
|
||
return True | ||
|
||
def verify(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
result = {} | ||
result['result']=False | ||
return result | ||
def attack(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): | ||
result = {} | ||
result['result']=False | ||
return result | ||
def parse_output(self, result): | ||
result = {} | ||
result['result']=False | ||
return result |