Skip to content
Merged
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
3 changes: 1 addition & 2 deletions modules/signatures/windows/network_c2_etherhiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ def on_call(self, call, process):
# Dynamically grab the payload regardless of which networking API was used
buffer_data = (
self.get_argument(call, "buffer")
or self.get_argument(call, "lpBuffer")
or self.get_argument(call, "lpOptional")
or self.get_argument(call, "Buffer")
or self.get_argument(call, "Optional")
or self.get_argument(call, "PostData")
)
Comment on lines 51 to 56

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.

high

Removing lpBuffer and lpOptional will cause the signature to miss payloads transmitted via several key APIs listed in filter_apinames:\n\n* InternetWriteFile and WinHttpWriteData pass their payload buffer in the lpBuffer argument.\n* HttpSendRequestA/HttpSendRequestW and WinHttpSendRequest pass their POST/optional data in the lpOptional argument.\n\nBy removing these arguments, the signature will fail to retrieve the buffer data for these APIs, leading to false negatives. We should retain both lpBuffer and lpOptional alongside the newly added Optional and PostData to ensure comprehensive coverage across different API hooks and monitor versions.

        buffer_data = (\n            self.get_argument(call, "buffer")\n            or self.get_argument(call, "Buffer")\n            or self.get_argument(call, "lpBuffer")\n            or self.get_argument(call, "lpOptional")\n            or self.get_argument(call, "Optional")\n            or self.get_argument(call, "PostData")\n        )


Expand Down
Loading