Skip to content
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

Anti-VM: Screen Resolution #216

Open
Sqeegie opened this issue Sep 7, 2020 · 1 comment
Open

Anti-VM: Screen Resolution #216

Sqeegie opened this issue Sep 7, 2020 · 1 comment
Assignees

Comments

@Sqeegie
Copy link

Sqeegie commented Sep 7, 2020

While not a full-proof detection vector, using common default VM resolutions (I.e. 800x600 or 1024x768), could be a good test for default sandboxes.

https://www.bleepingcomputer.com/news/security/trickbot-malware-now-checks-screen-resolution-to-evade-analysis/

@gsuberland gsuberland self-assigned this Oct 20, 2020
@gsuberland
Copy link
Collaborator

Appears there are a bunch of potential artifacts we can use here:

  • SM_CXSCREEN / SM_CYSCREEN from GetSystemMetrics (primary screen size)
  • SM_CXVIRTUALSCREEN / SM_CYVIRTUALSCREEN from GetSystemMetrics (virtual desktop size, across all screens)
  • SM_REMOTECONTROL from GetSystemMetrics (reveals if the session is associated with an active terminal services session)
  • SPI_GETWORKAREA from SystemParametersInfo (size of the work area on the primary screen)
  • DISPLAY_DEVICE.DeviceString from EnumDisplayDevices (display device name)
  • EDID struct from from SetupDiEnumDeviceInfo / SetupDiOpenDevRegKey (all sorts of fun in here, needs some parsing)
  • HORZRES / VERTRES from GetDeviceCaps (screen size of target monitor handle)
  • DESKTOPHORZRES / DESKTOPVERTRES from GetDeviceCaps (desktop size of target monitor handle)
  • HORZSIZE / VERTSIZE from GetDeviceCaps (EDID-reported physical panel dimensions of target monitor handle)
  • LOGCOLORSPACE data from GetColorSpace / GetLogColorSpace (ICM profile data for target monitor handle)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants