Ready to Start Your Career?

How To Read Email Headers and Find Internet Hosts

S-Connect 's profile image

By: S-Connect

July 31, 2016

How To Read Email Headers and Find Internet Hosts - CybraryNow, some of you may think headers are too simple or boring to waste time on. However, a few weeks ago I asked the 3000+ readers of the Happy Hacker list if anyone could tell me exactly what email tricks I was playing in the process of mailing out the Digests. But, not one person replied with a complete answer -- or even 75% of the answer -- or even suspected that for months almost all Happy Hacker mailings have doubled as protests. The targets: ISPs offering download sites for email bomber programs.Conclusion: It's time to talk headers! In this guide, we'll learn:
  • What is a header
  • Why headers are fun
  • How to see full headers
  • What all that stuff in your headers means
  • How to get the names of Internet host computers from your headers
We'll review the foundation for understanding the forging of email and Usenet posts, catching the people who forge headers, and the theory behind those email bomber programs that can bring an entire Internet Service Provider (ISP) to its knees.With this guide, you can make at least some use of without getting a shell account or installing some form of Unix on your home computer. All you need is to be able to send and receive email, and you're in business. However, if you do have a shell account, you can do much more with deciphering headers. Viva Unix!Headers may sound like a boring topic. Heck, the Eudora email program named the button you click to read full headers "blah blah blah." But, all those guys who tell you headers are boring are either ignorant -- or else afraid you'll open a wonderful chest full of hacker insights.Yes, every email header you check out has the potential to unearth a treasure hidden in some back alley of the Internet. Now, headers may seem simple enough to be a topic for one of our Beginners' Series Guides. But, when I went to look up the topic of headers in my library of manuals, I was shocked to find that most of them don't even cover the topic.The two I found that did cover headers said almost nothing about them. Even the relevant RFC 822 is pretty vague. If any of you super-vigilant readers looking for flame bait happen to know of any literature that *does* cover headers in detail, please include that information in your tirades! Lacking much help from manuals, and finding that RFC 822 didn't answer all my questions. The main way I researched this article was to send email back and forth among some of my accounts, trying out many variations in order to see what kinds of headers they generated. Hey, that's how real hackers are supposed to figure out stuff when RTFM (read the fine manual) or RTFRFC(read the fine RFC) doesn't tell us as much as we want to know. Right?One last thing: people have pointed out to me that every time I put an email address or domain name in a Guide to (mostly) Harmless Hacking. A zillion newbies launch botched hacking attacks against these. All email addresses and domain names below have been fubarred.

Newbie note: The verb "to fubar" means to obscure email addresses andInternet host addresses by changing them. Ancient tradition holds that it isbest to do so by substituting "foobar" or "fubar" for part of the address.

 WHAT ARE HEADERS?If you're new to hacking, the headers you are used to seeing may be incomplete. Chances are that when you get email it looks something like this:

From: Cool Guy<>Date: Fri, 1 March 2002To: hacker@techbroker.comBut if you know the right command, suddenly, with this same email message,we are looking at tons and tons of stuff:

Received: by (950413.SGI.8.6.12/951211.SGI)for id OAA07210; Fri, 1 March 2002Received: from by via ESMTP(950413.SGI.8.6.12/951211.SGI)for <> id OAA18967; Fri, 1 March 2002Received: from ([]) by with ESMTP (8.6.11/ifi2.4)id <> for <> ; Fri, 1 March 2002From: Vegbar Fubar <>Received: from localhost (Vegbarha@localhost) by ; Fri,1 March 2002Date: Fri, 1 March 2002Message-Id: <>To:

Hey, have you ever wondered why all that stuff is there and what it means? We'll return to this example later in this tutorial. But, first we must consider the burning question of the day: WHY ARE HEADERS FUN?Why bother with those freaking headers? They are boring, right? Wrong!
  1. Ever hear a wannabe hacker complaining he or she doesn't have the addresses of any good computers to explore? Have you ever used one of those IP scanner programs that find valid Internet Protocol addresses of Internet hosts for you? Well, you can find gazillions of valid addresses without the crutch of one of these programs simply by reading the headers of emails.
  2. Ever wonder who really mailed that "Make Money Fast" spam? Or, who's that klutz who email bombed you? The first step to learning how to spot email forgeries and spot the culprit is to be able to read headers.
  3. Want to learn how to convincingly forge email? Do you aspire to write automatic spam or email bomber programs? (I disapprove of spammer and email bomb programs, but let's be honest about the kinds of knowledge their creators must draw upon). The first step is to understand headers.
  4. Want to attack someone's computer? Find out where best to attack from the headers of their email. I disapprove of this use, too. But, I'm dedicated to telling you the truth about hacking, so like it or not, here it is.
 HOW CAN YOU SEE FULL HEADERS?So, you look at the headers of your email and it doesn't appear have any good stuff whatsoever. Want to see all the hidden stuff? The way you do this depends on what email program you are using.The most popular email program today is Eudora. To see full headers in Eudora, just click the "blah, blah, blah" button on the far left end of the tool bar. The Netscape web browser includes an email reader. To see full headers, click on Options, then click the "Show All Headers" item. Sorry, I haven't looked into how to do that with Internet Explorer.Oh, no, I can see the flames coming, how dare I not learn the ins and outs of IE mail! But, seriously, IE is a dangerously insecure Web browser because it is actually a Windows shell. So, no matter how often Microsoft patches its security flaws, chances are you will be hurt by it one of these days. Just say "no" to IE.Another popular email program is Pegasus.Maybe there's an easy way to see full headers in Pegasus, but I haven't found it. The hard way to see full headers in Pegasus -- or IE -- or any email program -- is to open your mail folders with WordPad. It's included in the Windows 95 operating system and is the best Windows editing program I've found for handling documents with lots of embedded control characters and other oddities.The Compuserve 3.01 email program automatically shows full headers. Bravo,Compuserve! WHAT DOES ALL THAT STUFF IN YOUR HEADERS MEAN?We'll start by taking a look at a mildly interesting full header. Then we'll examine two headers that reveal some interesting shenanigans. Finally, we'll look at a forged header. OK, let's return to that fairly ordinary full header we looked at above. We'll decipher it piece by piece. First, we look at the simple version:

From: Cool Guy<>Date: Fri, 1 March 2002To:

The information within any header consists of a series of fields separated from each other by a "newline" character. Each field consists of two parts: a field name, which includes no spaces and is terminated by a colon; and the contents of the field. In this case, the only fields that show are "From:," "Date:," and "To:".In every header, there are two classes of fields: the "envelope," which contains only the sender and recipient fields; and everything else, which is information specific to the handling of the message. In this case, the only field that shows which gives information on the handling of the message is the Date field. When we expand to a full header, we're able to see all the fields of the header. We'll now go through this information line by line.

Received: by (950413.SGI.8.6.12/951211.SGI) id OAA07210; Fri, 1 March 2002

This line tells us that I downloaded this email from the POP server at acomputer named This was done on behalf of my account withemail address of The (950413.SGI.8.6.12/951211.SGI) partidentifies the software name and version running that POP server.

Newbie note: POP stands for Post Office Protocol. Your POP server is thecomputer that holds your email until you want to read it. Usually, your theemail program on your home computer or shell account computer will connectto port 110 on your POP server to get your email.

A similar, but more general protocol is IMAP, for Interactive Mail AccessProtocol. Trust me, you'll be a big hit at parties if you can hold forthon the differences between POP and IMAP, you big hunk of a hacker, you!(Hint: for more info, RTFRFCs.)

Now, we examine the second line of the header:

Received: from by via ESMTP(950413.SGI.8.6.12/951211.SGI)for <> id OAA18967; Fri,1 March 2002

Well, gee, I didn't promise that this header would be *totally* ordinary. This line tells us that a computer named passed this email to the POP server on for someone with the email address of This is because I am piping all email to into the account Unix this is done by setting up a file in your home directory named ".forward" with the address to which you want your email sent. Now, there's a lot more behind this, but I'm not telling you. Heh, heh. Can any of you evil geniuses out there figure out the whole story? "ESMTP" stands for "extended simple mail transfer protocol." The "950413.SGI.8.6.12/951211.SGI" designates the program that is handling my email.Now, for the next line in the header:

Received: from ([]) by with ESMTP (8.6.11/ifi2.4) id<> for <> ; Fri, 1 March 2002

This line tells us that the computer got this email message from the computer These two computers appear to be on the same LAN. In fact, note something interesting.The computer name has a number after it, This is the numerical representation of its name. (I substituted ".xxx." for three numbers in order to fubar the IP address.) But, the computer didn't have a number after its name. How come?If you're working with Windows 95 or a Mac you probably can't figure out this little mystery. But trust me, hacking is all about noticing these little mysteries and probing them (until you find something to break, muhahaha -- only kidding, OK?). But, since I'm trying to be a real hacker, I go to my trusty Unix shell account and give the command:

>nslookup ifi.foobar.noServer:  Fubarino.comAddress: answer:Name:    ifi.foobar.noAddress:

Notice the different numerical IP addresses between and Hmmm, I begin to think that the domain may be a pretty big deal. Probing around with dig and traceroute leads me to discover lots more computers in that domain. Probing with nslookup in the mode "set type=any" tells me yet more. Thanks,Ali Tabish
Schedule Demo