-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Java support (particularly credential stealers) (#679)
* Initial support for Java * run gofumpt * Initial support for Java * rename rule
- Loading branch information
1 parent
6d0a8e4
commit c1a5736
Showing
88 changed files
with
469 additions
and
41 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
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
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
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
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,11 @@ | ||
rule minecraft_feather: high { | ||
meta: | ||
description = "accesses Minecraft credentials (Feather)" | ||
|
||
strings: | ||
$ = ".feather" | ||
$ = "accounts.json" | ||
condition: | ||
all of them | ||
} |
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,11 @@ | ||
rule minecraft_meteor: high { | ||
meta: | ||
description = "accesses Minecraft credentials (Meteor)" | ||
|
||
strings: | ||
$ = ".meteor-client" | ||
$ = "accounts.nbt" | ||
condition: | ||
all of them | ||
} |
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,68 @@ | ||
rule base64_encode: medium python { | ||
meta: | ||
description = "encode base64 strings" | ||
ref = "https://docs.python.org/3/library/base64.html" | ||
|
||
strings: | ||
$b64encode = "b64encode" | ||
condition: | ||
any of them | ||
} | ||
|
||
rule py_base64_encode: medium php { | ||
meta: | ||
description = "encode base64 strings" | ||
|
||
strings: | ||
$b64encode = "base64_encode" | ||
condition: | ||
any of them | ||
} | ||
|
||
rule ruby_base64_encode: medium ruby { | ||
meta: | ||
description = "encode base64 strings" | ||
|
||
strings: | ||
$b64encode = /[\._]encode64/ | ||
condition: | ||
any of them | ||
} | ||
|
||
rule urlsafe_encode64: medium ruby { | ||
meta: | ||
description = "encode base64 strings" | ||
ref = "https://ruby-doc.org/3.3.0/stdlibs/base64/Base64.html" | ||
|
||
strings: | ||
$urlsafe_encode64_ruby = "urlsafe_encode64" | ||
condition: | ||
any of them | ||
} | ||
|
||
rule powershell_encode: medium { | ||
meta: | ||
description = "encode base64 strings" | ||
ref = "https://learn.microsoft.com/en-us/dotnet/api/system.convert.frombase64string?view=net-8.0" | ||
|
||
strings: | ||
$ref = /System\.Convert[\]: ]+ToBase64String/ ascii | ||
condition: | ||
any of them | ||
} | ||
|
||
rule java_base64_encode: medium { | ||
meta: | ||
description = "encode base64 strings" | ||
|
||
strings: | ||
$ref = "Base64$Encoder" | ||
condition: | ||
any of them | ||
} |
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,11 @@ | ||
rule java_replacement_class: medium java { | ||
meta: | ||
description = "runtime override of a class" | ||
filetypes = "class,java" | ||
|
||
strings: | ||
$replace = "loadReplacementClass" | ||
condition: | ||
any of them | ||
} |
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
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,11 @@ | ||
rule userdata_crawler: high { | ||
meta: | ||
description = "crawls directories looking for application data" | ||
|
||
strings: | ||
$crawlCookies = "crawlUserData" | ||
$appdata = "appData" | ||
condition: | ||
filesize < 1MB and all of them | ||
} |
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
Oops, something went wrong.