-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Screenshot Detection by Modifying capture-screenshot.yml #1007
base: master
Are you sure you want to change the base?
Changes from all commits
51bd126
4cd4879
52e3a3b
ea56ada
d258016
bb5a21f
1d7527a
aaebf44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ rule: | |
- [email protected] | ||
- "@_re_fox" | ||
- [email protected] | ||
- "Abhyuday K Hegde" | ||
scopes: | ||
static: function | ||
dynamic: span of calls | ||
|
@@ -17,15 +18,18 @@ rule: | |
- BFB9B5391A13D0AFD787E87AB90F14F5:0x1314610A | ||
- 7204e3efc2434012e13ca939db0d0b02:0x414070 | ||
- 50D5EE1CE2CA5E30C6B1019EE64EEEC2:0x406E07 | ||
- 0a30182ff3a6b67beb0f2cda9d0de678:0x407910 | ||
features: | ||
- or: | ||
# Classic GDI Capture | ||
- and: | ||
- or: | ||
- api: user32.GetWindowDC | ||
- api: user32.GetDC | ||
- and: | ||
- api: gdi32.CreateDC | ||
- string: "DISPLAY" | ||
- optional: | ||
- string: "DISPLAY" | ||
- or: | ||
- api: gdi32.BitBlt | ||
- api: gdi32.GetDIBits | ||
|
@@ -43,3 +47,31 @@ rule: | |
- and: | ||
- api: BitBlt | ||
- api: System.Drawing.Graphics::CopyFromScreen | ||
- and: | ||
- api: "SelectObject" | ||
- or: | ||
- api: "BitBlt" | ||
- api: "StretchBlt" | ||
- api: "PrintWindow" | ||
# GDI+ Graphics API chain | ||
- and: | ||
- api: "GdipCreateBitmapFromScan0" | ||
- api: "GdipGetImageGraphicsContext" | ||
- api: "GdipGetDC" | ||
# Direct GDI+ screen copy | ||
- and: | ||
- api: "Gdiplus::Graphics::FromHDC" | ||
- api: "Gdiplus::Graphics::CopyFromScreen" | ||
Comment on lines
+63
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these be api or function-name features? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @mike-hunhoff ! |
||
# DirectX method of screen capture | ||
- and: | ||
- or: | ||
- api: "PrintWindow" | ||
- api: "StretchBlt" | ||
- and: | ||
- api: "DwmGetDxSharedSurface" | ||
- optional: | ||
- string: "DXGI" | ||
- or: | ||
- api: "Direct3DCreate9" | ||
- api: "IDirect3DDevice9::GetFrontBufferData" | ||
Comment on lines
+75
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these be api or function-name features? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Over here too, Direct3DCreate 9 is a direct import of a dll file right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Furthermore, changing these features to function-name would require me to change the static scope of the rule to file. Would it not increase the number of false positives? |
||
- string: "IDirect3DSurface9::GetDC" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api features do not require ". Please remove the " from this api feature and all that follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'll remove the quotes!