https://github.com/evilbytecode/lifetime-amsibypass
Lifetime AMSI bypass.
https://github.com/evilbytecode/lifetime-amsibypass
Last synced: 11 months ago
JSON representation
Lifetime AMSI bypass.
- Host: GitHub
- URL: https://github.com/evilbytecode/lifetime-amsibypass
- Owner: EvilBytecode
- Created: 2024-06-19T10:40:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-27T06:43:58.000Z (over 1 year ago)
- Last Synced: 2025-03-26T08:47:36.504Z (11 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 35
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
* we get the exact address of the jump instruction by searching for the first byte of each instruction this technique is effective even in the face of updates or modifications to the target data set.
* for example :
` | 48:85D2 | test rdx, rdx |`
` | 74 3F | je amsi.7FFAE957C694 |`
` | 48 : 85C9 | test rcx, rcx |`
` | 74 3A | je amsi.7FFAE957C694 |`
` | 48 : 8379 08 00 | cmp qword ptr ds : [rcx + 8] , 0 |`
` | 74 33 | je amsi.7FFAE957C694 |`
* the search pattern will be like this :
`{ 0x48,'?','?', 0x74,'?',0x48,'?' ,'?' ,0x74,'?' ,0x48,'?' ,'?' ,'?' ,'?',0x74,0x33}`

# Patch
## Before Patch
* The program tests the value of RDX against itself. If the comparison evaluates to 0, the program executes a jump to return. Otherwise, the program proceeds to evaluate the next instruction

* we cant execute "Invoke-Mimikatz"

## After Patch
* we patch the first byte and change it from JE to JMP so it return directly


* now we execute "Invoke-Mimikatz"

- Credits ZeroMemoryEx on github