Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/signatures/windows/network_c2_etherhiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def on_call(self, call, process):
# Look for the JSON-RPC payload format
if '"jsonrpc"' in buffer_lower and '"method"' in buffer_lower:
if (
'"eth_call"' in buffer_lower
or '"eth_gettransactionbyhash"' in buffer_lower
or '"eth_getstorageat"' in buffer_lower
"eth_call" in buffer_lower
or "eth_gettransactionbyhash" in buffer_lower
or "eth_getstorageat" in buffer_lower
Comment on lines +65 to +67

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While removing the double quotes from the Ethereum method names (e.g., changing '"eth_call"' to "eth_call") allows matching them when quotes are escaped, single-quoted, or omitted, the outer check on line 63 still strictly requires double quotes:

if '"jsonrpc"' in buffer_lower and '"method"' in buffer_lower:

If the encoding issue affects the quotes around the method names, it is highly likely to also affect the quotes around "jsonrpc" and "method". As a result, this fix is incomplete and the signature will still fail to match in those scenarios.

To fully resolve this, please also update the outer check on line 63 to not require double quotes (e.g., "jsonrpc" in buffer_lower and "method" in buffer_lower).

Additionally, we can simplify the method check using any() for better readability.

Suggested change
"eth_call" in buffer_lower
or "eth_gettransactionbyhash" in buffer_lower
or "eth_getstorageat" in buffer_lower
any(m in buffer_lower for m in ("eth_call", "eth_gettransactionbyhash", "eth_getstorageat"))

):
proc_name = process.get("process_name", "unknown")

Expand Down
Loading