Simple Maphack - OpenSource - Delphi

This is a discussion on Simple Maphack - OpenSource - Delphi within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; hello, some weeks ago I decided to make a maphack myself and since I didn't have any source of other ...

Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Ygasmy is offline Wannabe Member
    Array
    Join Date
    Jan 2008
    Location
    germany
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    10
    Reputation
    18

    Simple Maphack - OpenSource - Delphi

    hello,
    some weeks ago I decided to make a maphack myself and since I didn't have any source of other Maphacks I started from nothing and after 4 hours of trying i finally got my maphack working. (well, nothing = being a programmer for 8 years now)

    It's not the best one and it's also highly detectable so DO NOT use it on ladder games - or even better - refrain from using it at all. I made it just to see how maphacks work and if I can compete with other so called "advanced hackers".

    It's coded in delphi because I was too lazy to install/download any IDEs/compilers for C++ and the Delphi IDE was already installed on my pc.
    If you can't code pascal/delphi but C++ it should be kinda easy to translate this into C++ because the main commands are windows APIs, how they work can be researched in the MSDN:



    MSDN: Microsoft Developer Network


    Bare source of my program, having just a single button on the form:

    Code:
    {
     This program was written on 14th July 2008.
     Original Author: tndz
     I did NOT rip ANY code off other maphacks or hacks
     nor did I use any tutorial which has something to
     do with game-hacking/cracking or whatsoever. This
     program-source was made by me, though the DebugPrivilege
     part and some infos on how to use WriteProcessMemory were
     taken from the MSDN (microsoft developer network) and
     Joachim Rohde and Marcus Roming's book "Assembler".
    }
    
    
    unit maphack;
    
    interface
    
    uses
      Windows, SysUtils, Controls, Forms, StdCtrls, ExtCtrls, Classes,
      Graphics;
    
    type
      TmainF = class(TForm)
        btn_on: TButton;
        procedure btn_onClick(Sender: TObject);
        function SetDebugPrivilege: Boolean;
      private
        { Private-Deklarationen }
      public
        { Public-Deklarationen }
      end;
    
    var
      mainF: TmainF;
    
    
    
    implementation
    
    {$R *.dfm}
    
    procedure TmainF.btn_onClick(Sender: TObject);
    var
      Wc3: Hwnd;                                                           //declaring variables
      ProcessId: Integer;
      Bytes: Cardinal;
      Stat: array of Byte;
    begin
    setlength(stat,2);                                                     //declare our array (could also have used 3 different variables or reassign values)
    SetDebugPrivilege;                                                     //grant our process Debug-rights (important!)
    wc3 := FindWindow (nil,'Warcraft III');                                //find wc3 handle
    GetWindowThreadProcessId(Wc3, @ProcessId);                             //find PID by Phandle
    wc3 := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId);              //open wc3 process with all rights
    Bytes := 1;                                                            //not needed for this tbh
                                                                            {
                                                                            We need to store what we want to write
                                                                            in a variable(array) first. Byte variable
                                                                            in Delphi is 0..255, decimal-system. Since
                                                                            we want to write into memory, we need hex-values.
                                                                            I just calculated them from hex to decimal via
                                                                            windows calculator instead of recalculating them
                                                                            via program-code.
                                                                            }
    
    stat[0] := 185;                                                        //185 = B9h
    stat[1] := 15;                                                         //15 = Fh
    stat[2] := 00;                                                         //00 = 0h
                                                                            {
                                                                             B9 0F 00 is part of
                                                                             MOV ECX,000F
                                                                             which means:
                                                                             COPY 000F into ECX
                                                                             so what we do is:
                                                                             we overwrite a part of
                                                                             the drawing engine which
                                                                             checks if a unit is visible
                                                                             to a player or not.
                                                                            }
    WriteProcessMemory(wc3, ptr($6F3A0474), @Stat[0], 1, Bytes);          //write first bytepair
    WriteProcessMemory(wc3, ptr($6F3A0475), @Stat[1], 1, Bytes);          //2nd
    WriteProcessMemory(wc3, ptr($6F3A0476), @Stat[2], 1, Bytes);          //3rd
    end;
    
    
    function TmainF.SetDebugPrivilege: Boolean;
    var
      hToken: THandle;
      TP: TTokenPrivileges;
      lpLuid: TLargeInteger;
      dwReturnLength: DWORD;
    begin
      Result := False;
      if OpenProcessToken(GetCurrentProcess, TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, hToken) then
      begin
        if LookupPrivilegeValue(nil, 'SeDebugPrivilege', lpLuid) then
        begin
          TP.PrivilegeCount := 1;
          TP.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
          TP.Privileges[0].Luid := lpLuid;
          Result := AdjustTokenPrivileges(hToken, False, TP, sizeof(TP), nil, dwReturnLength);
        end;
        CloseHandle(hToken);
      end;
    end;
    
    end.
    Here is the PE (aka .exe) compiled with this source. (I added a picture though :p)
    RapidShare: Easy Filehosting
    http://www.megaupload.com/?d=5OTH8YED
    (MD5: 81899ffa99e7246b7e6192bdbe16a8f3)

    Since I don't trust anyone posting results of malware scanners, download it and go check it on virusscan.jotti.org, its only 172kb in size (packed).


    cya,
    tndz aka Ygasmy.
    Last edited by Ygasmy; 09-21-2008 at 02:41 PM.

  2. #2
    safd is offline Guru Array
    Join Date
    May 2008
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    22
    edit:gj ^^
    Last edited by safd; 08-04-2008 at 06:20 PM.

  3. #3
    Ygasmy is offline Wannabe Member
    Array
    Join Date
    Jan 2008
    Location
    germany
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    10
    Reputation
    18
    edit: ty :p
    Last edited by Ygasmy; 09-11-2008 at 05:58 PM. Reason: answer to a deleted post != useful

  4. #4
    PinkHair is offline Banned User Array
    Join Date
    Mar 2008
    Location
    NET
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    54
    gj , thank you.

  5. #5
    Wilfred is offline Member
    Array
    Join Date
    Aug 2008
    Location
    Western Australia
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    10
    Reputation
    14
    You could make a tutorial on how to make and compile your own maphack.

  6. #6
    UnrealPwner12 is offline Wannabe Member
    Array
    Join Date
    Sep 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0

    c++

    can i have this in C++

    can u convert it and show me the source code

  7. #7
    TyranO's Avatar
    TyranO is offline Retired hacker


    Array
    Join Date
    Aug 2008
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    17
    Reputation
    1405
    Good work.
    Retired

  8. #8
    Bendik is offline Banned User Array
    Join Date
    Dec 2007
    Location
    I live in a small village up north in Norway, Called Beiarn (Google pictures it!)
    Posts
    290
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    260
    This one is undetected at the moment. As Warden is not active at all, SO in other words: It is impossible to make a detectable maphack atm

  9. #9
    Reinn's Avatar
    Reinn is offline Multi-qouter

    Array
    Join Date
    May 2008
    Location
    Denmark
    Posts
    1,892
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    19
    Reputation
    1845
    Nice one bendik So you can use Shadowfrench in ladder? Or someone you MAKE now ? O_O
    // Reinn

  10. #10
    Bendik is offline Banned User Array
    Join Date
    Dec 2007
    Location
    I live in a small village up north in Norway, Called Beiarn (Google pictures it!)
    Posts
    290
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    260
    Yeah you can use Shadowfrench or any other hack you want.

    And i am working on BMap v4.0 (:

Page 1 of 2 12 LastLast

Similar Threads

  1. MousePad's Maphack 7.2 [CRACKED]
    By xHack in forum Diablo 2 Hacks
    Replies: 3
    Last Post: 08-01-2008, 08:13 AM

Posting Permissions

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