Follow us on Twitter!
Imagination is more valuable than knowledge - Albert Einstein
Wednesday, April 16, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 22
Guests Online: 16
Members Online: 6

Registered Members: 82813
Newest Member: VesuviusSentinel
Latest Articles
View Thread

HellBound Hackers | Computer General | Hacking in general

Author

Basic keylogger

Hax4jew
Member

Your avatar

Posts: 2
Location:
Joined: 10.12.11
Rank:
Guest
Posted on 11-12-11 20:02
Hey guys,

I'm trying to write the coding for a basic keylogger, not sure where to start and how to end. I'm not looking for someone to send the code itself, im interested in learning how to create one myself and how to protect against them for the future....I had a few questions im hoping I could get help with...

1.) Would java be one of the easiest language to use?

2.) in addition to rooting, is there any other large steps required for a keylogger...backdoors, IP, etc?

3.) Would anyone recommend i make a .bat, or any other type of file for easier use?

Thats basically it, im definatly not asking for the code just a place to start, i got it from there Smile
Author

RE: Basic keylogger

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 11-12-11 22:35
Google or articles on this site for your introductory learning as far as how to implement a keylogger. Ask FantASM for more info once he's on later this week.

1) Someone correct me if i'm wrong, but C, C++, or some ASP derivative would probably be in your best interest for ease of MS system calls and integration-wise.

2) You've got to be able to access the data collected by said keylogger somehow. Be it by some form of message to your box or entering into the system to collect it, this is something you must decide upon yourself.

3) nanananananananananananana .Bat man.

[EDIT]: I'm assuming you mean for a windows box. As far as linux goes, never looked into it.


G'bye y'all! I was an asshole, So korg banned me.

Edited by Arabian on 11-12-11 22:44
Author

RE: Basic keylogger

dopeboimag1k
Member

Your avatar

Posts: 30
Location: the Internet
Joined: 01.05.11
Rank:
Moderate
Posted on 11-12-11 22:43

1.) Would java be one of the easiest language to use?


I could be wrong but I think, for security reasons, that it's not possible to capture keystrokes outside of a Java application. If you like Java though, you could write it in C# because they are extremely similar.


thirdgen.net16.net/images/signature.jpg

"Everybody wants greatness but nobody wants to work for it."

"If it was easy, everybody would do it."
Author

RE: Basic keylogger


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 12-12-11 00:20
dopeboimag1k wrote:

1.) Would java be one of the easiest language to use?


I could be wrong but I think, for security reasons, that it's not possible to capture keystrokes outside of a Java application. If you like Java though, you could write it in C# because they are extremely similar.

I believe this is true, since Java-code is executed in the sandbox of the JavaVM, it is nearly impossible to make it stealth and to interact with the rest of the computer.

C# could be a possible language. But be warned, C# and other .NET languages are very easy to decompile. In fact, I agree with Arabian, plain C is probably the easiest/most solid choice.


2)You will need:
-Logging the keys, and possible combinations (i.e., capturing SHIFT to know when capitals and symbols are typed instead of lower letters resp. numbers)
-Sending the logged data(possibly encrypted) trough the internet to you.
-Also, you possibly would like to make the program auto-run the next time the computer is started.


3) .bats are easy, (and fun animals, but that aside B) ) but iirc they are easily tracked by virusscanners.
Author

RE: Basic keylogger

dopeboimag1k
Member

Your avatar

Posts: 30
Location: the Internet
Joined: 01.05.11
Rank:
Moderate
Posted on 12-12-11 02:28

C# could be a possible language. But be warned, C# and other .NET languages are very easy to decompile. In fact, I agree with Arabian, plain C is probably the easiest/most solid choice.


I hadn't considered that.

If you don't have any problems writing it in C/C++, I would take a look at some code in the code bank. I haven't looked at it at all, but if it works as advertised, it would be a good place to start.

http://www.hellbo. . .splus.html

It's C++ by the way.


thirdgen.net16.net/images/signature.jpg

"Everybody wants greatness but nobody wants to work for it."

"If it was easy, everybody would do it."
Author

RE: understood more, much appreciated

Hax4jew
Member

Your avatar

Posts: 2
Location:
Joined: 10.12.11
Rank:
Guest
Posted on 12-12-11 08:02
in the defence portion of keylogging, without using overly prices anti spyware/malware/adware etc...is there any advice on where to begin on how to code a removal tool or a checker for something like this being used on computers in my network?

Thinking a very simple program just to check and show "dir" of where the keylogger may be in the computers under me. That could either be always on or just an easy "open, check, shows dir of logger, closes" type of thing.

i have a feeling that kind of sounds improbable but i have a small business under me and could use the help!


thanks again for the advice above! ^^ great help
Author

RE: Basic keylogger

kaden
Member



Posts: 36
Location: Australia
Joined: 11.08.06
Rank:
Newbie
Posted on 30-12-11 06:19
1.) Would java be one of the easiest language to use?
-- if you can work out how to hook things outside the JVM, I would be very surprised.
-- the only way i know how to make a keylogger in Java is a really shit way to do it. because you need to have the applet/frame in focus to be able to recieve KeyEvents, what you do is continually set the applet as enabled/in focus. then you need a way to send the keyEvents to the acctual program the person thinks they are controlling.

i saw a PoC somewhere, but it was shit. don;t try and make a keylogger in java.



2.) in addition to rooting, is there any other large steps required for a keylogger...backdoors, IP, etc?
by rooting, I am guessing you acctually mean infection?
once you infect someone with your keylogger there are many step you can take. some more difficult then others.
For example, you can disable AV's, hide keylogger from the process list, add to startup(basicly required).. and a few more advnced features (Something like polymorphic code would be interesting, and make it hard to detect).

the way most keyloggers work is it emails the logs to itself (for examle, gmail... they register an email address, and send the logs using code to the same email address).

This makes whaling possible.. I quite enjoy reverse engineering poorly made keyloggers and whaling all the logs. 5 minutes work to find a decent keylogger on youtube, as apposed to 2 weeks of work making a video and spreading yourself.

3.) Would anyone recommend i make a .bat, or any other type of file for easier use?
yes a batch file will make things easier of you want to install things.
look into the autorun feature on windows PC's. you can make a autoinstaller with a usb drive if the feature is turned on on the PC.


at the end of the day, all the information is out there. you didn't really need to post asking these questions as all the info is out there. learn to use google efficiently =P

have fun learning. keep it legal.


no one dies a virgin... life fucks us all.
hellboundhackers.org/sig/r/10735.png
Author

RE: Basic keylogger

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 30-12-11 06:24
kaden wrote:
1.) Would java be one of the easiest language to use?
-- if you can work out how to hook things outside the JVM, I would be very surprised.


Code
extern "C"
 JNIEXPORT void JNICALL Java_ClassName_MethodName
   (JNIEnv *env, jobject obj, jstring javaString)
 {
   
     const char *nativeString = env->GetStringUTFChars(javaString, 0);
 
     //call void method struct

     env->ReleaseStringUTFChars(javaString, nativeString);
 }
//JNI poll methods
//C++ methods

but this also requires another syshook def.





Java's native interface would allow you to pull it off. Far beyond anything i assume OP can do, and still dependent on JVM.


G'bye y'all! I was an asshole, So korg banned me.

Edited by Arabian on 30-12-11 06:33
Author

RE: Basic keylogger

dopeboimag1k
Member

Your avatar

Posts: 30
Location: the Internet
Joined: 01.05.11
Rank:
Moderate
Posted on 30-12-11 06:36
kaden wrote:
1.) Would java be one of the easiest language to use?
-- if you can work out how to hook things outside the JVM, I would be very surprised.
-- the only way i know how to make a keylogger in Java is a really shit way to do it. because you need to have the applet/frame in focus to be able to recieve KeyEvents, what you do is continually set the applet as enabled/in focus. then you need a way to send the keyEvents to the acctual program the person thinks they are controlling.

i saw a PoC somewhere, but it was shit. don;t try and make a keylogger


That is interesting but I agree that would be a waste of time. Do you remember where you saw the proof of concept by any chance?


thirdgen.net16.net/images/signature.jpg

"Everybody wants greatness but nobody wants to work for it."

"If it was easy, everybody would do it."
Author

RE: Basic keylogger

kaden
Member



Posts: 36
Location: Australia
Joined: 11.08.06
Rank:
Newbie
Posted on 30-12-11 06:51
unfortunately it was a while ago and I cant remember where I found it.

All i remember was I was researching this for myself a while ago and stumbled uppon the source. I can't remember where it was.. >.>

At the end of the day it was pretty useless.. but I guess it was an interesting read..
if your really interested, look on google.. I had a quick search but i didn't find it... you may be more lucky =P

I ended up using C# because it is a lot like java, but if i was to redo it I wouldn't use a .NET language.


And that code snippet is interesting, but if i am needing to resort to a different language just to make it possible to use java... I may as well make the entire thing in the other language =P


no one dies a virgin... life fucks us all.
hellboundhackers.org/sig/r/10735.png


Edited by kaden on 30-12-11 06:53
Author

RE: Basic keylogger

stealth-
Member



Posts: 1003
Location: Eh?
Joined: 10.04.09
Rank:
Mad User
Posted on 02-01-12 20:46
As this has all been Windows talk, in Linux you can hook Xlib to grab keypresses.
You can even do it in a language like Python, if you at all felt like it. (Although for python I'd recommend using the pyxhook wrapper lib).

Fairly straight forward, the documentation sucks for some languages' Xlib library, but the PoC's you can find on the internet cover what's happening pretty well.


The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .

Edited by stealth- on 02-01-12 20:46
http://www.stealth-x.com
Author

RE: Basic keylogger

ghostraider100
Member



Posts: 71
Location:
Joined: 01.08.10
Rank:
Wiseman
Posted on 03-01-12 11:10
Before coding your own Key logger, first try to know working of a Trojan Horse

http://thepirateb. . .uruFuel%5D
(Prorat is pretty good)

Then start search coding for each module such as
how to run a program background
how to key log
how to encrypt
how to screen shot desktop
and so on, there is a good article in HBH for key logging.

For detection:
Download the source code of Calm AV.
http://www.clamav. . ./download/

Try to know how it works.
Best of luckGrin
Author

RE: Basic keylogger

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 04-01-12 00:10
XpoZed wrote:
FantASM wrote:
Compile - De-compile (Reversing the compiled).

Does that make sense to you? Also, everyone with the IQ above room temperature here is aware that I know more about the JIT compiler and any thing low level related than anyone on this website.

You honestly have no clue what you are talking about, and I will stop debating that.
If you like to have an own interpretation of definitions then, that honestly is not my problem, but then by definition you are already wrong. Thus, not worth debating.

Happy new year.

I told you, you could actually learn something here... Frown
Anyways, live in your imaginary world.


hahahahaha. Oh noobs Wink


G'bye y'all! I was an asshole, So korg banned me.

Edited by Arabian on 04-01-12 00:11
Author

RE: Basic keylogger

Death_metal666
Member



Posts: 36
Location:
Joined: 26.05.11
Rank:
Wiseman
Warn Level: 50
Posted on 04-01-12 05:36
Arabian wrote:
hahahahaha. Oh noobs Wink

FantASM = MolesteD_ = :ninja: || as much i know he is not noob :happy:
Author

RE: Basic keylogger

Death_metal666
Member



Posts: 36
Location:
Joined: 26.05.11
Rank:
Wiseman
Warn Level: 50
Posted on 04-01-12 12:28
FantASM wrote:
XpoZed: Why did you not use JMP instead of RET?
Me: No particular reason, would work though.
XpoZed: Unfortunately, it wouldnt.
Me: Because?
XpoZed: It pushes a new value on the stack so app will crash.
Me: JMP does not push anything on the stack, only CALL does that. Or rather; it pushes the address + call instruction on the stack.
XpoZed: the address + call instruction will be buffer overflow.


LOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOL
OLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLO
LOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOL... /DEAD.

Game Over Wink
Author

RE: Basic keylogger

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 04-01-12 18:05
my 'lolnoobs' was in regard to Xpozed btw


G'bye y'all! I was an asshole, So korg banned me.
Author

RE: Basic keylogger

Death_metal666
Member



Posts: 36
Location:
Joined: 26.05.11
Rank:
Wiseman
Warn Level: 50
Posted on 04-01-12 18:30
FantASM plz DON'T show those logs. It would b insulting.

XpoZed plz accept it u r wrong. Don't continue this argument.

Arabian wrote:
my 'lolnoobs' was in regard to Xpozed btw

Arabian will b Arabian Grin

i think Hax4jew got his answer, about how to create a keylogger or whatever.

it would be good if this thread get lock
Author

RE: Basic keylogger

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 04-01-12 18:47
Death_metal666 wrote:

it would be good if this thread get lock


Nay, 'tis too much fun Smile

I don't always write in java, but when I do, I write in c++


G'bye y'all! I was an asshole, So korg banned me.

Edited by Arabian on 04-01-12 18:48
Author

RE: Basic keylogger

korg
Admin from hell



Posts: 2798
Location: ENDING YOUR ONLINE EXPERIENCE!
Joined: 01.01.06
Rank:
God
Posted on 04-01-12 19:32
That's enough guy's take it to PM's. Stay on topic or the thread gets locked.

Edit: Changed my mind, Enough has been said. Locked.


i57.photobucket.com/albums/g215/korg1269/shodan13.jpg

I deal in pain, All life I drain, I dominate, I seal your fate.

Edited by korg on 04-01-12 19:42
O R