Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Spoofing HTTP Requests with Putty


Spoofing HTTP Requests with Putty

By ghostghost | 37674 Reads |
0     0

Today I hope to be teaching you a small amount about HTTP Requests and Putty. The topics which I will be covering in this brief article are as follows;

  • What are HTTP Requests?
  • What is PuTTY?
  • How can I send an HTTP Request with PuTTY?
  • How can I spoof an HTTP Request realisticly with PuTTY?

What are HTTP Requests?

HTTP is described by Wikipedia as "a method used to transfer or convey information on the World Wide Web". I don't want to talk to you with the details about how HTTP started because I know someone will get flamed over it because noone seems to have the same view on the subject.

HTTP stands for Hpertext Transfer Protocol. When you want to send some data over the interweb you will always use this method. It sends data from the client to the server. After that the server will give a response.

An HTTP Request can be spilt up into

  • Request line
  • Headers

The Request line looks something like this

markupGET /index.php HTTP/1.1

This tells the server

  • The request method
  • The requested file
  • The HTTP version

There are many request methods but the main ones which people tend to use are;

  • HEAD
  • GET
  • POST

There are also

  • PUT
  • DELETE
  • TRACE
  • OPTIONS
  • CONNECT

The headers are a collection of variables which data is stored in. The common ones are

  • Accept-Encoding
  • Host
  • Referer
  • Cookie
  • User-Agent

Once we have all this information we can compile our HTTP Header. For instance

Accept-Encoding:
Host: phpgsy.com
Referer: http://www.hellboundhackers.org
Cookie: cookie=1234
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Connection: close```

The response which comes from this is;

```markupHTTP/1.1 200 OK
Date: Sat, 25 Nov 2006 15:43:33 GMT
Server: Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d VDB/1.1.1-se
X-Powered-By: PHP/4.4.0
Content-Length: 7315
Connection: close
Content-Type: text/html```

**What is PuTTY?**

PuTTY is an SSH, Telnet and Raw client. It is very easy to use and well worth downloading. You can find it [here](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)

**How can I send an HTTP Request with PuTTY?**

To send an HTTP Request with PuTTY, it's quite simple.

* Enter the hostname

eg.
phpgsy.com

* Enter the post

eg
80

* Chose the "Raw" Protocol

* Close window on exit:

Set this to never

* Click Open

A new window should appear like a CMD window. With this you have to enter your request. For something like;

```markupGET /home HTTP/1.0
Accept-Encoding:
Host: phpgsy.com
Referer: http://www.hellboundhackers.org
Cookie: cookie=1234
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Connection: close```

The screen the shows something like this;

```markupGET /home HTTP/1.0
Accept-Encoding:
Host: phpgsy.com
Referer: http://www.hellboundhackers.org
Cookie: cookie=1234
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Connection: close

HTTP/1.1 200 OK
Date: Sat, 25 Nov 2006 15:56:00 GMT
Server: Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d VDB/1.1.1-se
X-Powered-By: PHP/4.4.0
Content-Length: 7315
Connection: close
Content-Type: text/html

<style type="text/css">
                       <!--
                           #loading {
                                        width: 200px;
                                                        height: 25px;
                                                                        background-color: #e2e6ec;
                        position: absolute;
                                                left: 95%;
                                                                top: 5%;
                                                                               margin-top: -50px;
                        margin-left: -100px;
                                                text-align: center;
                                                                       font-family: /*Lucida Grande, Lucida Sans Unicode, Verdana, Helvetica, Arial,*/ sans-serif;
  }
   -->
      </style>

              <script type="text/javascript">
                                             <!--
                                                 document.write('<div id="loading"><br/><br/>Loading...</div>');
                                window.on<i></i>load=function(){
                                                                document.getElementById("loading").style.display="none";
                                        }
                                         -->

                                            </script>
                                                     <html><head>
                                                                   <title>PHP-GSY</title>
           <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                                                                                 <LINK REL=StyleSheet HREF="css/google-blue.css" TYPE="text/css">
                                                                   <script> </script></head><body id="threecolumn">
                                                        <div id="container">
                                                                               <div class="wrapper"><div id="header">
                                                        <div class="wrapper">
                                                                               <h1 id="page-title">
                                                        <div id='title'><p style="text-align: center;">PHP-GSY - Home</p></div>
                                                                        </h1>
                                                                               <div style="clear: both"></div>
                                                </div>
                                                                </div><div id="left-sidebar">
                        <div class="wrapper">
                                                                <div class="links">
                                <div class="wrapper">
                                                                               <div id='left-sidebar-content'><h2>Links</h2><p><a href="index">Home</a><br /><a href="about">About</a><br /><a href="archive">Archive</a><br /><a href="admin">Admin</a><br />                  </p></div>
                                                                        </div>
                                                                                          <div style="clear: both"></div>
                                                   </div>
                                                                  </div>
                                                                              </div>      <div id="content">

                                    <div class="wrapper">
                                                                   <div class="content-item"><div id='main_body'>
                                                        <div class="wrapper"><div class="wrapper"><p>Welcome to my blog. I will be posting things which I find interesting for you to look at.  I am also looking for ideas about what to post.  Please email me at admin@phpgsy.com with ideas.</p></div><div class="wrapper"><p><h2>Exploits</h2><br /><a href="/blog/17#comments">16 Comments</a></p><p>Well I know that you are all searching hard  through my code to find the exploits so I decided that you could comment in here, so that I could find them quickly.<br />
<br />
Happy searching<a href="/blog/17">...</a></p><p>Posted on Wed 22nd , Nov 06 at 15:02 by Simon Morris</p></div><div class="wrapper"><p><h2>U3 Datatraveller</h2><br /><a href="/blog/16#comments">5 Comments</a></p><p>Well, as I said before I recieved my U3 Datatraveller in the post this weekend. I have been playing with it since then and have found some useful things.<br />
<br />
The first thing which I downloaded was Mozilla FireFox. I am using it to type this as we spea<a href="/blog/16">...</a></p><p>Posted on Tue 21st , Nov 06 at 15:14 by Simon Morris</p></div><div class="wrapper"><p><h2>Challenge Ahoy</h2><br /><a href="/blog/15#comments">2 Comments</a></p><p>As most of you are probably aware I am fairly active on web security sites, especially HBH. At the moment I am coding a mission for them.  It has the best code name - 'Real 16'.  The aim of the mission is to login to the admin panel and add a certa<a href="/blog/15">...</a></p><p>Posted on Mon 20th , Nov 06 at 18:43 by Simon Morris</p></div><div class="wrapper"><p><h2>JAVA in The Works</h2><br /><a href="/blog/14#comments">0 Comments</a></p><p>I am currently learning JAVA, i am coding an app to allow me to blog easily to this site using a JME app from my mobile, i will also create an app to read and comment new blogs, and i will post it up here once it is done. Thanks<a href="/blog/14">...</a></p><p>Posted on Mon 20th , Nov 06 at 15:34 by Tristan Knight</p></div><div class="wrapper"><p><h2>eBuddy JAVA MSN Wap Client</h2><br /><a href="/blog/13#comments">1 Comments</a></p><p>Well I found a JAVA client that will let you access your MSN Messenger account using your mobiles wap. It can be found here<br />
<br />
<a href="http://www.ebuddy.com/mob/">MSN WAP Client</a><br />
<br />
It's currently only in Beta and has some issues with some phones, <a href="/blog/13">...</a></p><p>Posted on Sun 19th , Nov 06 at 18:40 by Tristan Knight</p></div><div class="wrapper"><p><h2>Phone blogging</h2><br /><a href="/blog/12#comments">1 Comments</a></p><p>Well after setting up WAP on my phone I can now blog where ever I roam. Bearing in mind I have to have my phone with me, which is all the time. Unless I am in an exam of course. And obviously I have to have credit. Which is most of the time. So, expe<a href="/blog/12">...</a></p><p>Posted on Sun 19th , Nov 06 at 13:28 by Tristan Knight</p></div><div class="wrapper"><p><h2>My U3 Drive</h2><br /><a href="/blog/11#comments">7 Comments</a></p><p>I am not going to put much content in this initial blog as I want to test the Blog Edit function later on so I'll just say chow :-)<a href="/blog/11">...</a></p><p>Posted on Sun 19th , Nov 06 at 10:36 by </p></div><div class="wrapper"><p><h2>Blog War!</h2><br /><a href="/blog/10#comments">0 Comments</a></p><p>If you have noticed the sudden increase in blogs, don't be alarmed! It's just me testing out the blogging facilities as I improve them whilst trying to excuse the random blog.<br />
<br />
I am soon going to putting some proper content onto the site but for <a href="/blog/10">...</a></p><p>Posted on Sat 18th , Nov 06 at 15:35 by Simon Morris</p></div><div class="wrapper"><p><h2>New Blogger On The Loose</h2><br /><a href="/blog/9#comments">1 Comments</a></p><p>Well, Simon has asked me to blog alongside him, as a his right-hand blogger.<br />
<br />
This privilege has been graciously received, and I have now been given my own password. How honoured I feel.<br />
<br />
Any way, thank Simon *Thumbs Up*<br />
<br />
Tristan out<a href="/blog/9">...</a></p><p>Posted on Sat 18th , Nov 06 at 15:31 by Tristan Knight</p></div><div class="wrapper"><p><h2>Admin Panel Complete</h2><br /><a href="/blog/4#comments">3 Comments</a></p><p>Well that was a morning well spent. After a whole 15 minutes of back breaking labour I had this admin panel, which I am using now, working.<br />
<br />
At the moment I am starting to use my brand new "U3 DataTraveller" 2GB memory stick, so expect a post about<a href="/blog/4">...</a></p><p>Posted on Sat 18th , Nov 06 at 14:30 by Simon Morris</p></div></div>
                                                                          </div>
                                                                                 </div>
                 <div style="clear: both"></div>
                                                        </div>
                                                                    </div><div id="right-sidebar">
                                                <div class="wrapper">
                                                                               <div id='right-sidebar-content'><!--ALTERING CODE IN ANY WAY WILL RESULT IN SUSPENSION OF ACCOUNT--><font face='verdana' size=1><a href='http://www.crispads.com'>CrispAds Blog Ads</a></font><br><iframe id='a7216cc4' name='a7216cc4' src='http://www.crispads.com/spinner/adframe.php?n=a7216cc4&what=zone:7041&resize=1' framespacing='0' frameborder='no' scrolling='no' width='130' height='625' allowtransparency='true'><a href='http://www.crispads.com/spinner/adclick.php?n=a7216cc4' target='_blank'><img src='http://www.crispads.com/spinner/adview.php?what=zone:7041&resize=1&n=a7216cc4' border='0' alt=''></a></iframe><br>
                                                                            </div>
                                </div>
                                                                <div style="clear: both"></div>
                     </div><div id="footer">
                                                    <div class="wrapper">
                                                                                   <hr />
                   <p><div id='footer-content'><p style="text-align: center; clear: both;" class="separator"></p><p style="text-align: center;">Copyright 2005-2006 </p></div></p>
                                 <div style="clear: both"></div>
                                                                        </div>
                                                                                    </div></body>
                                </html>```

As you can see this is the output from my sites homepage. This therefore is a sucessful request.

**How can I spoof an HTTP Request realisticly with PuTTY?**

My prefered method to send a fake post method is to collect my normal headers with "Live HTTP Headers" Firefox extension and then paste them into PuTTY. Using this I can change the post variables slightly and Volia!

If this gets good comments then you can expect to get a PHP method for requesting Headers

Comments
ghost's avatar
ghost 17 years ago

niice article. Read it on your blog already.

ghost's avatar
ghost 17 years ago

Thanks

ghost's avatar
ghost 17 years ago

i agree. very nice article. very useful. thanks mate

ghost's avatar
ghost 17 years ago

nice article, understandable and straight forward. thanks :)

SySTeM's avatar
SySTeM 17 years ago

Nice one mozzer :)

ghost's avatar
ghost 17 years ago

Seems I'm gonna have to write that PHP method :D

ghost's avatar
ghost 17 years ago

Lol write the PHP method :)

jaggedlancer's avatar
jaggedlancer 17 years ago

awsome :happy:

ghost's avatar
ghost 17 years ago

awesome mateā€¦.glad to see something new in the articles.

ghost's avatar
ghost 17 years ago

One of the best articles I've ever seen, very interesting and it still explained a lot. I'd like to see more articles like this on HBH. Without a doubt - 5 out of 5.

korg's avatar
korg 17 years ago

Finally an article worth reading, Already use this myself but got some new pointers:) 10/10 super mozzer!

SySTeM's avatar
SySTeM 17 years ago

who voted "good"?

ghost's avatar
ghost 17 years ago

Finally a good article, awesome mozzer :D

ghost's avatar
ghost 17 years ago

Who voted "poor"?

ghost's avatar
ghost 17 years ago

I voted awesome

hawkster's avatar
hawkster 15 years ago

Good article, Moz! Where the heck is that PHP method? :D