Skip to content

Variable vmk header - #3

Open
LuemmelSec wants to merge 2 commits into
stacksmashing:mainfrom
LuemmelSec:Variable_VMK_Header
Open

Variable vmk header#3
LuemmelSec wants to merge 2 commits into
stacksmashing:mainfrom
LuemmelSec:Variable_VMK_Header

Conversation

@LuemmelSec

@LuemmelSec LuemmelSec commented Feb 11, 2024

Copy link
Copy Markdown

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
Copy Markdown

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

LuemmelSec commented Mar 1, 2024

Copy link
Copy Markdown
Author

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/
ReversecLabs/bitlocker-spi-toolkit#3
https://labs.withsecure.com/publications/sniff-there-leaks-my-bitlocker-key

@zaphoxx

zaphoxx commented Mar 6, 2024

Copy link
Copy Markdown

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