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

Get data chunks #1

Closed
10 tasks done
wurgg opened this issue Feb 13, 2023 · 3 comments
Closed
10 tasks done

Get data chunks #1

wurgg opened this issue Feb 13, 2023 · 3 comments
Assignees

Comments

@wurgg
Copy link
Owner

wurgg commented Feb 13, 2023

scanner mod.rs
After getting the correct process -> determine process size -> split into chunks [4096 bytes?]
These chunks will be fed to the scan method (e.g. brute force or algo1)

  • We should get all this info together before / during init ScanResult struct

  • pattern

  • mask

  • begin_addr

  • size

  • handle to proc

  • var: bytesRead

  • var: oldVProtect

  • var: buffer to read data to

  • mbi

[1] VirtualQueryEx (get our MBI)
[2] loop over each chunk (mbi.regionSize)
[3] check that its good memory using virtualqueryex & mbi.State, mbi.Protect
[4] delete our buffer from last read
[5] if VirtualProtect ex (save original protext to var: oldVProtect
[6] Read Procress Memory
[7] Restore protect using VirtualProtectEx
[8] pass data to scan method
[9] did the scan method find it? break or continue

@wurgg wurgg added the enhancement New feature or request label Feb 13, 2023
@wurgg wurgg self-assigned this Feb 13, 2023
@wurgg
Copy link
Owner Author

wurgg commented Feb 13, 2023

to consider, we could just give the memory address range (base + size) of the process instead of giving 1 data chunk at a time. This way each scan method could optimize as needed/multi thread/etc.

May be slow depending on process size...

@wurgg
Copy link
Owner Author

wurgg commented Feb 20, 2023

  • Get system page file size which will determine the size of the "chunks" (pages) to scan

@wurgg wurgg added requirement and removed enhancement New feature or request labels Feb 27, 2023
@wurgg
Copy link
Owner Author

wurgg commented Mar 6, 2023

completed with fa448e1

@wurgg wurgg closed this as completed Mar 6, 2023
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

1 participant