<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>[blog.rayfoo]</title>
	
	<link>http://blog.rayfoo.info</link>
	<description>Infosec, DFIR, tech geekery, thoughts and whatnot</description>
	<lastBuildDate>Tue, 08 May 2012 16:36:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/rayfoo" /><feedburner:info uri="rayfoo" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>rayfoo</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Geolocation lookups in Linux (/Ubuntu)</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/nrJ56oOAqac/geolocation-lookups-in-linux-ubuntu</link>
		<comments>http://blog.rayfoo.info/2012/05/geolocation-lookups-in-linux-ubuntu#comments</comments>
		<pubDate>Tue, 08 May 2012 16:36:50 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=1032</guid>
		<description><![CDATA[Have written a short post on this before, but it seems that I've only scratched the surface For Ubuntu/Debian users, the APT package to install would be: MaxMind has (free and commercial) databases that can be queried using these command line tools in Linux. Installing the geoip-bin package installs the free version of the country [...]]]></description>
			<content:encoded><![CDATA[<p>Have written a short <a href="http://blog.rayfoo.info/2010/07/doing-geolocation-lookups-in-command-line">post</a> on this before, but it seems that I've only scratched the surface <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For Ubuntu/Debian users, the APT package to install would be:</p>
<pre class="brush: bash; title: ; notranslate">$ sudo apt-get install geoip-bin</pre>
<p>MaxMind has (free and commercial) <a href="http://www.maxmind.com/app/ip-location">databases</a> that can be queried using these command line tools in Linux.  Installing the geoip-bin package installs the free version of the country database, but you don't need to stop there!</p>
<p>By default, the free IP-Country database is situated at <code>/usr/share/GeoIP/GeoIP.dat</code>.  Do note that the APT package for it is NOT updated automatically, so you will need to update it yourself.</p>
<p>Grabbing hold of the other two free databases (they're updated monthly I think) and placing them the shared folder.  IP-ASN is a nice way to quickly determine the ownership of an IP address, which you can follow up with actually looking through the WHOIS info should that be too generic.  IP-City info comes with geolocation (lat-long coordinates!) info, which is very nice for plotting IP address lists on nice maps for analysis, or for the less technically inclined (or your bosses <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ).</p>
<pre class="brush: bash; title: ; notranslate">$ ls /usr/share/GeoIP/
GeoIPASNum.dat  GeoIP.dat  GeoLiteCity.dat</pre>
<p>It appears that GeoIP and GeoIPASNum are queried automatically by default</p>
<pre class="brush: bash; title: ; notranslate">$ geoiplookup 8.8.8.8
GeoIP Country Edition: US, United States
GeoIP ASNum Edition: AS15169 Google Inc.</pre>
<p>Now let's try querying for basic location information:</p>
<pre class="brush: bash; title: ; notranslate">$ geoiplookup 8.8.8.8 -f /usr/share/GeoIP/GeoLiteCity.dat
GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, 38.000000, -97.000000, 0, 0</pre>
<p>What are the MaxMind database versions currently "installed"?</p>
<pre class="brush: bash; title: ; notranslate">$ geoiplookup 8.8.8.8 -v
GeoIP Country Edition: GEO-106FREE 20120403 Build 1 Copyright (c) 2012 MaxMind Inc All Rights Reserved
GeoIP ASNum Edition: GEO-117 20120402 Build 1 Copyright (c) 2012 MaxMind Inc All Rights Reserved

$ geoiplookup 8.8.8.8 -f /usr/share/GeoIP/GeoLiteCity.dat -v
GeoIP City Edition, Rev 1: GEO-533LITE 20120403 Build 1 Copyright (c) 2012 MaxMind Inc All Rights Reserved</pre>
<p>If you want more verbose reporting (shows the IP address block that matched the query):</p>
<pre class="brush: bash; title: ; notranslate">$ geoiplookup 8.8.8.8 -i
GeoIP Country Edition: US, United States
  ipaddr: 8.8.8.8
  range_by_ip:  8.7.211.0 - 8.14.223.255
  network:      8.8.0.0 - 8.11.255.255 ::14
  ipnum: 134744072
  range_by_num: 134730496 - 135192575
  network num:  134742016 - 135004159 ::14
GeoIP ASNum Edition: AS15169 Google Inc.
  ipaddr: 8.8.8.8
  range_by_ip:  8.8.8.0 - 8.8.8.255
  network:      8.8.8.0 - 8.8.8.255 ::24
  ipnum: 134744072
  range_by_num: 134744064 - 134744319
  network num:  134744064 - 134744319 ::24

$ geoiplookup 8.8.8.8 -f /usr/share/GeoIP/GeoLiteCity.dat -i
GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, 38.000000, -97.000000, 0, 0
  ipaddr: 8.8.8.8
  range_by_ip:  8.7.228.0 - 8.8.37.255
  network:      8.8.0.0 - 8.8.31.255 ::19
  ipnum: 134744072
  range_by_num: 134734848 - 134751743
  network num:  134742016 - 134750207 ::19</pre>
<p>Cooking all of this with a little CLI script-fu for mass lookups!</p>
<pre class="brush: bash; title: ; notranslate">$ output=outputfile.csv; echo &quot;ip,country&quot; &gt; $output; for  i in $( cat /path/to/list-of-ips.txt ); do echo &quot;$i,\&quot;$( geoiplookup -f /usr/share/GeoIP/GeoIP.dat $i | cut -d' ' -f4-99 )\&quot;&quot; &gt;&gt; $output; done</pre>
<p>HTH, and have fun!</p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/nrJ56oOAqac" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/05/geolocation-lookups-in-linux-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/05/geolocation-lookups-in-linux-ubuntu</feedburner:origLink></item>
		<item>
		<title>L2TP (Ubuntu) server setup for iOS clients</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/gKZISGspBxw/l2tp-ubuntu-server-setup-for-ios-clients</link>
		<comments>http://blog.rayfoo.info/2012/04/l2tp-ubuntu-server-setup-for-ios-clients#comments</comments>
		<pubDate>Fri, 20 Apr 2012 17:34:37 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[IPSEC]]></category>
		<category><![CDATA[L2TP]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[server administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=1011</guid>
		<description><![CDATA[For you road warriors who wish to set up their own VPN to secure their traffic when using any untrusted/unprotected networks ("free" WiFi?) when travelling, this would be the thing you use: a trusted VPN setup. While I did dabble with OpenVPN sometime back, protocols like L2TP would be more commonly supported, especially on the [...]]]></description>
			<content:encoded><![CDATA[<p>For you road warriors who wish to set up their own VPN to secure their traffic when using any untrusted/unprotected networks ("free" WiFi?) when travelling, this would be the thing you use: a trusted VPN setup.</p>
<p>While I did dabble with <a href="http://blog.rayfoo.info/tag/openvpn">OpenVPN</a> sometime back, protocols like <a href="http://www.google.com/search?q=l2tp">L2TP</a> would be more commonly supported, especially on the "venerable" iOS device (iPhone, iPod Touch, iPad), and on Windoze machines, Android, etc.</p>
<p>This post will be on what you'll need to setup a L2TP server in Ubuntu for iOS devices to connect to. The server is assumed to be directly accessible from the internet. Some of the stuff are taken from <a href="http://www.jfwhome.com/2012/01/29/ipsecl2tp-vpn-on-linode-ubuntu-server-for-iphoneandroid/">other</a> <a href="http://ubuntuforums.org/showthread.php?t=1645473">places</a>, for my own reference here. There's also a great write up on IPsec over at <a href="http://www.unixwiz.net/techtips/iguide-ipsec.html">Steve Friedl's Unixwiz.net Tech Tips site</a>, for you geeks who actually want to understand a little regarding what you're using (high five!). </p>
<p>The L2TP server setup mainly comprises of three parts actually (surprise!). The L2TP daemon, IPsec daemon and the PPP daemon (providing DHCP services).</p>
<p>Main steps:</p>
<ol>
<li>install openswan (for IPsec), xl2tpd (L2TP) and ppp</li>
<li>configure</li>
<li>configure the (Linux) kernel to turn on IP forwarding, and IP masquerading if the iptables firewall is on</li>
<li>configure the device itself</li>
<li>take a break, have a pina colada or something</li>
<li>profit!</li>
</ol>
<p><span id="more-1011"></span><br />
<strong>Step #1: install</strong></p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install openswan ppp xl2tpd</pre>
<p>Say "No" to creating a certificate when installing openswan.  You will be using a pre-shared secret (password) instead.</p>
<p><strong>Step #2: configure</strong><br />
The config files:</p>
<p>---<br />
/etc/ipsec.conf</p>
<pre class="brush: plain; title: ; notranslate">version 2.0

config setup
  nat_traversal=yes
  virtual_private=%v4:10.0.0.0/8,%v4:192.168.1.0/16,%v4:172.16.0.0/12
  oe=off
  protostack=netkey

include /etc/ipsec.d/l2tp-psk.conf</pre>
<p>---<br />
/etc/ipsec.d/l2tp-psk.conf<br />
(change left &#038; leftnexthop values accordingly)<br />
left is your external interface IP<br />
leftnexthop is the router for the external interface</p>
<pre class="brush: plain; title: ; notranslate">conn L2TP-PSK-NAT
  rightsubnet=vhost:%priv
  also=L2TP-PSK-noNAT

conn L2TP-PSK-noNAT
  authby=secret
  pfs=no
  auto=add
  keyingtries=3
  rekey=no
  type=transport
  left=192.168.1.22
  leftnexthop=192.168.1.1
  leftprotoport=17/1701
  right=%any
  rightprotoport=17/%any
  dpddelay=15
  dpdtimeout=30
  dpdaction=clear
  #Uncomment the line below for OSX on MAC?  untested!
  #rightprotoport=17/0</pre>
<p>---<br />
/etc/xl2tpd/xl2tpd.conf<br />
(change ip range &#038; local ip)<br />
Important: "local ip" value must be outside "ip range"</p>
<pre class="brush: plain; title: ; notranslate">[global]
ipsec saref = yes
[lns default]
ip range = 192.168.1.231-192.168.1.239
local ip = 192.168.1.230
refuse chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes</pre>
<p>---<br />
/etc/ppp/options.xl2tpd<br />
(change ms-dns value to point to the relevant DNS resolver for the server)</p>
<pre class="brush: plain; title: ; notranslate">require-mschap-v2
ms-dns 192.168.1.1
asyncmap 0
auth
crtscts
lock
hide-password
modem
debug
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4</pre>
<p>---<br />
/etc/ppp/chap-secrets<br />
(change and create username &#038; password values as needed)<br />
In the example below, username=test and password=testpass<br />
Important: The IP address ("192.168.1.233") for each user must be in the "ip range" from the /etc/xl2tpd/xl2tpd.conf setting. Repeat for additional users using different IP addresses within the range.</p>
<pre class="brush: plain; title: ; notranslate">test l2tpd testpass 192.168.1.233
l2tpd test testpass 192.168.1.233</pre>
<p>---<br />
/etc/ipsec.secrets<br />
(change IP address to your external IP, and the secret "TestSecret" to something else)</p>
<pre class="brush: plain; title: ; notranslate">192.168.1.22   %any:  PSK &quot;TestSecret&quot;</pre>
<p>---<br />
Restart the daemons after configuring.  Remember to configure your firewall for inbound access on UDP/500, UDP/4500 and UDP/1701 too.</p>
<pre class="brush: bash; title: ; notranslate">sudo /etc/init.d/pppd-dns restart
sudo /etc/init.d/xl2tpd restart
sudo /etc/init.d/ipsec restart</pre>
<p><strong>Step #3: configure IP forwarding</strong><br />
edit this file below, and add in these lines above the "exit 0;" line in the file (the last line)<br />
/etc/rc.local</p>
<pre class="brush: plain; title: ; notranslate">echo 1 &gt; /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE</pre>
<p>after editing the file, run it once first</p>
<pre class="brush: bash; title: ; notranslate">sudo /etc/rc.local</pre>
<p><strong>Step #4: configure your device</strong><br />
iOS (iPhone, etc.) settings are below, the settings for desktops like Windows should be similar.  You can set them in iOS devices under Settings > General > Network > VPN > Add VPN Configuration...remember to change the example accordingly to what you set in your own configuration files above (you didn't use the sample configuration flies wholesale...did you?)</p>
<pre class="brush: plain; title: ; notranslate">L2TP
Description: &lt;as you wish&gt;
Server: &lt;server's external IP address&gt;
Account: test
RSA SecurID: OFF
Password: testpass
Secret: TestSecret
Send All Traffic: ON
Proxy: Off</pre>
<p><strong>Step #5: take a break</strong><br />
You've survived! Now take a breather <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Step #6: profit!</strong><br />
Turn on the VPN by activating the slider in Settings, and enjoy! <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>HTH.</p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/gKZISGspBxw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/04/l2tp-ubuntu-server-setup-for-ios-clients/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/04/l2tp-ubuntu-server-setup-for-ios-clients</feedburner:origLink></item>
		<item>
		<title>Linux Login Detection Redux</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/o4tgo6BpJNA/linux-login-detection-redux</link>
		<comments>http://blog.rayfoo.info/2012/04/linux-login-detection-redux#comments</comments>
		<pubDate>Mon, 09 Apr 2012 15:59:54 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[email notification]]></category>
		<category><![CDATA[hardening]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linode]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server administration]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=1001</guid>
		<description><![CDATA[Have almost forgotten how fun it is to mess around with a Linux server. Building another Linux server did indeed bring back some memories This is another scratchpad post: little to no explanation/breakdown on the script involved (unless there's the "impetus" to elaborate in future). Feel free to ask/discuss in the comments section below though. [...]]]></description>
			<content:encoded><![CDATA[<p>Have almost forgotten how fun it is to mess around with a Linux server. Building another Linux server did indeed bring back some memories <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>This is another scratchpad post: little to no explanation/breakdown on the script involved (unless there's the "impetus" to elaborate in future). Feel free to ask/discuss in the comments section below though.</p>
<p>Any user who logs in <em>should</em> trigger the sending of the notification email from the server immediately, and if it wasn't an expected login, well at least you'd know it's time to trigger some incident response processes.</p>
<p>As an improved version of the <a href="http://blog.rayfoo.info/2009/09/getting-your-server-to-send-an-email-whenever-anyone-logs-in">old post</a> on the same topic, this script similarly is to be appended to <code>/etc/profile</code> or the relevant <code>~/.bash_profile</code> per user.</p>
<pre class="brush: bash; title: ; notranslate">echo -e &quot;$(hostname) shell access\n$(date)\n$(who)\n\
$(for i in $(who|cut -d&quot;(&quot; -f2|cut -d&quot;)&quot; -f1|cut -d&quot;:&quot; -f1|sort -u);
do echo -e &quot;==========\nwhois $i&quot;; whois $i;
echo -e &quot;\n=====\nreverse $i&quot;; dig -x $i;
done;)&quot; | \
mail -s &quot;$(hostname) alert: shell access from \
$(who|cut -d&quot;(&quot; -f2|cut -d&quot;)&quot; -f1|cut -d&quot;:&quot; -f1|tr &quot;\n&quot; &quot; &quot;)&quot; \
'youremail@domain.com'</pre>
<p>Changes namely are the adding of whois and reverse IP (DNS PTR) lookups for all IP addresses currently logged on via SSH, and also the use of the more readable <code>$()</code> Bash <a href="http://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html#Command-Substitution">command substitution</a> expansion rather than the backtick (<code>`</code>).</p>
<p>You will need to have installed the mailutils package (<code>apt-get install mailutils</code>), and probably a MTA like postfix or exim too.</p>
<p>HTH.</p>
<p>Edit 30 Apr 2012: small bug fix in the sequence to extract all IPs from the who command output. </p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/o4tgo6BpJNA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/04/linux-login-detection-redux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/04/linux-login-detection-redux</feedburner:origLink></item>
		<item>
		<title>Giving back</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/1-4rwWjqzJw/giving-back</link>
		<comments>http://blog.rayfoo.info/2012/03/giving-back#comments</comments>
		<pubDate>Sat, 10 Mar 2012 15:55:10 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[DFIR]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=996</guid>
		<description><![CDATA[Script kiddy. Tool hacker. Tool maker. In the various infosecurity circles, it is not uncommon to see various people and organizations contributing to community: be it in the form of knowledge/HOWTOs, or discussions, or tools written and released. While commercial offerings (courses, products, solutions) have their place. It is pretty much the case everywhere to [...]]]></description>
			<content:encoded><![CDATA[<p>Script kiddy. Tool hacker. Tool maker. </p>
<p>In the various infosecurity circles, it is not uncommon to see various people and organizations contributing to community: be it in the form of knowledge/HOWTOs, or discussions, or tools written and released. </p>
<p>While commercial offerings (courses, products, solutions) have their place. It is pretty much the case everywhere to see that most people get started off, and maintain, their training and equipping in the "open source"/free realm. </p>
<p>As a sysadmin turned webappsec ethical hacker turned DFIR geek, the situation is very much the same too. Much of what I know came thanks to those who shared selflessly with the community. </p>
<p>I'm very much a tools kind of person, which is also why I see the scale as from one who only uses (i.e. leeches <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ) to the ones who know enough to modify/add on to existing tools, to the ones who get their hands dirty, implementing the tools that they envisioned themselves. This is also one of the scales along which I would want to progress professionally: from one who feeds/leeches off the feeders, to eventually feeding the community. </p>
<p>At what stage am I at now? Probably the "tool hacker" kind of stage, although I've been leeching too much of late! Time will tell if I move (up or down this scale), or if priorities change altogether. But whichever the case, it should always hold true that we need to give back to community with our work. And what better way than to start off by giving back the same way we learnt the ropes ourselves?</p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/1-4rwWjqzJw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/03/giving-back/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/03/giving-back</feedburner:origLink></item>
		<item>
		<title>The “Why” of Work</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/nY1QYpEts-M/the-why-of-work</link>
		<comments>http://blog.rayfoo.info/2012/02/the-why-of-work#comments</comments>
		<pubDate>Sun, 19 Feb 2012 15:55:33 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[Christian]]></category>
		<category><![CDATA[values]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=993</guid>
		<description><![CDATA[Along the way in my work life (so far), I have been asked the question "What do you want to be working as in the end?" That question has never been of prime importance to me, though for personal preferences I'm pretty sure I'd like to be in the infosec industry (as of now I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.rayfoo.info/wp-content/uploads/2012/02/20120221-095454.jpg" alt="20120221-095454.jpg" class="alignnone size-full" /></p>
<p>Along the way in my work life (so far), I have been asked the question "What do you want to be working as in the end?"</p>
<p>That question has never been of prime importance to me, though for personal preferences I'm pretty  sure I'd like to be in the infosec industry (as of now I guess?). </p>
<p>The more important guiding principles/question would be "Why do you work?"</p>
<p>Got a good reminder today regarding some core reasons for working:</p>
<ol>
<li>To care for family (eg. put food on the table) </li>
<li>To care for the church (people, work)</li>
<li>To be of use to society with the work done</li>
</ol>
<p>I left my first job because it stopped fulfilling all three conditions. Will need to keep on remembering these as I continue to <del>slog <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </del>work for the most part of my remaining years.</p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/nY1QYpEts-M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/02/the-why-of-work/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/02/the-why-of-work</feedburner:origLink></item>
		<item>
		<title>Definitions</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/j9o2nOnMV-k/definitions</link>
		<comments>http://blog.rayfoo.info/2012/01/definitions#comments</comments>
		<pubDate>Tue, 24 Jan 2012 22:47:42 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[DFIR]]></category>
		<category><![CDATA[log analysis]]></category>
		<category><![CDATA[log forensics]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=986</guid>
		<description><![CDATA[Quoting from Anton Chuvakin's slides in his presentation in 2006 at FIRST: Log analysis is (the) trying to make sense of system and network logs. Computer forensics is (the) application of the scientific method to digital media in order to establish factual information for judicial review. So... Log forensics is (the) trying to make sense [...]]]></description>
			<content:encoded><![CDATA[<p>Quoting from Anton Chuvakin's slides in his presentation in 2006 at FIRST:</p>
<blockquote><p><strong>Log analysis</strong> is (the) trying to make sense of system and network logs. </p>
<p><strong>Computer forensics</strong> is (the) application of the scientific method to digital media in order to  establish factual information for judicial review. </p>
<p>So...</p>
<p><strong>Log forensics</strong> is (the) trying to make sense of system and network logs, in order to  establish factual information for judicial review. </p></blockquote>
<p>Makes sense, maybe I've been googling for the wrong keywords all this time! Till of late, I've been looking at this field largely from a data mining viewpoint.</p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/j9o2nOnMV-k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/01/definitions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/01/definitions</feedburner:origLink></item>
		<item>
		<title>Things to do before (and when) you lose your phone</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/FclfoSs2-5Y/things-to-do-before-and-when-you-lose-your-phone</link>
		<comments>http://blog.rayfoo.info/2012/01/things-to-do-before-and-when-you-lose-your-phone#comments</comments>
		<pubDate>Mon, 23 Jan 2012 04:35:53 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[incident handling]]></category>
		<category><![CDATA[incident response]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=980</guid>
		<description><![CDATA[Had the harrowing experience of losing a phone for a while. Coupled with having to look for it in the rain (could have been dropped somewhere), it's certainly not something anyone would want to go through. Just like in incident response, two things held true: If you don't have a "incident" response plan, you're only [...]]]></description>
			<content:encoded><![CDATA[<p>Had the harrowing experience of losing a phone for a while. Coupled with having to look for it in the rain (could have been dropped somewhere), it's certainly not something anyone would want to go through. </p>
<p>Just like in incident response, two things held true:</p>
<ul>
<li>If you don't have a "incident" response plan, you're only going to panic (a lot more) when it happens. </li>
<li>Doing an AAR helps! </li>
</ul>
<p>There're things that can be done to make the loss/theft of your phone a lot less traumatic, and possibly less painful if you really don't get your phone back. They happen to be the <strong><em>things that you could do when you get a new phone</em></strong>. </p>
<p><strong>Preparing for what should not happen:</strong></p>
<ul>
<li><strong>Note down IMEI</strong> of phone (dial *#06#)</li>
<li><strong>Set up phone tracking/remote lockdown</strong>. Apple users have <a href="http://www.apple.com/mobileme/setup/">MobileMe</a> / <a href="http://www.apple.com/icloud/setup/">iCloud</a> for iOS. There are ways to do so for <a href="http://lifehacker.com/5611003/build-a-find-my-iphone-clone-for-android">Android</a> too. Remember to set a good password which is not reused anywhere else!</li>
<li><strong>Note down details of the taxis that you board</strong> (taxi company, license plate, make/model of taxi). Takes getting used to though. </li>
</ul>
<p><img src="http://blog.rayfoo.info/wp-content/uploads/2012/01/20120124-155201.jpg" alt="horror" class="alignnone size-full" /></p>
<p><strong>What to do when phone's stolen/lost (in order)</strong></p>
<ol>
<li><strong>DON'T PANIC</strong>, knee jerk reactions are not what you want!</li>
<li><strong>Recall when you last used/saw the phone</strong>. Retrace your steps and narrow down the possibilities on where to search. Confirm that it was indeed dropped somewhere/in the taxi. </li>
<li><strong>Lock phone remotely if you can, and haven't locked it already</strong> (Apple's Find My iPhone allows you to do that if you've set it up already). For the average Joe who picks up the phone, it makes the world of difference between a phone that he/she can use straight away and one that he/she is better off returning. </li>
<li><strong>Call in 5-15 minute intervals to locate/get someone's attention to the phone</strong>. Don't call non-stop as there's no point in spamming your phone, especially if it's going to result in a flat battery which is worse off.</li>
<li><strong>Leave a message for any would-be finder to be able to contact you and return the phone</strong>. You could use the phone tracker, or simply SMS/WhatsApp/etc. Many phones show the message contents without having to unlock the screen (!!!). </li>
<li><strong>Locate the phone</strong>, mainly to see if it's trivially retrievable (left on the floor somewhere, or taxi's stationery), or for the police report to come later. </li>
<li><strong>Call for help</strong> (taxi company). There's an <a href="http://www.taxisingapore.com/contacts/">awesome list</a> of Singapore taxi companies' numbers out there. </li>
<li><strong>Lodge reports</strong> especially when your chances of getting the phone back are slim, or when it's been a while since you've been able to find it/get it back. For the phone itself (property) and any other items of importance that was lost together like identity cards, call the police or make use of the <a href="http://www.spf.gov.sg/epc/">SPF's e-services</a> to lodge a report. Credit cards that were with the phone should be cancelled regardless of whether you get the phone back or not since there's a high likelihood that someone else has seen your CC number and <a href="http://en.wikipedia.org/wiki/Card_Verification_Value">CVV</a>. You do <strong>NOT</strong> want to go through additional heartache and trouble of undoing credit card transactions by the unscrupulous. </li>
</ol>
<p>That's all for now. Stay safe, and stay calm <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Edit: I guess if this happens you could just skip straight to locking the phone and calling the police.<br />
<a href="http://blog.rayfoo.info/wp-content/uploads/2012/01/20120125-083217.jpg"><img src="http://blog.rayfoo.info/wp-content/uploads/2012/01/20120125-083217.jpg" alt="20120125-083217.jpg" class="alignnone size-full" width="400" /></a></p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/FclfoSs2-5Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/01/things-to-do-before-and-when-you-lose-your-phone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/01/things-to-do-before-and-when-you-lose-your-phone</feedburner:origLink></item>
		<item>
		<title>A day of firsts to remember</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/PhsK1ujitSM/a-day-of-firsts-to-remember</link>
		<comments>http://blog.rayfoo.info/2012/01/a-day-of-firsts-to-remember#comments</comments>
		<pubDate>Tue, 17 Jan 2012 03:55:24 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=975</guid>
		<description><![CDATA[First run and dinner with folks from the office, but more importantly, the first time where wife meets friends from the office, which took almost two whole years from my first joining this place, probably no thanks to what had happened in the days of the K... Also first run in bloody hot weather, thank [...]]]></description>
			<content:encoded><![CDATA[<p>First run and dinner with folks from the office, but more importantly, the first time where wife meets friends from the office, which took almost two whole years from my first joining this place, probably no thanks to what had happened in the days of the K...</p>
<p>Also first run in bloody hot weather, thank God we didn't get heat stroke or anything.</p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/PhsK1ujitSM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/01/a-day-of-firsts-to-remember/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/01/a-day-of-firsts-to-remember</feedburner:origLink></item>
		<item>
		<title>Where are the discussions on analyzing logs in DFIR?</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/3VdIXm_QXs0/where-are-the-discussions-on-analyzing-logs-in-dfir</link>
		<comments>http://blog.rayfoo.info/2012/01/where-are-the-discussions-on-analyzing-logs-in-dfir#comments</comments>
		<pubDate>Tue, 17 Jan 2012 00:27:01 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[DFIR]]></category>
		<category><![CDATA[logs analysis]]></category>
		<category><![CDATA[musings]]></category>
		<category><![CDATA[network forensics]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=973</guid>
		<description><![CDATA[It's funny how much (or rather, little) is talked about in DFIR circles about analyzing logs before/during an incident. While it is really sexy (oh yeah!) to be able to dig out stuff from a computer that Joe or that pesky malware writer tried to hide, responding to incidents requires information to be surfaced as [...]]]></description>
			<content:encoded><![CDATA[<p>It's funny how much (or rather, little) is talked about in DFIR circles about analyzing logs before/during an incident. </p>
<p>While it is really sexy (oh yeah!) to be able to dig out stuff from a computer that Joe or that pesky malware writer tried to hide, responding to incidents requires information to be surfaced as much and fast as possible in order to solve the mystery and contain the damage. And for organization-scale incidents, one great source of information would be the logs generated from the various endpoints/perimeter devices. </p>
<p>So far there's the area of SIEMs and logs management, where we get the heavyweights like Anton Chuvakin. The closest could perhaps be SANS' network forensics course offerings, but the coverage is glancing at best. But looking for discussions in terms of analyzing logs specifically for DFIR, zilch. Perhaps I'm looking at the wrong areas, if so do let me know <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>As with many security-related domains, the more an area is publicly shared, researched and discussed, the more the good guys stand to gain. The flip side argument being that the bad guys are reading the same stuff too, but that's another topic to be visited another time. </p>
<p>Till then, will share whatever I can about this area that I've learnt so far.  It's really a curious monster in itself amongst DFIR efforts.</p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/3VdIXm_QXs0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/01/where-are-the-discussions-on-analyzing-logs-in-dfir/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/01/where-are-the-discussions-on-analyzing-logs-in-dfir</feedburner:origLink></item>
		<item>
		<title>Highly Predictive Blacklists</title>
		<link>http://feedproxy.google.com/~r/rayfoo/~3/v-wqYF_iAAE/highly-predictive-blacklists</link>
		<comments>http://blog.rayfoo.info/2012/01/highly-predictive-blacklists#comments</comments>
		<pubDate>Mon, 16 Jan 2012 23:39:43 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[bag of tricks]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[threat modeling]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=971</guid>
		<description><![CDATA[SANS Internet Storm Center has a service for DShield log contributors called HPBs (Highly Predictive Blacklists). Since their summary is succinct enough I will just quote it here: DShield.org in collaboration with SRI International has established a new experimental custom source address blacklist generation service available to all DShield.org contributors. This new service utilizes a [...]]]></description>
			<content:encoded><![CDATA[<p>SANS Internet Storm Center has a service for DShield log contributors called HPBs (<a href="http://www.dshield.org/hpbinfo.html">Highly Predictive Blacklists</a>). Since their summary is succinct enough I will just quote it here:</p>
<blockquote><p>DShield.org in collaboration with SRI International has established a new experimental custom source address blacklist generation service available to all DShield.org contributors. This new service utilizes a radically different approach to blacklist formulation called Highly Predictive Blacklisting. Each DShield contributor can now access a unique HPB (instructions below) that reflects the most probable set of source addresses that will connect to that contributor's network over a prediction window that may last several days into the future.</p>
<p>Highly predictive blacklists employ a link analysis algorithm similar to Google's PageRank scheme used to find the most relevant web pages given a user's query. Similar to a web query, DShield contributor's firewall logs are cross-compared in search of overlaps among the attackers they report. Each attacker address that is included in an HPB is selected by favoring those ad-dresses that are encountered by other contributors that share degrees of overlap with the HPB owner.</p>
<p>How does it work (for non math geeks <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ): We compare your firewall logs to firewall logs submitted by others. If you and other submitters are hit on similar ports, then your are more likely to be attacked by the same IPs. Your personal "HPB" is created from the IP addresses that target submitters with similar reports as you.</p></blockquote>
<p>While this is directly useful to firewall administrators, the concept could potentially be extended to other domains/uses too. Filing this under "bag of tricks" for now <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/rayfoo/~4/v-wqYF_iAAE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2012/01/highly-predictive-blacklists/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.rayfoo.info/2012/01/highly-predictive-blacklists</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.780 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-05-09 00:39:03 --><!-- Compression = gzip -->

