Skip to content

Commit 9f77377

Browse files
committed
beta release
1 parent 187978c commit 9f77377

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.vscode/
2-
quarantine/
3-
yara-signatures/
2+
quarantine/*
3+
yara-signatures/*

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ _go-yara_ and CGO compilation. You'll find a detailed documentation [here](READM
3131

3232
### Usage
3333
```
34-
usage: IRMA [-h|--help] [-y|--yara-rules "<value>"] [-d|--dump "<value>"]
34+
usage: irma [-h|--help] [-y|--yara-rules "<value>"] [-d|--dump "<value>"]
3535
[-q|--quarantine "<value>"] [-k|--kill] [-f|--faker]
36-
[-a|--aggressive] [-n|--notifications] [-v|--verbose]
36+
[-n|--notifications] [-v|--verbose]
37+
38+
Incident Response - Minimal Analysis
3739
3840
Arguments:
3941
@@ -42,16 +44,14 @@ Arguments:
4244
recursively). Default: ./yara-signatures
4345
-d --dump Dump all running process to the specified directory
4446
-q --quarantine Specify path to store matching artefacts in quarantine
45-
(Base64/RC4 with key: IRMA
47+
(Base64/RC4 with key: irma
4648
-k --kill Kill suspicious process ID (without removing process
4749
binary)
4850
-f --faker Spawn fake processes such as wireshark / procmon /
4951
procdump / x64dbg
50-
-a --aggressive Aggressive mode - remove suscpicious process executable
51-
/ track and remove PPID / remove schedule task & regkey
52-
persistence
5352
-n --notifications Use Windows notifications when a file or memory stream
5453
match your YARA rules
54+
-v --verbose Display every error and information messages
5555
```
5656

5757
## About this project and future versions

analysis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func FileAnalysis(path string, pQuarantine string, pKill bool, pAggressive bool,
5151
// dump matching file to quarantine
5252
if len(pQuarantine) > 0 {
5353
log.Println("[INFO]", "Dumping file", path)
54-
err := QuarantineFile(filepath.Base(path), pQuarantine)
54+
err := QuarantineFile(path, pQuarantine)
5555
if err != nil {
5656
log.Println("[ERROR]", "Cannot quarantine file", path, err)
5757
}

main.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func main() {
2828

2929
// create mutex to avoid program running multiple instances
3030
if _, err = CreateMutex("irmaBinMutex"); err != nil {
31+
log.Println("Only one instance or irma can be launched")
3132
os.Exit(1)
3233
}
3334

@@ -37,9 +38,12 @@ func main() {
3738
pQuarantine := parser.String("q", "quarantine", &argparse.Options{Required: false, Help: "Specify path to store matching artefacts in quarantine (Base64/RC4 with key: irma"})
3839
pKill := parser.Flag("k", "kill", &argparse.Options{Required: false, Help: "Kill suspicious process ID (without removing process binary)"})
3940
pFaker := parser.Flag("f", "faker", &argparse.Options{Required: false, Help: "Spawn fake processes such as wireshark / procmon / procdump / x64dbg"})
40-
pAggressive := parser.Flag("a", "aggressive", &argparse.Options{Required: false, Help: "Aggressive mode - remove suscpicious process executable / track and remove suspicious PPID / remove schedule task & regkey persistence"})
4141
pNotifications := parser.Flag("n", "notifications", &argparse.Options{Required: false, Help: "Use Windows notifications when a file or memory stream match your YARA rules"})
42-
pVerbose := parser.Flag("v", "verbose", &argparse.Options{Required: false, Help: "Display every error"})
42+
pVerbose := parser.Flag("v", "verbose", &argparse.Options{Required: false, Help: "Display every error and information messages"})
43+
44+
// TODO : working on aggressive mode - it will remove suscpicious process executable / track and remove suspicious PPID / remove schedule task & regkey persistence
45+
//pAggressive := parser.Flag("a", "aggressive", &argparse.Options{Required: false, Help: "Aggressive mode - remove suscpicious process executable / track and remove suspicious PPID / remove schedule task & regkey persistence"})
46+
pAggressive := false
4347

4448
err = parser.Parse(os.Args)
4549
if err != nil {
@@ -68,12 +72,12 @@ func main() {
6872
}
6973
log.Println("[INIT]", len(rules.GetRules()), "YARA rules compiled")
7074
log.Println("[INFO] Start scanning Memory / Registry / StartMenu / Task Scheduler / Filesystem")
71-
go MemoryAnalysisRoutine(*pDump, *pQuarantine, *pKill, *pAggressive, *pNotifications, *pVerbose, rules)
72-
//go RegistryAnalysisRoutine(*pQuarantine, *pKill, *pAggressive, *pNotifications, *pVerbose, rules)
73-
//go StartMenuAnalysisRoutine(*pQuarantine, *pKill, *pAggressive, *pNotifications, *pVerbose, rules)
74-
//go TaskSchedulerAnalysisRoutine(*pQuarantine, *pKill, *pAggressive, *pNotifications, *pVerbose, rules)
75-
//go WindowsFileSystemAnalysisRoutine(*pQuarantine, *pKill, *pAggressive, *pNotifications, *pVerbose, rules)
76-
//go UserFileSystemAnalysisRoutine(*pQuarantine, *pKill, *pAggressive, *pNotifications, *pVerbose, rules)
75+
go MemoryAnalysisRoutine(*pDump, *pQuarantine, *pKill, pAggressive, *pNotifications, *pVerbose, rules)
76+
go RegistryAnalysisRoutine(*pQuarantine, *pKill, pAggressive, *pNotifications, *pVerbose, rules)
77+
go StartMenuAnalysisRoutine(*pQuarantine, *pKill, pAggressive, *pNotifications, *pVerbose, rules)
78+
go TaskSchedulerAnalysisRoutine(*pQuarantine, *pKill, pAggressive, *pNotifications, *pVerbose, rules)
79+
go WindowsFileSystemAnalysisRoutine(*pQuarantine, *pKill, pAggressive, *pNotifications, *pVerbose, rules)
80+
go UserFileSystemAnalysisRoutine(*pQuarantine, *pKill, pAggressive, *pNotifications, *pVerbose, rules)
7781

7882
for true {
7983
time.Sleep(3600 * time.Second)

0 commit comments

Comments
 (0)