-
Notifications
You must be signed in to change notification settings - Fork 0
/
onestopsoc.py
129 lines (93 loc) · 3.85 KB
/
onestopsoc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import PySimpleGUI as sg
import webbrowser
sg.theme('DarkAmber')
SYMBOL_UP = '▲'
SYMBOL_DOWN = '▼'
def collapse(layout, key):
'''collapse helper function'''
return sg.pin(sg.Column(layout, key=key))
def user_agent_fix(agent):
'''helper function for parsing useragent
replaces most characters with - so that the site can parse it
'''
fix = agent.lower()
fix = fix.replace('/','-')
fix = fix.replace('.','-')
fix = fix.replace(';','-')
fix = fix.replace(' ', '-')
fix = fix.replace('(','-')
fix = fix.replace(')','-')
fix = fix.replace('_','-')
fix = fix.replace(',','-')
fix = fix.replace('--','-')
return fix
section1 = [
[sg.Button('VirusTotal', key='-VT-'),
sg.Button('AbuseIPDB', key='-AIPDB-'),
sg.Button('AlienVault', key='-AV-', tooltip='Requires url/domain not IP'),
sg.Button('WhoIs', key='-WHOIS-'),
sg.Button('TOR Relay', key='-TOR-', tooltip='Requires url/domain not IP'),
sg.Button('URLScan', key='-URLSCAN-', tooltip='Requires url/domain not IP')
]
]
section2 = [
[sg.Button('MAC Lookup', key='-MAC-'),
sg.Button('UserAgent Lookup', key='-UA-'),
sg.Button('File.net', key='-FILENET-', tooltip='Filename'),
sg.Button('File Info', key='-FILEINFO-', tooltip='File extension'),
sg.Button('EventID', key='-EVENTID-'),
sg.Button('Decode Base64', key='-DECODE64-')
]
]
layout = [
[sg.Text('OneStopSOC')],
[sg.Text('Enter an IOA/IOC: '), sg.In(key='-INPUT-')],
# SECTION1
[sg.Text(SYMBOL_DOWN, enable_events=True, key='-OPENSEC1-'), sg.Text('IP/Domain/URL', enable_events=True, key='-OPENSEC1TEXT-')],
[collapse(section1, '-SEC1-')],
# SECTION2
[sg.Text(SYMBOL_DOWN, enable_events=True, key='-OPENSEC2-'), sg.Text('Tools', enable_events=True, key='-OPENSEC2TEXT-')],
[collapse(section2, '-SEC2-')],
]
window = sg.Window('OneStopSOC', layout)
opened1, opened2 = True, True
while True:
event, values = window.read()
input = values['-INPUT-']
if event == sg.WIN_CLOSED:
break
if event.startswith('-OPENSEC1-'):
opened1 = not opened1
window['-OPENSEC1-'].update(SYMBOL_DOWN if opened1 else SYMBOL_UP)
window['-SEC1-'].update(visible=opened1)
if event.startswith('-OPENSEC2-'):
opened2 = not opened2
window['-OPENSEC2-'].update(SYMBOL_DOWN if opened2 else SYMBOL_UP)
window['-SEC2-'].update(visible=opened2)
if event == '-VT-':
webbrowser.open(f'https://www.virustotal.com/gui/search/{input}', new=2)
if event == '-AIPDB-':
webbrowser.open(f'https://www.abuseipdb.com/check/{input}', new=2)
if event == '-AV-':
webbrowser.open(f'https://otx.alienvault.com/indicator/domain/{input}', new=2)
if event == '-WHOIS-':
webbrowser.open(f'https://www.whois.com/whois/{input}', new=2)
if event == '-TOR-':
webbrowser.open(f'https://metrics.torproject.org/rs.html#search/{input}', new=2)
if event == '-URLSCAN-':
webbrowser.open(f'https://urlscan.io/search/#{input}', new=2)
if event == '-MAC-':
webbrowser.open(f'https://maclookup.app/search/result?mac={input}', new=2)
if event == '-UA-':
fixedagent = user_agent_fix(input)
webbrowser.open(f'https://user-agents.net/string/{fixedagent}', new=2)
if event == '-FILENET-':
webbrowser.open(f'https://www.file.net/search.html?q=site:file.net+{input}', new=2)
if event == '-FILEINFO-':
webbrowser.open(f'https://fileinfo.com/extension/{input}', new=2)
if event == '-EVENTID-':
webbrowser.open(f'https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid={input}', new=2)
if event == '-DECODE64-':
fixedinput = input.replace('==', '')
webbrowser.open(f"https://cyberchef.org/#recipe=Magic(3,false,false,'')&input={fixedinput}", new=2)
window.close()