Skip to content

Commit bca4c7a

Browse files
Merge pull request #1 from g0ldencybersec/newcc
New Color/Comments
2 parents 6674f43 + 14e2000 commit bca4c7a

File tree

3 files changed

+59
-22
lines changed

3 files changed

+59
-22
lines changed

LICENSE renamed to LICENSE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# MIT License
22

33
Copyright (c) 2023 g0lden
44

@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,52 @@
11
# EasyEASM
2+
23
EasyEASM repository for Black Hat Arsenal 2023
34

4-
# Description
5+
## Description
6+
57
Easy EASM is just that... the easiest to set-up tool to give your organization visibility into its external facing assets.
68

79
The industry is dominated by $30k vendors selling "Attack Surface Management," but OG bug bounty hunters and red teamers know the truth. External ASM was born out of the bug bounty scene. Most of these $30k vendors use this open-source tooling on the backend.
810

911
With ten lines of setup or less, using open source tools, and one button deployment, Easy EASM will give your organization a complete view of your online assets. Easy EASM scans you daily and alerts you via Slack or Discord on newly found assets! Easy EASM also spits out an Excel skeleton for a Risk Register or Asset Database! This isn't rocket science.. but it's USEFUL. Don't get scammed. Grab Easy EASM and feel confident you know what's facing attackers on the internet.
1012

11-
# Installation
13+
## Installation
14+
1215
```sh
1316
go install github.com/g0ldencybersec/EasyEASM/easyeasm@latest
1417
```
1518

16-
# Example Config file
17-
The tool will expect a configuration file named "config.yml" to be in the directory you are running from. An example of this yml file is below:
19+
## Example Config file
20+
21+
The tool expects a configuration file named `config.yml` to be in the directory you are running from.
22+
23+
Here is example of this yaml file:
24+
1825
```yaml
1926
# EasyEASM configurations
2027
runConfig:
2128
domains: # List root domains here.
2229
- example.com
2330
- mydomain.com
24-
slack: https://hooks.slack.com/services/DUMMYDATA/DUMMYDATA/RANDOM # Slack webhook url for slack notificaitions.
25-
discord: https://discord.com/api/webhooks/DUMMYURL/Dasdfsdf # Discord webhook for discord notifications.
26-
runType: fast # Set to either fast (Passive enum) or complete (Active enumeration).
31+
slack: https://hooks.slack.com/services/DUMMYDATA/DUMMYDATA/RANDOM # Slack webhook url for Slack notifications.
32+
discord: https://discord.com/api/webhooks/DUMMYURL/Dasdfsdf # Discord webhook for Discord notifications.
33+
runType: fast # Set to either fast (passive enum) or complete (active enumeration).
2734
activeWordList: subdomainWordlist.txt
2835
activeThreads: 100
2936
```
3037
31-
# Running the tool
32-
To run the tool, fill out the config file then simply run the easyeasm module:
38+
## Usage
39+
40+
To run the tool, fill out the config file: `config.yml`. Then, run the `easyeasm` module:
41+
3342
```sh
34-
$ ./easyeasm
43+
./easyeasm
3544
```
36-
After the run is complete you should see the output CSV (EasyEASM.csv) in the run directory. This can be added to your asset database and risk register!
45+
46+
After the run is complete, you should see the output CSV (`EasyEASM.csv`) in the run directory. This CSV can be added to your asset database and risk register!
47+
48+
## Warranty
49+
50+
## License
51+
52+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) for details.

easyeasm/main.go

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ import (
1212
)
1313

1414
func main() {
15+
// install required tools
1516
utils.InstallTools()
16-
// Parse the configuraton file
17+
18+
// print a banner
19+
banner := "\x1b[36m****************\n\nEASY EASM\n\n***************\x1b[0m\n"
20+
fmt.Println(banner)
21+
22+
// parse the configuration file
1723
cfg := configparser.ParseConfig()
1824

19-
// Check for previous run file
25+
// check for previous run file
2026
var prevRun bool
2127
if _, err := os.Stat("EasyEASM.csv"); err == nil {
2228
fmt.Println("Found data from previous run!")
@@ -30,20 +36,30 @@ func main() {
3036
prevRun = false
3137
}
3238

33-
// Fast run. This is passive enumeration only
39+
// check the run type specified in the config and perform actions accordingly
3440
if strings.ToLower(cfg.RunConfig.RunType) == "fast" {
41+
// fast run: passive enumeration only
42+
43+
// create a PassiveRunner instance
3544
Runner := passive.PassiveRunner{
3645
SeedDomains: cfg.RunConfig.Domains,
3746
}
47+
48+
// run passive enumeration and get the results
3849
passiveResults := Runner.RunPassiveEnum()
3950

51+
// remove duplicate subdomains
4052
Runner.Subdomains = utils.RemoveDuplicates(passiveResults)
4153
Runner.Results = len(Runner.Subdomains)
4254

43-
fmt.Printf("Found %d subdomains\n\n", Runner.Results)
55+
fmt.Printf("\x1b[31mFound %d subdomains\n\n\x1b[0m", Runner.Results)
4456
fmt.Println(Runner.Subdomains)
4557
fmt.Println("Checking which domains are live and generating assets csv...")
58+
59+
// run Httpx to check live domains
4660
Runner.RunHttpx()
61+
62+
// notify about new domains if prevRun is true
4763
if prevRun && strings.Contains(cfg.RunConfig.SlackWebhook, "https") {
4864
utils.NotifyNewDomainsSlack(Runner.Subdomains, cfg.RunConfig.SlackWebhook)
4965
os.Remove("old_EasyEASM.csv")
@@ -52,16 +68,19 @@ func main() {
5268
os.Remove("old_EasyEASM.csv")
5369
}
5470
} else if strings.ToLower(cfg.RunConfig.RunType) == "complete" {
55-
// PASSIVE
71+
// complete run: passive and active enumeration
72+
73+
// passive enumeration
5674
PassiveRunner := passive.PassiveRunner{
5775
SeedDomains: cfg.RunConfig.Domains,
5876
}
5977
passiveResults := PassiveRunner.RunPassiveEnum()
6078

79+
// remove duplicate subdomains
6180
PassiveRunner.Subdomains = utils.RemoveDuplicates(passiveResults)
6281
PassiveRunner.Results = len(PassiveRunner.Subdomains)
6382

64-
//ACTIVE
83+
// active enumeration
6584
ActiveRunner := active.ActiveRunner{
6685
SeedDomains: cfg.RunConfig.Domains,
6786
}
@@ -70,18 +89,19 @@ func main() {
7089

7190
ActiveRunner.Subdomains = utils.RemoveDuplicates(activeResults)
7291

73-
//ALTERX
92+
// permutation scan
7493
permutationResults := ActiveRunner.RunPermutationScan(cfg.RunConfig.ActiveThreads)
7594
ActiveRunner.Subdomains = append(ActiveRunner.Subdomains, permutationResults...)
76-
7795
ActiveRunner.Subdomains = utils.RemoveDuplicates(ActiveRunner.Subdomains)
7896
ActiveRunner.Results = len(ActiveRunner.Subdomains)
7997

80-
//HTTPX
98+
// httpx scan
8199
fmt.Printf("Found %d subdomains\n\n", ActiveRunner.Results)
82100
fmt.Println(ActiveRunner.Subdomains)
83101
fmt.Println("Checking which domains are live and generating assets csv...")
84102
ActiveRunner.RunHttpx()
103+
104+
// notify about new domains if prevRun is true
85105
if prevRun && strings.Contains(cfg.RunConfig.SlackWebhook, "https") {
86106
utils.NotifyNewDomainsSlack(ActiveRunner.Subdomains, cfg.RunConfig.SlackWebhook)
87107
os.Remove("old_EasyEASM.csv")
@@ -90,7 +110,7 @@ func main() {
90110
os.Remove("old_EasyEASM.csv")
91111
}
92112
} else {
113+
// invalid run mode specified
93114
panic("Please pick a valid run mode and add it to your config.yml file! You can set runType to either 'fast' or 'complete'")
94115
}
95-
96116
}

0 commit comments

Comments
 (0)