<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>spoofedpacket &#187; Security</title>
	<atom:link href="http://www.spoofedpacket.net/index.php/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spoofedpacket.net</link>
	<description>Rob Gallagher</description>
	<lastBuildDate>Thu, 27 May 2010 16:35:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Setting up scponly</title>
		<link>http://www.spoofedpacket.net/index.php/2010/03/24/setting-up-scponly/</link>
		<comments>http://www.spoofedpacket.net/index.php/2010/03/24/setting-up-scponly/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 21:56:37 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/?p=203</guid>
		<description><![CDATA[In the past, if I wanted to create a restricted account for a user, to upload files via scp/sftp for example, I normally setup rbash with a defined set of commands. However, it&#8217;s possible to break out of an rbash environment quite easily. Recently, whilst setting up an account for one of the Eirtakon guys [...]]]></description>
			<content:encoded><![CDATA[<p>In the past, if I wanted to create a restricted account for a user, to upload files via scp/sftp for example, I normally setup rbash with a defined set of commands. However, it&#8217;s possible to <a href="http://pentestmonkey.net/blog/rbash-scp/">break out</a> of an rbash environment quite easily.</p>
<p>Recently, whilst setting up an account for one of the <a href="http://www.eirtakon.com">Eirtakon</a> guys to modify their drupal install, I decided to give <a href="http://sublimation.org/scponly/">scponly</a> a whirl. This is a restricted shell that, as the name implies, only allows access to scp and sftp. It also provides a chroot mode (<strong>scponlyc</strong>) to lock users into a specified directory hierarchy, which I configured for this particular user.</p>
<p>Installation on Debian is simple:</p>
<pre>
 aptitude install scponly
</pre>
<p>To enable the chrooted version of scponly, do:</p>
<pre>
dpkg-reconfigure -plow scponly
</pre>
<p>Unzip the chroot setup script and make it executable</p>
<pre>
cd /usr/share/doc/scponly/setup_chroot
gunzip setup_chroot.sh.gz
chmod 755 setup_chroot.sh
</pre>
<p>If you are on a 64 bit system, scponly is basically broken out of the box. You need to do a couple of things to make it work, the first is to apply this diff to setup_chroot.sh, it adds /lib/ld-2.7.so to the LDSO_LIST variable.</p>
<pre>
--- setup_chroot.sh     2010-03-24 18:53:15.000000000 +0000
+++ setup_chroot.sh.busted      2010-03-24 18:52:24.000000000 +0000
@@ -79,7 +79,7 @@
 #
 #      we also need to add some form of ld.so, here are some good guesses.
 #
-LDSO_LIST="/lib/ld-2.7.so /lib/ld.so /libexec/ld-elf.so /libexec/ld-elf.so.1 /usr/libexec/ld.so /lib/ld-linux.so.2 /usr/libexec/ld-elf.so.1"
+LDSO_LIST="/lib/ld.so /libexec/ld-elf.so /libexec/ld-elf.so.1 /usr/libexec/ld.so /lib/ld-linux.so.2 /usr/libexec/ld-elf.so.1"
 for lib in $LDSO_LIST; do
        if [ -f $lib ]; then
                LDSOFOUND=1;
</pre>
<p>You can now run the setup script</p>
<pre>
 ./setup_chroot.sh
</pre>
<p>This creates a chrooted user and sets up the necessary environment. </p>
<p>Now set up /dev/null:</p>
<pre>
 cd ~scponlyuser
 mkdir dev
 cp -a /dev/null dev/
</pre>
<p>For a 64 bit system, you need to copy across a few more supporting libraries into the chroot:</p>
<pre>
 cd ~scponlyuser
 cp -p /lib/libncurses.so.5 lib/
 cp -p /lib/libncurses.so.5 lib/
 cp -p /lib/libdl.so.2 lib/
 cp -p /lib/libc.so.6 lib/
 mkdir lib64
 cp -p /lib64/ld-linux-x86-64.so.2 lib64/
</pre>
<p>To restrict the user to only the path I want them to see, I set their home directory to /home/scponlyuser//drupal. The // has the effect of dropping them into that particular directory once they get chroot&#8217;ed, which is /drupal in the chroot environment.</p>
<p>I also wanted to let them have access to /var/www/eirtakon.com/drupal, but without symlinks or other nonsense. This can be done with the <strong>bind</strong> option in mount:</p>
<pre>
 mount -o bind /var/www/eirtakon.com/drupal /home/scponlyuser/drupal
</pre>
<p>To test it out</p>
<pre>
 sftp scponlyuser@longcat.spoofedpacket.net
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2010/03/24/setting-up-scponly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>spoofedpacket.net signed</title>
		<link>http://www.spoofedpacket.net/index.php/2009/12/01/spoofedpacket-net-signed/</link>
		<comments>http://www.spoofedpacket.net/index.php/2009/12/01/spoofedpacket-net-signed/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 18:49:35 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/?p=183</guid>
		<description><![CDATA[I recently signed spoofedpacket.net, here&#8217;s the DS sets: spoofedpacket.net. IN DS 15871 5 1 6D6B3C370091ECF38D81B2D91B54C7B2EB6D47E6 spoofedpacket.net. IN DS 15871 5 2 41D36F7DEC5827F650E772DE1DA33A219B3B994757DDF763830EBC12 E2DCEC80 And the keysets: spoofedpacket.net 604800 IN DNSKEY 257 3 5 ( AwEAAa1qyDcvEEsXZYvzI5TwlJks8pK95OSE RjMtg0aN/cBfpNeyyYwX1O5zQy1G13qklxYR CbPHbbeZkxMxfVxc3pUSDOqYtu6IBhhPTv9Z Gwnjn6CRBdKVrkdMI5ZPJ3uwvMj9yk6a9jjg tUZZfIRkbURa/Q75AaqB8ihQN7pU5N9Tui0i V3eoKZrVfc5mUDATnggSw/Pk7blHKn8OWwEJ b7Q5Uulg4fmHYSxX2sTzt5kgZxWAVbaZ5IWn XwMJkUN7kM9Lz04exn4JmpeMpfAo3+tyDC1F LLJVPAk4KmhDKPhiY1y9yeZxLiloYh8KvG4b W18D465/RQRkoLufF+/6htk= ) ; key id = 15871]]></description>
			<content:encoded><![CDATA[<p>I recently signed spoofedpacket.net, here&#8217;s the DS sets:</p>
<pre>
  spoofedpacket.net.      IN DS 15871 5 1 6D6B3C370091ECF38D81B2D91B54C7B2EB6D47E6
  spoofedpacket.net.      IN DS 15871 5 2 41D36F7DEC5827F650E772DE1DA33A219B3B994757DDF763830EBC12 E2DCEC80
</pre>
<p>And the keysets:</p>
<pre>
  spoofedpacket.net       604800  IN DNSKEY 257 3 5 (
                                        AwEAAa1qyDcvEEsXZYvzI5TwlJks8pK95OSE
                                        RjMtg0aN/cBfpNeyyYwX1O5zQy1G13qklxYR
                                        CbPHbbeZkxMxfVxc3pUSDOqYtu6IBhhPTv9Z
                                        Gwnjn6CRBdKVrkdMI5ZPJ3uwvMj9yk6a9jjg
                                        tUZZfIRkbURa/Q75AaqB8ihQN7pU5N9Tui0i
                                        V3eoKZrVfc5mUDATnggSw/Pk7blHKn8OWwEJ
                                        b7Q5Uulg4fmHYSxX2sTzt5kgZxWAVbaZ5IWn
                                        XwMJkUN7kM9Lz04exn4JmpeMpfAo3+tyDC1F
                                        LLJVPAk4KmhDKPhiY1y9yeZxLiloYh8KvG4b
                                        W18D465/RQRkoLufF+/6htk=
                                        ) ; key id = 15871
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2009/12/01/spoofedpacket-net-signed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SpamAssassin DNS lookups over IPv6</title>
		<link>http://www.spoofedpacket.net/index.php/2009/09/15/spamassassin-dns-lookups-over-ipv6/</link>
		<comments>http://www.spoofedpacket.net/index.php/2009/09/15/spamassassin-dns-lookups-over-ipv6/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 13:58:01 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/?p=146</guid>
		<description><![CDATA[With the recent surge in AIB phishing mails, I thought it might be worth looking at our SpamAssassin setup to see if there was anything that could be done to filter them out. AIB helpfully publish SPF records for the aib.ie domain, so the first port of call was SAs SPF lookups. Which I noticed [...]]]></description>
			<content:encoded><![CDATA[<p>With the <a href="http://www.aib.ie/servlet/Satellite?c=SC_Content&#038;cid=1196265062880&#038;pagename=SecurityCentre%2Fsc_main&#038;section=S001">recent surge in AIB phishing mails</a>, I thought it might be worth looking at our SpamAssassin setup to see if there was anything that could be done to filter them out.</p>
<p>AIB helpfully publish SPF records for the aib.ie domain, so the first port of call was SAs SPF lookups. Which I noticed weren&#8217;t happening, despite being enabled some time ago. Reloading SA resulting in the following log message in spamd.log:<br />
<code><br />
Tue Aug 11 11:26:52 2009 [2221] warn: Error creating a DNS resolver<br />
socket: at /usr/share/perl5/Mail/SpamAssassin/DnsResolver.pm line 233.<br />
</code><br />
Aw snap, SA can&#8217;t do any DNS lookups, at all. Which means all of the DNS-based tests will be silently skipped. Going back through the spamd.log, I noticed these messages first started occurring when we enabled IPv6 DNS resolvers a number of months ago. Hmm, perl is obviously missing something fundamental.</p>
<p>So, it turns out a perl library required to create IPv6 sockets wasn&#8217;t installed, <a href="http://search.cpan.org/dist/IO-Socket-INET6/lib/IO/Socket/INET6.pm">IO::Socket::INET6</a>. This is conveniently packaged in Ubuntu:</p>
<p><code> aptitude install libio-socket-inet6-perl</code></p>
<p>A quick reload of spamassassin and we can say goodbye to all those &#8220;URGENT NOTIFICATION&#8221;s about our AIB online banking accounts. Although, the spammers have now copped on and aren&#8217;t even bothering to send from aib.ie addresses anymore..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2009/09/15/spamassassin-dns-lookups-over-ipv6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updates to bind and the open resolver project</title>
		<link>http://www.spoofedpacket.net/index.php/2009/07/29/updates-to-bind-and-the-open-resolver-project/</link>
		<comments>http://www.spoofedpacket.net/index.php/2009/07/29/updates-to-bind-and-the-open-resolver-project/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 09:28:10 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/?p=143</guid>
		<description><![CDATA[If you haven&#8217;t done so already, now would be a good time to update bind9. A remote exploit is doing the rounds. In related news, Team Cymru is running a scan for open DNS resolvers. It&#8217;s surprising the amount of DNS servers out there that are un-intentionally left wide open and, even worse, don&#8217;t implement [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t done so already, now would be a good time to update bind9. A <a href="https://www.isc.org/node/474">remote exploit</a> is doing the rounds.</p>
<p>In related news, Team Cymru is running <a href="http://www.team-cymru.org/Services/Resolvers/">a scan for open DNS resolvers</a>. It&#8217;s surprising the amount of DNS servers out there that are un-intentionally left wide open and, even worse, don&#8217;t implement <a href="http://monkey-house-org.blogspot.com/2006/08/top-10-dns-infrastructure-best.html">split-horizon DNS</a>. Looks like they&#8217;ve been busy probing ns.spoofedpacket.net:</p>
<p><code><br />
22-Jun-2009 23:33:54.393 security: client 38.229.0.10#55251: query (cache) 'recursion-test.cymru.com/A/IN' denied<br />
23-Jul-2009 23:34:08.350 security: client 38.229.0.10#45412: query (cache) 'recursion-test.cymru.com/A/IN' denied<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2009/07/29/updates-to-bind-and-the-open-resolver-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First steps towards DNSSEC</title>
		<link>http://www.spoofedpacket.net/index.php/2009/04/03/first-steps-towards-dnssec/</link>
		<comments>http://www.spoofedpacket.net/index.php/2009/04/03/first-steps-towards-dnssec/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 12:53:47 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/?p=79</guid>
		<description><![CDATA[I recently began deploying DNSSEC within HEAnet. Things are at an early stage, but I&#8217;m hoping to have some signed zones up and running in the next few months. For testing, I wanted to find a practical application of DNSSEC, rather than simply stating &#8220;now our zones are secure against attack A, B and C&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently began deploying <a href="http://www.dnssec.net/">DNSSEC</a> within HEAnet. Things are at an early stage, but I&#8217;m hoping to have some signed zones up and running in the next few months.</p>
<p>For testing, I wanted to find a practical application of DNSSEC, rather than simply stating &#8220;now our zones are secure against attack A, B and C&#8221;.</p>
<p><a href="http://tools.ietf.org/html/rfc4255">RFC4255</a> provides exactly this, with automatic verification and trusting of SSH host keys through a combination of the SSHFP record type and DNSSEC validation. This removes the need to maintain a known_hosts file on each client, key fingerprints can simply be distributed through DNS. </p>
<p>I started by generating our zone signing key (ZSK) and key signing key (KSK) for the secure zone, <strong>login.heanet.ie</strong>. These are 1024bit RSASHA1 keypairs. </p>
<pre>
 mkdir /etc/bind/keys
 cd !$
 dnssec-keygen -r /dev/random -a RSASHA1 \
  -b 1024 -n ZONE login.heanet.ie
 dnssec-keygen -r /dev/random -f KSK \
  -a RSASHA1 -b 1024 -n ZONE login.heanet.ie
</pre>
<p>Then, I imported the trust anchor (KSK public part) for the zone into the DNS resolver. We are using <a href="http://www.unbound.net">Unbound</a> but BIND etc. configuration is somewhat similar. </p>
<pre>
cp Klogin.heanet.ie.+005+61342.key /etc/unbound/anchors/login.heanet.ie.anchor
...
vi /etc/unbound/unbound.conf
...
#
# login.heanet.ie test signed zone - robertg@heanet.ie 20090309
#
trust-anchor-file: "/etc/unbound/anchors/login.heanet.ie.anchor"
...
</pre>
<p>To prepare the zone for signing, I published the ZSK and KSK public keys at the apex of the zone, ie: after NS records but before any other records are defined.</p>
<pre>
@                       IN      NS      ns.heanet.ie.

; DNSSEC public keys
$INCLUDE                /etc/bind/keys/Klogin.heanet.ie.+005+01530.key  ;ZSK
$INCLUDE                /etc/bind/keys/Klogin.heanet.ie.+005+61342.key  ;KSK

; hosts
charlene                IN      A       193.1.219.75
charlene                IN      AAAA    2001:770:18:2::193.1.219.75
charlene                IN      SSHFP   1 1 d343493a92fdd26281dddc26e90440e5504c3b1a
charlene                IN      SSHFP   2 1 4fad90afa04a6b62371091662f88685822b07ebb
</pre>
<p>Now, to actually sign the zone! I signed the RRsets in the zone with <strong>dnssec-signzone</strong> and the ZSK and KSK keypairs we generated earlier. This produces a signed version of the zonefile, of the form zonefile.signed. The KSK (61342) is used to sign the keys we entered at the apex of the zone earlier, and the ZSK (01530) is used to sign all the other records in the zone. </p>
<pre>
dnssec-signzone -r /dev/random -o login.heanet.ie \
-k /etc/bind/keys/Klogin.heanet.ie.+005+61342.key \
login.heanet.ie /etc/bind/keys/Klogin.heanet.ie.+005+01530.key
</pre>
<p>Then, I loaded the .signed file into the authoritative nameserver.</p>
<pre>
zone "login.heanet.ie" {
        type master;
        file "pz/forward/login.heanet.ie.signed";
};
</pre>
<p>After doing this, it&#8217;s a good idea to check for any errors in name server log.</p>
<p>As a first test, I made a DNSSEC query to the resolvers. It should follow the chain of trust and securely resolve the query. The &#8220;ad&#8221; &#8211; authenticated data &#8211; flag in the flags: section of the dig output confirms that the zone data is signed and has been verified as authentic. The <strong>+dnssec</strong> option sets the DO (DNSSEC OK) bit on the query and the <strong>+multiline</strong> option is simply used for readability purposes.</p>
<pre>
dig @resolver0.heanet.ie charlene.login.heanet.ie +dnssec +multiline

; <<>> DiG 9.5.0-P2 <<>> @resolver0.heanet.ie charlene.login.heanet.ie +dnssec +multiline
; (2 servers found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42200
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;charlene.login.heanet.ie. IN A

;; ANSWER SECTION:
charlene.login.heanet.ie. 3600 IN A 193.1.219.75
charlene.login.heanet.ie. 3600 IN RRSIG	A 5 4 3600 20090429144034 (
				20090330144034 1530 login.heanet.ie.
				dw8qCGcHEBA8kSfv3CTr7sTM7FEJvoGyY8tz9bEgIsNK
				adSgG3eUfHIQ5nMFVYvg7/MEXLfhUyXmByNjPuuMhfi0
				mvX4GV0z+MqIRfVBb6bH8kPBlAjdXisny4e8rhrheRwu
				P8FyONy88cyy5OqTattjzz8bBtMevZo4wN/KfQs= )

;; AUTHORITY SECTION:
login.heanet.ie.	3600 IN	NS ns.heanet.ie.
login.heanet.ie.	3600 IN	RRSIG NS 5 3 3600 20090429144034 (
				20090330144034 1530 login.heanet.ie.
				C7C54YAIMVqp9UJfrrM56dRd2U8OB+zkxHV2G2YN0QsR
				7XFZHVcBEjw/9l8r1E6yiRIyAx2P3XGWT/tAvYvssAG8
				p143UAn29Gqnibf5mGzhRQFGN/huCdmFSIL7yK2jinhA
				rw/ZgOrVkBnWiGYNRe4BWtIhkHbcVYZ6roWXlo8= )

;; Query time: 2 msec
;; SERVER: 2001:770:f8::c101:ba02#53(2001:770:f8::c101:ba02)
;; WHEN: Wed Apr  1 17:07:12 2009
;; MSG SIZE  rcvd: 436
</pre>
<p>Now to test the signed SSHFP records. On the client, I added the following to resolv.conf.</p>
<pre>
options edns0
</pre>
<p>Also, I edited ~/.ssh/config and added this line in the Host section </p>
<pre>
VerifyHostKeyDNS yes
</pre>
<p>When ssh'ing to a the machine with signed SSHFP records, the user should not be prompted to accept the host key, even if it is "unknown".</p>
<pre>
ssh -v heanet@charlene.login.heanet.ie
OpenSSH_5.1, OpenSSL 0.9.7j 04 May 2006
...
debug1: found 2 secure fingerprints in DNS
debug1: matching host key fingerprint found in DNS
debug1: ssh_rsa_verify: signature correct
...
</pre>
<p>Presto! No known_hosts file. Profit! etc.. No need to maintain host keys across multiple clients, simply distribute your SSH fingerprints through DNS.</p>
<pre>
$ ls -al /home/rob/.ssh/
total 16
drwx------  2 rob  users  512 Mar 31 14:35 .
drwxr-xr-x  3 rob  users  512 Mar 31 14:15 ..
-rw-------  1 rob  users  613 Mar 31 17:23 authorized_keys
-rw-r--r--  1 rob  users  120 Mar 31 14:35 config
</pre>
<p>Of course there are a number of issues. I haven't gone through the required key rollover and resigning processes, however these are reasonably straightforward and can be automated with freely available tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2009/04/03/first-steps-towards-dnssec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAGE-IE talk</title>
		<link>http://www.spoofedpacket.net/index.php/2007/12/12/sage-ie-talk/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/12/12/sage-ie-talk/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 15:31:47 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/12/12/sage-ie-talk/</guid>
		<description><![CDATA[I gave a short 10 minute talk at the SAGE-IE meeting last night. It&#8217;s just a quick security update from HEAnet &#8211; what we&#8217;re seeing in the wild and some of the countermeasures we&#8217;ve been working on.]]></description>
			<content:encoded><![CDATA[<p>I gave a short 10 minute <a href="http://www.spoofedpacket.net/files/docs/sage-20071211.pdf">talk</a> at the <a href="http://www.sysadmin.ie">SAGE-IE</a> meeting last night. It&#8217;s just a quick security update from HEAnet &#8211; what we&#8217;re seeing in the wild and some of the countermeasures we&#8217;ve been working on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/12/12/sage-ie-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The week of data SNAFUs</title>
		<link>http://www.spoofedpacket.net/index.php/2007/11/23/the-week-of-data-snafus/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/11/23/the-week-of-data-snafus/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 16:23:31 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/11/23/the-week-of-data-snafus/</guid>
		<description><![CDATA[Hot on the heels of the HMRC CD-ROMs-in-the-post incident earlier this week; AIB, BoI and Quinn Direct have admitted to sending customer details to the wrong people. It seems to be catching&#8230;]]></description>
			<content:encoded><![CDATA[<p>Hot on the heels of the <a href="http://www.theregister.co.uk/2007/11/22/hmrc_roundup/">HMRC CD-ROMs-in-the-post incident</a> earlier this week; <a href="http://www.rte.ie/news/2007/1122/aib.html">AIB</a>, <a href="http://www.rte.ie/news/2007/1123/boi.html">BoI</a> and <a href="http://www.rte.ie/news/2007/1123/quinndirect.html">Quinn Direct</a> have admitted to sending customer details to the wrong people.</p>
<p>It seems to be catching&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/11/23/the-week-of-data-snafus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Everyone needs a little Iodine..</title>
		<link>http://www.spoofedpacket.net/index.php/2007/10/31/everyone-needs-a-little-iodine/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/10/31/everyone-needs-a-little-iodine/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 10:46:35 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/10/31/everyone-needs-a-little-iodine/</guid>
		<description><![CDATA[Iodine is a nifty little program to tunnel IPv4 packets over DNS (53 is the atomic number of Iodine..*arf*). It can be handy in those situations where DNS queries are allowed out from a network, but not much else. The setup: One local FreeBSD box (the client), one Ubuntu Feisty box (the server) and control [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.kryo.se/iodine">Iodine</a> is a nifty little program to tunnel IPv4 packets over DNS (53 is the atomic number of Iodine..*arf*). It can be handy in those situations where DNS queries are allowed out from a network, but not much else. </p>
<p><strong>The setup</strong>: One local FreeBSD box (the client), one Ubuntu Feisty box (the server) and control over your own domain.</p>
<p>We start off by installing iodine on our FreeBSD machine, there is a port available for it:</p>
<pre>[root@akagi ~]# portinstall iodine</pre>
<p>Unfortunately iodine isn&#8217;t available in the Ubuntu package repositories, but we can just nick the Debian package and use that instead. The server is an amd64 machine, so you&#8217;d need to fetch the right package for your architecture. Install using</p>
<pre>
wget http://ftp.ie.debian.org/debian/pool/main/i/iodine/iodine_0.4.0-3_amd64.deb
dpkg -i iodine_0.4.0-3_amd64.deb
</pre>
<p>apt spat out some post-install errors due to version string mismatches &#8211; these are safe to ignore. </p>
<p>The next step is to delegate control of a domain to our server. This will cause all queries for the domain <strong>iotunneldom.spoofedpacket.net</strong> to go to our server <strong>iotunnel.spoofedpacket.net</strong>, where our iodine daemon lies in wait.</p>
<pre>
iotunnel        300     IN      A     88.198.67.243
...
iotunneldom     300     IN      NS    iotunnel.spoofedpacket.net.
</pre>
<p>Now, we start the server. The iodine daemon accepts udp/53 requests and creates a tunnel interface (dns0) for the IPv4-in-DNS packets. Make sure you have the <code>tun</code> device available, <code>lsmod</code> should confirm this. </p>
<pre>
root@longcat:~# iodined -P iminurdns 192.168.0.1 iotunneldom.spoofedpacket.net
Opened dns0
Setting IP of dns0 to 192.168.0.1
Setting MTU of dns0 to 1024
Opened UDP socket
Listening to dns for domain iotunneldom.spoofedpacket.net
Detaching from terminal...
</pre>
<p>-P specifies the password to use. The first argument is the tunnel endpoint address, choose an addressing scheme that doesn&#8217;t overlap with anything you already have &#8211; private space is a good choice. The second argument is the domain we setup earlier.</p>
<p>You should end up with an interface like this:</p>
<pre>
root@longcat:~# ifconfig dns0
dns0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1024  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:168 (168.0 b)  TX bytes:168 (168.0 b)
</pre>
<p>Start up the client and point it at our tunnel server. Again, you&#8217;ll need some kind of tunnel device available &#8211; the generic FreeBSD kernel has one by default:</p>
<pre>
[root@akagi ~]# iodine iotunnel.spoofedpacket.net iotunneldom.spoofedpacket.net
Enter password on stdin:
iminurdns
Opened /dev/tun0
Opened UDP socket
Retrying version check...
Version ok, both running 0x00000400. You are user #1
Setting IP of tun0 to 192.168.0.3
Adding route 192.168.0.3/24 to 192.168.0.3
add net 192.168.0.3: gateway 192.168.0.3
Setting MTU of tun0 to 1024
Sending queries for iotunneldom.spoofedpacket.net to iotunnel.spoofedpacket.net
Detaching from terminal...
</pre>
<p>The client will then have the following interface (tun0) available:</p>
<pre>
[root@akagi ~]# ifconfig tun0
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1024
        inet 192.168.0.3 --> 192.168.0.3 netmask 0xffffff00
        Opened by PID 61357
</pre>
<p>Now lets pass some traffic through it, test out the tunnel by pinging the remote end:</p>
<pre>
[root@akagi ~]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=57.382 ms
</pre>
<p>So, iodine is relatively straightforward to setup. Once you&#8217;ve got your tunnel, there are many uses you can put it to &#8211; Run a web proxy on the server, do some port forwarding or simply route all your traffic down it. There is also the potential to obfuscate your traffic, as all anyone would see is udp/53 queries.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/10/31/everyone-needs-a-little-iodine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash-based port scanner</title>
		<link>http://www.spoofedpacket.net/index.php/2007/08/16/flash-based-port-scanner/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/08/16/flash-based-port-scanner/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 08:43:40 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/08/16/flash-based-port-scanner/</guid>
		<description><![CDATA[I noticed an interesting little tidbit over on TaoSecurity. It&#8217;s a proof of concept for a Flash-based port scanner that takes advantage of some seemingly braindead programming decisions on the part of Adobe. Flash 9 has a socket event/exception that immediately thrown when trying to connect to a closed TCP port. For an open TCP [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed an interesting little <a href="http://taosecurity.blogspot.com/2007/08/scanning-with-flash.html">tidbit over on TaoSecurity</a>. It&#8217;s a proof of concept for a <a href="http://scan.flashsec.org/">Flash-based port scanner</a> that takes advantage of some seemingly braindead programming decisions on the part of Adobe.</p>
<p>Flash 9 has a socket event/exception that immediately thrown when trying to connect to a closed TCP port. For an open TCP port, flash writes some data to the socket that will never illicit a response. This behavior can be used to infer which ports are open and closed on a given host.</p>
<p>Given the massive popularity of flash video and such, it would be quite trivial to trick people into opening one of these things.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/08/16/flash-based-port-scanner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t open this link!</title>
		<link>http://www.spoofedpacket.net/index.php/2007/08/08/dont-open-this-link/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/08/08/dont-open-this-link/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 18:33:28 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/08/08/dont-open-this-link/</guid>
		<description><![CDATA[The author of the NoScript Firefox extension has highlighted a &#8220;mis-feature&#8221; in Java that allows an uncloseable, full-screen applet with no window decorations to be opened. There is a proof of concept applet available, but for the love of god don&#8217;t open it if you value your sanity. Needless to say the possibilities for annoying [...]]]></description>
			<content:encoded><![CDATA[<p>The author of <a href="http://noscript.net">the NoScript Firefox extension</a> has highlighted a &#8220;mis-feature&#8221; in Java that allows an <a href="http://hackademix.net/2007/08/07/java-evil-popups">uncloseable, full-screen applet with no window decorations</a> to be opened. There is a proof of concept applet available, but for the love of god don&#8217;t open it if you value your sanity.</p>
<p>Needless to say the possibilities for annoying ads and more insidious phishing scams are endless.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/08/08/dont-open-this-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
