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

Variable vmk header #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LuemmelSec
Copy link

@LuemmelSec LuemmelSec commented Feb 11, 2024

ChatGPT version of trying to take variable VMK headers into concideration.
The header can actually look like this:
2c000[0-6]000[1-9]000[0-1]000[0-5]200000

I am not a programmer, would be cool if you could evaluate if this is okay or not.
Or if there is maybe even a more sexy way to do it.

Added a wait loop to only start with banner and sniffer once someonce connects to the serial port.
Also added blinking led, once the pico detects a USB serial connection as additional indicator that things are working.
ChatGPT version of trying to take variable VMK headers into concideration.
The header can actually look like this:
 2c000[0-6]000[1-9]000[0-1]000[0-5]200000

I am not a programmer, would be cool if you could evaluate if this is okay or not.
Or if there is maybe even a more sexy way to do it.
@segfault-bilibili
Copy link

The header can actually look like this:
2c000[0-6]000[1-9]000[0-1]000[0-5]200000

Do you have explanation for that?

@LuemmelSec
Copy link
Author

LuemmelSec commented Mar 1, 2024

The header can actually look like this:
2c000[0-6]000[1-9]000[0-1]000[0-5]200000

Do you have explanation for that?

Sure:
https://luemmelsec.github.io/Go-away-BitLocker-you-are-drunk/
WithSecureLabs/bitlocker-spi-toolkit#3
https://labs.withsecure.com/publications/sniff-there-leaks-my-bitlocker-key

@zaphoxx
Copy link

zaphoxx commented Mar 6, 2024

That might be very crude but you could check something like

// Generic VMK looks like
        // 2C00|0X00|0X00|0000|0X20|0000
        if((memcmp(message_buffer + popped, vmk_header, 2) == 0) && \
            (memcmp(message_buffer + popped + 3, vmk_header + 3, 1) == 0) && \
             memcmp(message_buffer + popped + 5, vmk_header + 5, 3) == 0 &&\
             memcmp(message_buffer + popped + 9, vmk_header + 9, 3) == 0 ) 
        {

I tested that in my setup and it seems to work fine. so basically the comparison simply skips the variable bytes which is just 3 of 12 bytes which should still be good enough to find the correct match.

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

Successfully merging this pull request may close these issues.

3 participants