<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://slashstar.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Dave Winarsky's Blog</title><subtitle type="html">Something to do with security... sometimes.</subtitle><id>http://slashstar.com/blogs/dave/atom.aspx</id><link rel="alternate" type="text/html" href="http://slashstar.com/blogs/dave/default.aspx" /><link rel="self" type="application/atom+xml" href="http://slashstar.com/blogs/dave/atom.aspx" /><generator uri="http://communityserver.org" version="4.0.30417.1769">Community Server</generator><updated>2004-06-17T12:26:00Z</updated><entry><title>SSH Tunneling (on Windows) with OpenSSH and Putty through an HTTP proxy </title><link rel="alternate" type="text/html" href="/blogs/dave/archive/2006/11/27/SSH-Tunneling-_2800_on-Windows_2900_-with-OpenSSH-and-Putty-through-an-HTTP-proxy-.aspx" /><id>/blogs/dave/archive/2006/11/27/SSH-Tunneling-_2800_on-Windows_2900_-with-OpenSSH-and-Putty-through-an-HTTP-proxy-.aspx</id><published>2006-11-27T01:15:00Z</published><updated>2006-11-27T01:15:00Z</updated><content type="html">&lt;P&gt;I became interested, a little while ago, in how to tunnel encrypted traffic through an http proxy and firewall with only the standard open ports (80, 443).&amp;nbsp; There are a number of reasons to do this, basically anyone sniffing or logging will not be able to tell the difference between the tunnelling and regular https traffic.&amp;nbsp; It will appear as one https session to a destination address.&amp;nbsp; I'll leave it up to all of you to figure out the useful scenarios.&amp;nbsp; In any case, I wasn't able to find any documentation that explained how to do this simply, so here we go:&lt;/P&gt;
&lt;P&gt;In this example, I'll use two machines &lt;U&gt;workComp&lt;/U&gt; - a winxp computer sitting behind the standard corporate firewall with only proxied http and https access, and &lt;U&gt;homeComp&lt;/U&gt; - a winxp computer sitting behind a router/gateway running NAT and a simple blocking firewall (e.g. linksys).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1: Download and install OpenSSH&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;On homeComp download OpenSSH for windows from: &lt;A href="http://sourceforge.net/project/showfiles.php?group_id=103886&amp;amp;package_id=111688"&gt;http://sourceforge.net/project/showfiles.php?group_id=103886&amp;amp;package_id=111688&lt;/A&gt;/ Follow the instructions and install it.&amp;nbsp; Once its installed configure it according to the documentation- be sure to use a strong password/username because it &lt;STRONG&gt;&lt;EM&gt;will&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;be visible to the internet (although disguised in a way, as I explain in a bit.)&amp;nbsp; Once you're sure that it is working correctly (test it using ssh localhost, and you can get to a shell) it is time to configure it for the tunneling.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2: Configuring OpenSSH&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;On homeComp edit the file c:\program files\openssh\etc\sshd_config.&amp;nbsp; Note the file name is sshd_config and NOT ssh_config.&amp;nbsp; So in the sshd_config file, you want to make 2 important changes:&lt;/P&gt;
&lt;P&gt;1. Uncomment the port line and change it to 443.&amp;nbsp; This is very important if the http proxy that workComp is behind is doing anything at all to detect tunneling.&amp;nbsp; Basically, this disguises the connection so the proxy thinks its a regular https connection.&amp;nbsp; I've found that these things implement some of the worst security I have ever seen - check out &lt;A href="http://www.bluecoat.com/downloads/support/BCS_tb_tunnelling_applications.pdf"&gt;http://www.bluecoat.com/downloads/support/BCS_tb_tunnelling_applications.pdf&lt;/A&gt; if you want to have a laugh, they control tunneling by verifying the user agent header and port on the destination.&lt;/P&gt;
&lt;P&gt;2. Uncomment the line with AllowTcpForwarding, and set it to yes.&amp;nbsp; This will allow the forwarding to take place.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3: Configure port forwarding on the router (on homeComp net)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; You now have to configure port forwarding on your router so you'll be able to access homeComp from the internet.&amp;nbsp; Go to your port forwarding setup on the router and set to forward all 443 TCP traffic to the nat'd IP of homeComp (ex. 192.168.100.1).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;You're now finished configuring homeComp - next are the steps for workComp.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1: Download Putty&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1. You can get putty from &lt;A href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html"&gt;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&lt;/A&gt; - install it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2: Configure Putty for use with the proxy&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1. Under the session tab enter the external IP of homeComp - this will be the router's ip - you can get this from going to status or something of the like on your router.&amp;nbsp; This should not be a 192.168 address.&amp;nbsp; Enter the port as 443 (this is going to fool the proxy).&amp;nbsp; Next set the protocol to SSH.&lt;/P&gt;
&lt;P&gt;2. Now go down under Connections and pick your proxy type (I used http, but you may want to pick something else if you are behind a socks proxy).&amp;nbsp; Enter in its hostname and port.&amp;nbsp; If you don't know what this is check the proxy settings for your web browser, this should give you all the information you need.&amp;nbsp; It'll probably be 8080..&lt;/P&gt;
&lt;P&gt;3. Under the SSH tab set the protocol for version 2 and move AES encryption up to the top with 3DES below.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp;Now under the SSH tab, click on Tunnels - this part gets a bit confusing.&amp;nbsp; Source port is the port on workComp you want to forward over the tunnel and destination should be localhost:port.&amp;nbsp; This is because when homeComp gets the forwarded packets, it will forward it to localhost:port - which will be homeComp:port - exactly what we need.&amp;nbsp; This is also interesting, because we could set it up to forward to a 3rd machine, I'll leave that one up to someone else with some good ideas.&amp;nbsp; When your done, click add and you should have something like “L5900 localhost:5900” - I set up this forward so I can use VNC from workComp to connect to homeComp.&lt;/P&gt;
&lt;P&gt;5. Remember to save your session, up on the main session tab, as it is quite annoying have to type all these settings in every time you start up putty.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Step 3: Connect!&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;1. If you've done everything correctly here and you can get out on workComp, just fire up putty and click connect.&amp;nbsp; You should be able to connect to your homeComp and get a shell up.&amp;nbsp; But there is one final task, start up&amp;nbsp;the tunnel for whatever app you configured in forwarded ports.&lt;/P&gt;
&lt;P&gt;2. Open the app which you configured your tunnel for (in Step 2.4 - on the workComp) and connect to localhost on specific port.&amp;nbsp; For tightVNC connect to localhost:5900, if we wanted to tunnel out http, we would configure our browser to use localhost:8080 and set up the similiar rule in putty.&amp;nbsp; Putty will grab the request, encrypt and tunnel it over https.&amp;nbsp; Ding.&amp;nbsp; You’re done.&lt;/P&gt;
&lt;P&gt;Somehow I think this ended up much more confusing than I meant - let me know how I can clarify this more, or of any confusing parts and I'll fix it up.&lt;/P&gt;
&lt;DIV&gt;Dave&lt;/DIV&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://slashstar.com/aggbug.aspx?PostID=5259" width="1" height="1"&gt;</content><author><name>Dave</name><uri>http://slashstar.com/members/Dave/default.aspx</uri></author></entry><entry><title>DSniffing Wifi with Atheros</title><link rel="alternate" type="text/html" href="/blogs/dave/archive/2005/01/18/1271.aspx" /><id>/blogs/dave/archive/2005/01/18/1271.aspx</id><published>2005-01-18T16:58:00Z</published><updated>2005-01-18T16:58:00Z</updated><content type="html">&lt;P&gt;This past weekend, I blew out my linux install to check out Redhat's Fedora Core 3 and for the 3rd time went though getting dsniff 2.3 installed with the WiFi patch.&amp;nbsp; Everytime I've done this, I've forgotten how and had to re-learn it.&amp;nbsp; Here are the steps.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Setup your system&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Install Redhat Fedora Core 3 with 'All' packages (feel free to try&amp;nbsp;with less, but I've got the drive space and wanted to deal with as little dependencies as possible).&lt;BR&gt;2.&amp;nbsp; Get the latest MadWifi drivers out of CVS:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi &lt;BR&gt;3.&amp;nbsp; Compile and reboot&lt;BR&gt;4.&amp;nbsp; Make sure your wifi card is working.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Install DSniff&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp; Download and compile/install Libnet-1.02a:&amp;nbsp;&lt;STRONG&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;A href="http://www.packetfactory.net/libnet/dist/deprecated/libnet-1.0.2a.tar.gz"&gt;http://www.packetfactory.net/libnet/dist/deprecated/libnet-1.0.2a.tar.gz&lt;/A&gt;&lt;BR&gt;5.&amp;nbsp; Get &lt;STRONG&gt;libnids 1.18 &lt;/STRONG&gt;out of sourceforge:&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://sourceforge.net/project/showfiles.php?group_id=92215&amp;amp;package_id=97542&amp;amp;release_id=191323"&gt;http://sourceforge.net/project/showfiles.php?group_id=92215&amp;amp;package_id=97542&amp;amp;release_id=191323&lt;/A&gt;&lt;BR&gt;6.&amp;nbsp; Download the patch to allow for wireless dsniffing in rfmon mode: &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://airsnort.shmoo.com/libnids-1.18-snax-prism-modified.diff"&gt;http://airsnort.shmoo.com/libnids-1.18-snax-prism-modified.diff&lt;/A&gt;&lt;BR&gt;7.&amp;nbsp; Patch it, then compile/install:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; patch -p0 src/libnids.c ~/wifi/libnids*.diff&lt;BR&gt;8.&amp;nbsp; Make and install dsniff:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://www.monkey.org/~dugsong/dsniff/dsniff-2.3.tar.gz"&gt;http://www.monkey.org/~dugsong/dsniff/dsniff-2.3.tar.gz&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DSniff&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;9.&amp;nbsp; Put your card into RFMON (monitor) mode:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iwconfig ath0 mode monitor&lt;/P&gt;
&lt;P&gt;Couple of points/questions:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -It is possible to get it compiled with newer versions of libnet (prepare for a huge headache).&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -I have not found a newer patch for libnids 1.18 - let me know if there is a better way..&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -I've found dsniffing wifi with the '-c' option helps when you are far from the base station (you may only receive half the trans because of signal power).&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Has anyone figured out how to set the sensitivity?&amp;nbsp; I've tried, but I can never see any change - ex: iwconfig ath0 sens -80, etc.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.packetfactory.net/libnet/dist/deprecated/libnet-1.0.2a.tar.gz"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://slashstar.com/aggbug.aspx?PostID=1271" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://slashstar.com/members/dave/default.aspx</uri></author></entry><entry><title>Lycos screensaver fights SPAM</title><link rel="alternate" type="text/html" href="/blogs/dave/archive/2004/12/02/1106.aspx" /><id>/blogs/dave/archive/2004/12/02/1106.aspx</id><published>2004-12-02T20:53:00Z</published><updated>2004-12-02T20:53:00Z</updated><content type="html">&lt;P&gt;I can't even remember the last time I downloaded a screensaver, but I'm definitely going to check this one out.&amp;nbsp; Lycos has apparently&amp;nbsp;created a screensaver, developing on distributed computing ideas such as the &lt;A href="mailto:seti@home"&gt;seti@home&lt;/A&gt; project, and applied it to a more practical problem - spam.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Slashdot reports on it here: &lt;A href="http://it.slashdot.org/it/04/11/26/2129238.shtml?tid=111"&gt;http://it.slashdot.org/it/04/11/26/2129238.shtml?tid=111&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Lycos claims that the screensaver is not a real ddos because it doesn't take the site off-line entirely - one would assume this is to dodge&amp;nbsp;legal repercussions&amp;nbsp; I'll be waiting for&amp;nbsp;the full ddos&amp;nbsp;version... meanwhile sleeping well&amp;nbsp;knowing that my PC is happily contributing to the fight against spam.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://slashstar.com/aggbug.aspx?PostID=1106" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://slashstar.com/members/dave/default.aspx</uri></author></entry><entry><title>Major ASP.NET Vulnerability</title><link rel="alternate" type="text/html" href="/blogs/dave/archive/2004/10/08/989.aspx" /><id>/blogs/dave/archive/2004/10/08/989.aspx</id><published>2004-10-08T17:44:00Z</published><updated>2004-10-08T17:44:00Z</updated><content type="html">&lt;P&gt;So, this new&amp;nbsp;amazing vulnerability has been making it's rounds this week and Microsoft has released some official information about it (&lt;A href="http://www.microsoft.com/security/incident/aspnet.mspx"&gt;http://www.microsoft.com/security/incident/aspnet.mspx&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Just a few thoughts on this-&lt;/P&gt;
&lt;P&gt;1. I think this exploit wins the prize for being the cheesiest I have seen in a long time, I mean, it doesn't really take a technical genious to switch a '/' to a '\'..&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Building on the last thought -&amp;nbsp;what on earth were the msoft developers thinking???? Come on guys, could you&amp;nbsp;help us out a little bit here?&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; And finally, I was going to write something here about how long this one has probably been known by all the Asshats out there, but I don't even want to think about it.&lt;/P&gt;
&lt;P&gt;Its Friday and I'm going for beer - have fun installing urlscan/aspnet modules&amp;nbsp;this weekend :)&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://slashstar.com/aggbug.aspx?PostID=989" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://slashstar.com/members/dave/default.aspx</uri></author></entry><entry><title>Little bit of info on ViewState</title><link rel="alternate" type="text/html" href="/blogs/dave/archive/2004/06/17/661.aspx" /><id>/blogs/dave/archive/2004/06/17/661.aspx</id><published>2004-06-17T16:26:00Z</published><updated>2004-06-17T16:26:00Z</updated><content type="html">&lt;P&gt;A good article on ViewState that I found through weblogs on MSDN-&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp11222001.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp11222001.asp&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Especially the section on the ViewState vs. SessionState.. Session state is protected because it remains on the server's side, however viewstate bounces back to the client.&amp;nbsp; Encryption (its only base64 encoded by default, which is essentially clear text) and tamper proofing definitely has a performance hit so the inclination is going to be turn it off.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Who'd ever think to tamper with the viewstate? ;-)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.pluralsight.com/tools.aspx"&gt;http://www.pluralsight.com/tools.aspx&lt;/A&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://slashstar.com/aggbug.aspx?PostID=661" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://slashstar.com/members/dave/default.aspx</uri></author></entry></feed>