Skip to content

Commit 740e4f5

Browse files
author
ecstatic-nobel
committed
Initial commit
0 parents  commit 740e4f5

File tree

386 files changed

+132541
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+132541
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 leunammejii
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# [OSweep™]
2+
##### Don't Just Search OSINT. Sweep It.
3+
4+
#### Description
5+
If you work in a IT security, then you most likely use OSINT to help understand what it is that your SIEM alerted you on and what everyone else in the world understands about it. More than likely, you are using more than one website because most of the time OSINT will only provide you with reports based on the last analysis of the IOC. For some, that's good enough. They create network and email blocks, create new rules for their IDS/IPS, update the content in the SIEM, create new alerts for monitors in Google Alerts and DomainTools, etc etc. For others, they perform deploy these same countermeasures based on provided reports from their third-party tool that the company is paying THOUSANDS of dollars for. The problem with both of these it that the analyst needs to dig a little deeper (ex. FULLY deobfuscate a PowerShell command found in a malicious macro) to gather all of the IOCs. And what if the additional IOC(s) you are basing your on has nothing to do with what is true today? And then you get pwned? Then other questions arise...
6+
7+
See where this is headed? You're about to get a pink slip and walked out of the building so you can start looking for another job in a different line of work.
8+
9+
So why did you get pwned? Because if wasted time gathering all the IOCs for that one alert manually, it would have taken you half of your shift to complete and you would've got pwned regardless.
10+
11+
The fix? **OSweep™**.
12+
13+
#### Prerequisites
14+
- Splunk
15+
16+
#### Setup
17+
Open a terminal and run the following commands:
18+
```bash
19+
cd /opt/splunk/etc/apps
20+
git clone https://github.com/leunammejii/osweep.git
21+
/opt/splunk/bin/splunk restart
22+
```
23+
24+
#### Commands
25+
- crtsh
26+
- cybercrimeTracker
27+
- ransomwareTracker
28+
- threatcrowd
29+
- urlhaus
30+
- urlscan
31+
32+
#### Usage
33+
##### ![crt.sh](https://crt.sh/ "Discover certificates by searching all of the publicly known Certificate Transparency (CT) logs.") - Dashboard
34+
1. Switch to the ![crt.sh](https://crt.sh/ "Discover certificates by searching all of the publicly known Certificate Transparency (CT) logs.") dashboard in the OSweep™ app.
35+
2. Add the list of domains to the 'Domain (+)' textbox.
36+
3. Select 'Yes' or 'No' from the 'Wildcard' dropdown to search for subdomains.
37+
4. Click 'Submit'.
38+
39+
![crtsh Wildcard Search](https://github.com/leunammejii/osweep/blob/master/static/assets/crtsh_dashboard.png)
40+
41+
##### ![crt.sh](https://crt.sh/ "Discover certificates by searching all of the publicly known Certificate Transparency (CT) logs.") - Adhoc
42+
```
43+
| crtsh <DOMAINS>
44+
| table "Issuer CA ID", "Issuer Name", "Name Value", "Min Cert ID", "Min Entry Timestamp", "Not Before", "Not After", Invalid
45+
| sort - "Min Cert ID"
46+
```
47+
48+
or to search for subdomains,
49+
50+
```
51+
| crtsh wildcard <DOMAINS>
52+
| table "Issuer CA ID", "Issuer Name", "Name Value", "Min Cert ID", "Min Entry Timestamp", "Not Before", "Not After", Invalid
53+
| sort - "Min Cert ID"
54+
```
55+
56+
![crtsh Wildcard Search](https://github.com/leunammejii/osweep/blob/master/static/assets/crtsh_wildcard_adhoc.png)
57+
58+
##### ![CyberCrime Tracker](http://cybercrime-tracker.net/index.php "Better understand the type of malware a site is hosting.") - Dashboard
59+
1. Switch to the ![CyberCrime Tracker](http://cybercrime-tracker.net/index.php "Better understand the type of malware a site is hosting.") dashboard in the OSweep™ app.
60+
2. Add the list of domains to the 'Domain (+)' textbox.
61+
3. Select whether the results will be grouped and how from the dropdowns.
62+
4. Click 'Submit'.
63+
64+
![alt text](https://github.com/leunammejii/osweep/blob/master/static/assets/cybercrimeTracker_dashboard.png)
65+
66+
##### ![CyberCrime Tracker](http://cybercrime-tracker.net/index.php "Better understand the type of malware a site is hosting.") - Adhoc
67+
```
68+
| cybercrimeTracker <DOMAINS>
69+
| table Date URL IP "VT Latest Scan" "VT IP Info" Type Invalid
70+
```
71+
72+
##### ![Ransomare Tracker](https://ransomwaretracker.abuse.ch/tracker/ "Distinguish threats between ransomware botnet Command & Control servers (C&Cs), ransomware payment sites, and ransomware distribution sites.") - Dashboard
73+
1. Add the following cron jobs to the 'splunk' user's cron schedule:
74+
```bash
75+
*/5 * * * * /opt/splunk/etc/apps/osweep/bin/ransomware_tracker.py feed
76+
```
77+
2. Manually download URL dump
78+
```
79+
| ransomwareTracker feed
80+
```
81+
3. Switch to the ![Ransomare Tracker](https://ransomwaretracker.abuse.ch/tracker/ "Distinguish threats between ransomware botnet Command & Control servers (C&Cs), ransomware payment sites, and ransomware distribution sites.") dashboard in the OSweep™ app.
82+
4. Add the list of IOCs to the 'Domain, IP, Malware, Status, Threat, URL (+)'
83+
textbox.
84+
5. Select whether the results will be grouped and how from the dropdowns.
85+
6. Click 'Submit'.
86+
87+
![alt text](https://github.com/leunammejii/osweep/blob/master/static/assets/ransomwareTracker_dashboard.png)
88+
89+
##### ![Ransomare Tracker](https://ransomwaretracker.abuse.ch/tracker/ "Distinguish threats between ransomware botnet Command & Control servers (C&Cs), ransomware payment sites, and ransomware distribution sites.") - Adhoc
90+
```
91+
| ransomwareTracker <DOMAINS>
92+
| table "Firstseen (UTC)" Threat Malware Host "IP Address(es)" URL Status Registrar ASN(s) Country Invalid
93+
```
94+
95+
##### ![ThreatCrowd](https://www.threatcrowd.org/ "Quickly identify related infrastructure and malware.") - Dashboard
96+
1. Switch to the ![ThreatCrowd](https://www.threatcrowd.org/ "Quickly identify related infrastructure and malware.") dashboard in the OSweep™ app.
97+
2. Add the list of IOCs to the 'IP, Domain, or Email (+)' textbox.
98+
3. Select the IOC type.
99+
4. Click 'Submit'.
100+
101+
![alt text](https://github.com/leunammejii/osweep/blob/master/static/assets/threatCrowd_dashboard.png)
102+
103+
##### ![URLhaus](https://urlhaus.abuse.ch/ "Get insights, browse the URLhaus database and find most recent additions.") - Dashboard
104+
1. Add the following cron jobs to the 'splunk' user's cron schedule:
105+
```bash
106+
*/5 * * * * /opt/splunk/etc/apps/osweep/bin/urlhaus.py feed
107+
```
108+
2. Manually download URL dump:
109+
```
110+
| urlhaus feed
111+
```
112+
3. Switch to the ![URLhaus](https://urlhaus.abuse.ch/ "Get insights, browse the URLhaus database and find most recent additions.") dashboard in the OSweep™ app.
113+
4. Add the list of IOCs to the 'Domain, MD5, SHA256, URL (+)' textbox.
114+
5. Select whether the results will be grouped and how from the dropdowns.
115+
6. Click 'Submit'.
116+
117+
![alt text](https://github.com/leunammejii/osweep/blob/master/static/assets/urlhaus_dashboard.png)
118+
119+
##### ![URLhaus](https://urlhaus.abuse.ch/ "Get insights, browse the URLhaus database and find most recent additions.") - Adhoc
120+
```
121+
| urlhaus <IOCs>
122+
| table URL Payload "URLhaus Link" Invalid
123+
```
124+
125+
##### ![urlscan.io](https://urlscan.io/search/#* "Get a look at what a particular website is requesting in the background.") - Dashboard
126+
1. Switch to the ![urlscan.io](https://urlscan.io/search/#* "Get a look at what a particular website is requesting in the background.") dashboard in the OSweep™ app.
127+
2. Add the list of IOCs to the 'Domain, IP, SHA256 (+)' textbox.
128+
3. Select whether the results will be grouped and how from the dropdowns.
129+
4. Click 'Submit'.
130+
131+
![alt text](https://github.com/leunammejii/osweep/blob/master/static/assets/urlscan_dashboard.png)
132+
133+
##### ![urlscan.io](https://urlscan.io/search/#* "Get a look at what a particular website is requesting in the background.") - Adhoc
134+
```
135+
| urlscan <IOCs>
136+
| Table URL Domain IP PTR Server City Country ASN "ASN Name" Filename "File Size" "MIME Type" SHA256 Invalid
137+
```
138+
139+
#### Destroy
140+
To remove the project completely, run the following commands:
141+
```bash
142+
rm -rf /opt/splunk/etc/apps/osweep
143+
```
144+
145+
#### Things to know
146+
All commands accept input from the pipeline. Either use the `fields` or `table` command to select one field containing the values that the command accepts and pipe it to the command with the first argument being the field name.
147+
```
148+
<search>
149+
| fields <FIELD NAME>
150+
| <OSWEEP COMMAND> <FIELD NAME>
151+
```
152+
153+
ex. The following will allow a user to find other URLs analyzed by URLhaus that are hosting the same Lokibot malware as mytour[d]pk and group it by the payload:
154+
```
155+
| urlhaus mytour.pk
156+
| fields Payload
157+
| urlhaus Payload
158+
| stats values("URL") AS "URL" values(Invalid) AS Invalid BY "Payload"
159+
```
160+
161+
![alt text](https://github.com/leunammejii/osweep/blob/master/static/assets/input_from_pipeline.png)
162+
163+
You can also pipe the results of one command into a totally different command to correlate data.
164+
165+
![alt text](https://github.com/leunammejii/osweep/blob/master/static/assets/input_from_pipeline_correlation.png)
166+
167+
#### Dashboards Coming Soon
168+
- Alienvault
169+
- Censys
170+
- Cymon
171+
- Grey Noise
172+
- Hybrid-Analysis
173+
- Malshare
174+
175+
Please fork, create merge requests, and help make this better.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Metadata-Version: 1.1
2+
Name: HTMLParser
3+
Version: 0.0.2
4+
Summary: Backport of HTMLParser from python 2.7
5+
Home-page: http://github.com/PolicyStat/HTMLParser/
6+
Author: Jason Ward
7+
Author-email: jason.louard.ward@gmail.com
8+
License: BSD
9+
Description: HTMLParser
10+
==========
11+
12+
A copy of HTMLParser from python2.7 for use in python2.6
13+
Platform: any
14+
Classifier: Development Status :: 3 - Alpha
15+
Classifier: Programming Language :: Python
16+
Classifier: Intended Audience :: Developers
17+
Classifier: License :: OSI Approved :: BSD License
18+
Classifier: Operating System :: OS Independent
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
HTMLParser.py
2+
MANIFEST.in
3+
README.md
4+
setup.cfg
5+
setup.py
6+
HTMLParser.egg-info/PKG-INFO
7+
HTMLParser.egg-info/SOURCES.txt
8+
HTMLParser.egg-info/dependency_links.txt
9+
HTMLParser.egg-info/not-zip-safe
10+
HTMLParser.egg-info/top_level.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
../HTMLParser.py
2+
../HTMLParser.pyc
3+
SOURCES.txt
4+
not-zip-safe
5+
PKG-INFO
6+
top_level.txt
7+
dependency_links.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HTMLParser

0 commit comments

Comments
 (0)