<?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>yurisk.info</title>
	<atom:link href="http://yurisk.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://yurisk.info</link>
	<description>Technical Blog about IT Security and Networking</description>
	<lastBuildDate>Mon, 08 Mar 2010 21:51:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>awk weekly &#8211; Checkpoint Anti Spam statistics or viva la Open Relays</title>
		<link>http://yurisk.info/2010/03/08/awk-weekly-checkpoint-anti-spam-statistics-or-viva-la-open-relays/</link>
		<comments>http://yurisk.info/2010/03/08/awk-weekly-checkpoint-anti-spam-statistics-or-viva-la-open-relays/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 20:56:38 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Awk weekly]]></category>
		<category><![CDATA[Checkpoint NG/NGX]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=556</guid>
		<description><![CDATA[Goooood day everyone again,
today I have had another fight with the spam cartel that my client fell victim of. Once upon a time there was not so powerful UTM providing internet to not so crowded office in not so security-aware Central Europe.
All would be good and well if not this problem &#8211; they could not [...]]]></description>
			<content:encoded><![CDATA[<p>Goooood day everyone again,<br />
today I have had another fight with the spam cartel that my client fell victim of. Once upon a time there was not so powerful UTM providing internet to not so crowded office in not so security-aware Central Europe.<br />
All would be good and well if not this problem &#8211; they could not send emails outside as the IP of the firewall entered every imaginable blacklist on the Earth. Hmm, but the firewall has AntiSpam subscription service up and running.<br /> LAN is blocked on port 25 outbound except the Exchange. Antivirus is everywhere so low chance of spam coming from LAN. In SmartView Tracker lots of SMTP rule logs in red &#8211; spam entering Exchange is blocked .<br /> <br />
So what the &#8230;? tcpdump with -w option for 5 minutes was all I needed to see that Exchange was open relay and kindly offered to relay spam from everyone to everywhere.<br />
To really measure the impact of the event I had to have some statistics and Checkpoint didn&#8217;t help me much with that , eventhough this UTM has also SmartView Monitor license it is not suited for the task. So  I exported fw.log on the UTM into text human-awk-readable format , that took some 40 mins on 300 Mb log file and produced text file of 475 Mb, and then did whatever I wanted with the data using awk.<br />
Now get some action:<br />
Script 1 &#8211; Find all mails rejected in direction from LAN (interface Internal, remember it is UTM) to the Internet (interface External) , then gather statistics of how many mails came from what ip [less relevant here as all mails come from Exchnage, but in environment where hosts send mails directly outside it is] and show us :</p>
<div class="cmd"># awk -F\;  &#8216;/Internal to External/ &#038;&#038; /reject/ {print $2}&#8217; ./fw.log.txt | awk &#8216; {match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/,IP);  IPS[IP[0]]++ } END  { for (spammer_ips in IPS) print spammer_ips &#8221;  &#8221; IPS[spammer_ips]}&#8217; | sort -n -k2,2</div>
<pre>192.168.14.12  402804 </pre>
<p>Yahooooo! In the timeframe of 28 hours there were blocked 402804 mails as spam coming from Exchange!<br />
Not bad at all &#8211; all this without any malware installed on the client side [my educated by Wireshark guess here as I dont have access to the Exchange],just amazing!<br />
<br />Now let&#8217;s have a look at overal number of mails that was accepted and sent outside to the Internet :<br />
Script 2 &#8211; Find all mails accepted in direction from LAN (interface Internal) to the Internet (interface External) , then gather statistics of how many mails came from what ip  and show us :</p>
<div class="cmd"> # awk -F\;  &#8216;/Internal to External/ &#038;&#038; /accept/ {print $2}&#8217; ./fw.log.txt | awk &#8216; {match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/,IP);  IPS[IP[0]]++ } END  { for (spammer_ips in IPS) print spammer_ips &#8221;  &#8221; IPS[spammer_ips]}&#8217; | sort -n -k2,2<br />
192.168.14.12  257940 </div>
<p>Wow! in addition to 402804  mails blocked by Checkpoint firewall as spam 257940 mails were sent out as clean, given that this is a very small office hardly sending 300 mails a day we get ratio of 39% spam passing through the Checkpoint Antispam , pity . Antispam blocking rate of 61% ?  In 21st century ? Wake up !<br />
<br /> Just for statistics I also calculated how many spam emails were blocked from outside inbound:<br />
Script 3 &#8211; gather how many mails from outside coming in were rejected by Checkpoint as spam.</p>
<div class="cmd">  #  awk -F\;  &#8216;/External to Internal/ &#038;&#038; /reject/ {print $2}&#8217; ./fw.log.txt | wc
 </div>
<pre>#    5593   11186  112648</pre>
<p> So only 5593 incoming spam emails and almost half a million outgoing ones &#8211; that&#8217;s what I call effectiveness.<br />
Script 4 &#8211; gather statistics on blocked emails and IPs it came from:</p>
<div class="cmd"># awk -F\;  &#8216;/External to Internal/ &#038;&#038; /reject/ {print $2}&#8217; ./fw.log.txt | awk &#8216; {match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/,IP);  IPS[IP[0]]++ } END  { for (spam_ips in IPS) print spam_ips &#8221;  &#8221; IPS[spam_ips]}&#8217; | sort -n -k2,2 </div>
<p>And here are some results:
<pre>
93.81.26.2  75
91.121.114.1  81
220.168.57.1  87
58.9.205.2  129
122.102.101.1  149
58.137.99.7  160
189.35.231.6  189
60.248.174.6  631 </pre>
<p>PS I know Checkpoint folks visit here , so if you think I get some data wrong &#8211; don&#8217;t be shy to correct me,all fixes are gladly welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/03/08/awk-weekly-checkpoint-anti-spam-statistics-or-viva-la-open-relays/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Abra &#8211; the new toy from the Checkpoint</title>
		<link>http://yurisk.info/2010/03/03/abra-the-new-toy-from-the-checkpoint/</link>
		<comments>http://yurisk.info/2010/03/03/abra-the-new-toy-from-the-checkpoint/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 20:39:20 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=540</guid>
		<description><![CDATA[Checkpoint announced availability (for inquiries yet) of their new project Abra &#8211; secured virtualized desktop solution. I myself haven&#8217;t seen nor tried this so can only judge from different sources. In essence we talk here about USB stick of approx. 5 Gb or 8 Gb that includes virtual image of the applications you need to [...]]]></description>
			<content:encoded><![CDATA[<p>Checkpoint announced availability (for inquiries yet) of their new project Abra &#8211; secured virtualized desktop solution. I myself haven&#8217;t seen nor tried this so can only judge from different sources. In essence we talk here about USB stick of approx. 5 Gb or 8 Gb that includes virtual image of the applications you need to do the work and optionally to connect securely to your workplace (to the Checkpoint gateway of course).<br />
The testing (I know of) was done on their own employees that were given those Abra-sticks to work from home.<br />
The way it works is pretty simple &#8211; you have encrypted (so they say) virtual desktop environment on stick ,<br />
which you connect to any PC and upon entering user/pass can work using pre-installed and pre-configured<br />
software on it . The sticks that Checkpoint gave to their workers contained Windows XP with set of usual software &#8211; browser, Microsoft Office etc. , also VPN client .<br />
In short nothing new on the market except encryption &#8211; do a search on <strong>Virtual desktop infrastructure </strong>and you&#8217;ll get the idea. What interesting here is how they are planning to integrate this new buzz-project with all the rest of their line. Because otherwise it isn&#8217;t even worth trying to market it (put on USB VMware Player with windows XP and you get the same but without encryption).<br />
The webpage from the CP is here:<br />
<a href="http://www.checkpoint.com/products/abra/index.html"> Check Point Abra | Check Point Software</a><br />
To see what people think about that you may go here:<br />
<a href="http://www.cpug.org/forums/other/12930-webinar-check-point-introduces-abra.html">CPUG.ORG discussion on Abra </a><br />
If you have Partner level access to the Checkpoint site you may hear the Webcast presenting the Abra for the first time:<br />
<a href="http://www.checkpoint.com/partners/resources/special_archive.html"> webcast archives </a><br />
<strong> NOTE: see the comments for a more correct (than mine) view of this new product</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/03/03/abra-the-new-toy-from-the-checkpoint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cisco IPS sensor &#8211; initial setup</title>
		<link>http://yurisk.info/2010/02/28/cisco-ips-sensor-initial-setup/</link>
		<comments>http://yurisk.info/2010/02/28/cisco-ips-sensor-initial-setup/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 16:05:30 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco IPS]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=530</guid>
		<description><![CDATA[Hello everyone. As I proceed in my studies towards the CCIE Security lab I&#8217;m starting a new category on the site – Cisco IPS. I will be posting all the things I learn about this gear, even the basics as I noted that on the Internet Cisco IPS sensors
are not much talked about and while [...]]]></description>
			<content:encoded><![CDATA[<div class="portant">Hello everyone. As I proceed in my studies towards the CCIE Security lab I&#8217;m starting a new category on the site – Cisco IPS. I will be posting all the things I learn about this gear, even the basics as I noted that on the Internet Cisco IPS sensors<br />
are not much talked about and while not sure why this is so, I’ll try to fill the gap. </div>
<p>Initial Configuration.<br />
By default , out of the box the sensor has the following defaults:</p>
<div>Management IP: 10.1.9.201/24<br />
Default gateway: 10.1.9.1 Allowed access: from the network 10.1.9.201/24<br />
Telnet access: disabled<br />
HTTPS: port 443 </div>
<p>As most likely your network has different network address the first thing to do is change management IP, default gateway and allowed management access network(s)/IP. You do so by connecting with console to it .<br />
You can configure these basic network settings in 2 ways: enter all the configuration commands on CLI (if you know them) or run interactive menu-type setup by issuing on the CLI: <strong>#setup </strong>. I’ll show both ways but let&#8217;s start with the setup menu.<br />
A short remark – IPS sensor is the one of not so many devices in the Cisco family that configuring/managing/communicating with it using its GUI interface is the recommended and preferred way . It is much more intuitive, simple, produces the very same configuration at the device as done in CLI. The only time you may need to do stuff with CLI is initial setup and debug.</p>
<p>Configuring minimal required settings through setup menu:</p>
<ol>
<li>Connect to the device by terminal </li>
<li>enter default user/password: cisco/cisco (or see the documentation coming with the device);</li>
<li>run:<br />
sensor# setup</li>
<p>-	First you are presented with the whole configuration currently set, just hit Space key until it reaches the end and asks whether you want to enter the setup dialog , print yes and Enter:</p>
<pre>
Continue with configuration dialog?[yes]:
Enter host name[sensor]: IPS4235  <span class="reg">Here I set hostname to IPS4235</span>
Enter IP interface[10.1.9.201/24,10.1.9.1]: 10.0.0.33/24,10.0.0.254  <span class="reg"> Pay attention to the syntax of specifying the management IP its subnet mask and default gateway</span>
Enter telnet-server status[disabled]: enable    <span class="reg"> I say yes here but you are advised to say no on production devices</span>
Enter web-server port[443]:        <span class="reg"> Default https listening port</span>
Modify current access list?[no]: yes
Current access list entries:
  No entries
Permit: 10.0.0.100/32             <span class="reg">    I allow management access to the device form this specific station </span>
Permit:                    <span class="reg">   Hit Enter to move to the next menu item</span>
Modify system clock settings?[no]: no
Modify summer time settings?[no]: no
Modify system timezone?[no]: no
Modify interface/virtual sensor configuration?[no]: no
Modify default threat prevention settings?[no]:
------cut here------------
exit exit
</pre>
<p>Upon finishing all the menu items in the dialog you are presented with the configuration you just entered :</p>
<pre>The following configuration was entered.
service host
network-settings
host-ip 10.0.0.33/24,10.0.0.254
host-name IPS4235
telnet-option enabled
access-list 10.0.0.100/32
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
exit
summertime-option disabled
ntp-option disabled
exit
service web-server port 443 </pre>
<p>At the end of the output you are given the following choices:</p>
<pre>[0] Go to the command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration and exit setup.
 Enter your selection[2]:   2 </pre>
<p>Then device asks to reboot in order for the changes to take effect – confirm that.<br />
After reboot you may enter the sensor using supported browser by the management IP: https://10.0.0.33<br />
Also make sure the station you are connecting from has Java virtual machine installed as the GUI is entirely based on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/28/cisco-ips-sensor-initial-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>awk weekly &#8211; how to see Checkpoint logs on command line</title>
		<link>http://yurisk.info/2010/02/26/awk-weekly-how-to-see-checkpoint-logs-on-command-line/</link>
		<comments>http://yurisk.info/2010/02/26/awk-weekly-how-to-see-checkpoint-logs-on-command-line/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 20:12:57 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Awk weekly]]></category>
		<category><![CDATA[Checkpoint NG/NGX]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=518</guid>
		<description><![CDATA[Hey Everyone, I decided to start a weekly column of awk scripting where I will bring interesting (I am being subjective I know) short scripts that made my life easier in dealing with actual problems in the wild or just look cool.
Until recently I had never had any need to work with Checkpoint log files [...]]]></description>
			<content:encoded><![CDATA[<div class="portant">Hey Everyone, I decided to start a weekly column of awk scripting where I will bring interesting (I am being subjective I know) short scripts that made my life easier in dealing with actual problems in the wild or just look cool.</div>
<p>Until recently I had never had any need to work with Checkpoint log files without SmartView Tracker , namely on the command line. But there is always first time . Client complained on some dropped mail traffic and to even say if there is any problem or not I had to look at relevant logs, not a big deal except that I had only ssh access to the firewall . Checkpoint provided for such cases <strong>fw log </strong> command line log extracting utility that reads the binary log file (<strong> fw.log </strong> by default) you feed in and outputs it in human-readable format. That’s good, but its filtering possibilities are quite bad . You can see all available options with <strong>fw log –h </strong>, but selection is limited to source, start/end time,action (drop/reject/etc) . Not that much to say the least . No port/direction filtering . And specifically it was a very busy firewall – some 80 mbytes of traffic passing through at any given moment and log is the default action on any rule. So using fw log filters would help me not. <br />
Here is how I solved this with the help of awk – I exported to text format all logs using</p>
<div class="cmd"># fw log -n> fw_log.txt &#038; </div>
<p>Note –n option to fw log here – it prevents resolving IP/ports to names , shortens processing time by ~70%<br />
Then I just used all-powerful awk to search the text file to show the client what was the reason (Exchange in LAN was sending heaps of spam that Anti-Spam stopped at its best but nevertheless some spam leaked and caused RBL blocking of the external firewall IP) :</p>
<div class="cmd">[Expert@Orlean] # awk &#8216;/Anti Spam/ &#038;&#038; /Internal to External/&#8217; fw_log.txt | awk -F: &#8216; {print $5 $6}&#8217; </div>
<pre>192.168.143.12; dst 65.55.37.88; proto
192.168.143.12; dst 65.55.92.136; proto
192.168.143.12; dst 65.55.92.136; proto
192.168.143.12; dst 203.216.247.184; proto</pre>
<p>Here:<br />
External, Internal &#8211; UTM interface names and direction of the Anti-Spam scanning<br />
NOTE: exporting logs from binary to text takes a bit of time, depends on situation. Enabling name resolving sky-rocketed the processing time to 15 minutes , but on the other hand gave some additional insight :</p>
<pre>Exchange; dst col0-mc2-f.col0.hotmail.com; proto
Exchange; dst mx1.hotmail.com; proto
Exchange; dst mx1.hotmail.com; proto
Exchange; dst mta19.mail.vip.tnz.yahoo.co.jp; proto
Exchange; dst bay0-mc2-f.bay0.hotmail.com; proto
Exchange; dst mx3.hotmail.com; proto</pre>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/26/awk-weekly-how-to-see-checkpoint-logs-on-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Difference between ebgp-multihop and ttl-security.</title>
		<link>http://yurisk.info/2010/02/26/difference-between-ebgp-multihop-and-ttl-security/</link>
		<comments>http://yurisk.info/2010/02/26/difference-between-ebgp-multihop-and-ttl-security/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:39:12 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Fortigate]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=512</guid>
		<description><![CDATA[Once upon a time reading some CCIE paper at work I asked myself a question : “Why would someone bother to invent ttl-security and even write RFC http://tools.ietf.org/html/rfc5082 on it when multi-hop EBGP feature provides the same end result ?” .
The results of my busy/doing-nothing activity I present here.First some background. For some (unknown to [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time reading some CCIE paper at work I asked myself a question : “Why would someone bother to invent ttl-security and even write RFC http://tools.ietf.org/html/rfc5082 on it when multi-hop EBGP feature provides the same end result ?” .<br />
The results of my busy/doing-nothing activity I present here.<br />First some background. For some (unknown to me) reasons BGP peering was envisioned as TCP connection between directly connected routers, by default. To proceed with this design (worth checking BGP RFCs if it was actually an obligation)  vendors (Cisco,Juniper and even Fortinet) implemented all BGP protocol communication using  TTL=1 in TCP packets being exchanged. As the logical consequence of this if a router was placed more than 1 hop away from its peer  BGP session could  not be established. To provide for such set ups when peers are many hops away the ebgp-multihop term was coined – on configuration level you can specify that BGP peer is that hops far away . <br />What happens in fact is that when you specify such multi-hop BGP peer the router starts sending BGP packets with TTL being equal to the number of hops you set . That means if I set peer to be 3 hops away and some attacker tries to spoof legit peer’s IP but is 4 hops away – such attack won’t succeed cause my router will receive spoofed BGP packets ok but will send replies with TTL of 3 which will expire just 1 hop away from the attacker.<br />
Questionable , but security .  So why ttl security?<br />
This feature indeed enforces that BGP peer is no more than given hops away . And here comes the difference – it enforces it inbound . It works this way – after you enable ttl security on the BGP peer session and specify how many hops away this peer is allowed to be, your router<br />
checks incoming TCP packets from this peer and does this simple calculation : configured value <= 255 – hops-away-to-peer , if it holds true your router goes on with establishing BGP session , if not – session is shut down. Regarding outgoing TTL values – may be it is Cisco-only thing, may be not , but the moment you enable ttl security for some BGP peer on Cisco the router itself starts sending BGP-related packets to this peer with initial ttl being equal to 255. I guess it is logical that if you enforce on your side ttl security the peering side will want to do the same.<br />
<br />When ttl rule is broken we see in the debug session:<br />
Dec 27 19:08:04.103: %BGP-4-INCORRECT_TTL: Discarded message with TTL 1 from 124.2.11.15<br />
And neighbor status is:<br />
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd<br />
124.2.11.15   4 13462      33      63        0    0    0 00:04:31 Idle</p>
<p>#sh ip bgp neighbors 124.2.11.15<br />
BGP neighbor is 124.2.11.15,  remote AS 13462, external link<br />
  BGP version 4, remote router ID 0.0.0.0<br />
  BGP state = Closing</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/26/difference-between-ebgp-multihop-and-ttl-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VPN client stops working in visitor mode after major update</title>
		<link>http://yurisk.info/2010/02/25/vpn-client-stops-working-in-visitor-mode-after-major-update/</link>
		<comments>http://yurisk.info/2010/02/25/vpn-client-stops-working-in-visitor-mode-after-major-update/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 10:10:35 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>
		<category><![CDATA[Firewall]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=505</guid>
		<description><![CDATA[Yesterday I got asked to check the VPN client issue . After upgrade from NGX R65 to R70 VPN client doesn&#8217;t connect when Visitor mode is enabled . The moment you disable Visitor mode the same client to the same firewall works just fine. This happens
often so I bring it here . Actually I see [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I got asked to check the VPN client issue . After upgrade from NGX R65 to R70 VPN client doesn&#8217;t connect when Visitor mode is enabled . The moment you disable Visitor mode the same client to the same firewall works just fine. This happens<br />
often so I bring it here . Actually I see it as the &#8220;it is a feature not a bug&#8217; case -<br />
 after major upgrades to the firewall, the Management WebGUI (the one you use after fresh install to run the wizard) listening port will be reset to its default value of 443. This in turn   prevents any other daemon/service listening on this port , so Visitor mode (I guess also  SSL Extender) will not work.<br />
To fix it you just change listening port for WebGUI. Now lets get to SSH:<br />
To see the problem:</p>
<div class="cmd" >#lsof -i -n | grep https</div>
<p>cp_http_s  1864 nobody   11u  IPv4   14977       TCP *:https (LISTEN)</p>
<p>To fix the problem:</p>
<div class="cmd">#[Expert@fw]# webui disable</div>
<p>Shutting down cp_http_server_wd:                           [  OK  ]</p>
<div class="cmd">[Expert@fw]# webui enable 4445</div>
<p>Running cp_http_server_wd:                                 [  OK  ]</p>
<p>Now WebGUI wil be listening on port 4445 , and vpnd as should will be listening on 443:</p>
<div class="cmd">[Expert@fw]# lsof -i -n | awk &#8216;/https/ || /4445/&#8217; </div>
<p>vpnd       3564   root   26u  IPv4 29060053       TCP *:https (LISTEN)<br />
cp_http_s 10300 nobody    5u  IPv4 29100889       TCP *:4445 (LISTEN)</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/25/vpn-client-stops-working-in-visitor-mode-after-major-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fw monitor add-on</title>
		<link>http://yurisk.info/2010/02/13/fw-monitor-add-on/</link>
		<comments>http://yurisk.info/2010/02/13/fw-monitor-add-on/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 17:12:00 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>
		<category><![CDATA[Firewall]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=493</guid>
		<description><![CDATA[There is something I didn’t include in the previous post  fw monitor command reference  about fw monitor as I think it is rather optional and you can do well without it . I talk about tables in defining filter expressions. INSPECT – proprietary scripting language by the Checkpoint on which filtering expressions are [...]]]></description>
			<content:encoded><![CDATA[<div>There is something I didn’t include in the previous post <a href="http://yurisk.info/2009/12/12/fw-monitor-command-reference/"> fw monitor command reference </a> about fw monitor as I think it is rather optional and you can do well without it . I talk about tables in defining filter expressions. INSPECT – proprietary scripting language by the Checkpoint on which filtering expressions are based allows creating tables.<br />
I won’t delve into INSPECT syntax (for today) but will list the following examples you can easily modify to suit your needs.</div>
<p>
Legend:<br />
{} – delimit the table<br />
&lt;,&gt; &#8211; specify range of values inside (e.g. &lt;22,25&gt; means from 22 up to 25 inclusive)<br />
ifid – interface identifier </p>
<div class="cmd">
#fw monitor -e &#8220;bad_ports = static {22,25,443}; accept dport in bad_ports;&#8221; &nbsp;<span class="reg"> packets with destination port being equal to 22,25 or 443</span><br />
#fw monitor -e &#8221; bad_ports = static {&lt;22,25&gt;} ; accept dport in bad_ports;&#8221;  &nbsp;<span class="reg">packets with destination ports being equal to 22,23,24 or 25</span><br />
# fw monitor -e &#8221; bad_ports = static {&lt;22,25&gt;,&lt;80,443&gt;} ; accept dport in bad_ports;&#8221; &nbsp;<span class="reg">packets with destination ports being in ranges  22-25 or 80-443</span><br />
#fw monitor -e &#8220;bad_nets =  static {&lt;194.1.0.0,194.1.255.255&gt;} ;accept src in bad_nets;&#8221; &nbsp;<span class="reg">packets originated in range of networks  194.1.0.0 &#8211; 194.1.255.255</span><br />
#fw ctl iflist   &nbsp;<span class="reg"> Here I see what are the index values of each interface card</span><br />
0  : Internal<br />
1  : External<br />
#fw monitor -e &#8220;bad_nets =  static {<194.1.0.0,194.1.255.255>} ;accept src in bad_nets and ifid=0;&#8221; &nbsp;<span class="reg">packets originated in range of networks  194.1.0.0 &#8211; 194.1.255.255 and captured on interface eth3 only </span>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/13/fw-monitor-add-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fortigate firewall demo  free access. Also FortiManager and FortiAnalyzer</title>
		<link>http://yurisk.info/2010/02/03/fortigate-firewall-demo-free-access-also-fortimanager-and-fortianalyzer/</link>
		<comments>http://yurisk.info/2010/02/03/fortigate-firewall-demo-free-access-also-fortimanager-and-fortianalyzer/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 18:37:25 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Fortigate]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=488</guid>
		<description><![CDATA[As someone said best things in life are free.
Here are links to the demo Forigate firewall, ForiAnalyzer and FortiManager open to access from anywhere . So that you can
familiarize yourself with the Management GUI look and feel.
NOTE: Access is read-only.
NOTE 2: No , it is not me being so generous, it&#8217;s Fortinet caring for us.
Fortigate [...]]]></description>
			<content:encoded><![CDATA[<p>As someone said best things in life are free.<br />
Here are links to the demo Forigate firewall, ForiAnalyzer and FortiManager open to access from anywhere . So that you can<br />
familiarize yourself with the Management GUI look and feel.<br />
NOTE: Access is read-only.<br />
NOTE 2: No , it is not me being so generous, it&#8217;s Fortinet caring for us.<br />
<strong>Fortigate 300 :</strong><br />
user:demo<br />
password: fortigate<br />
<a href="https://fortigate.com"> fortigate.com</a><br />
<strong>ForiAnalyzer 800:</strong><br />
user:demo<br />
password: fortianalyzer<br />
<a href="https://www.fortianalyzer.com">fortianalyzer.com </a><br />
<strong>FortiManager 400:</strong><br />
user:demo<br />
password: fortimanager<br />
<a href="https://www.fortimanager.com">fortimanager.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/03/fortigate-firewall-demo-free-access-also-fortimanager-and-fortianalyzer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail alert on ssh login or any other rule hit in Checkpoint</title>
		<link>http://yurisk.info/2010/02/01/mail-alert-on-ssh-login-or-any-other-rule-hit-in-checkpoint/</link>
		<comments>http://yurisk.info/2010/02/01/mail-alert-on-ssh-login-or-any-other-rule-hit-in-checkpoint/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 10:56:36 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=478</guid>
		<description><![CDATA[I once  SSH login alert presented the way to send mail alert after successful login by ssh to any Linux-based machine , including Checkpoint firewalls. Now,  thanks to folks at cpug.org that draw my attention to it, I will show how to get mail Alert on ANY rule in the security rulebase of [...]]]></description>
			<content:encoded><![CDATA[<p>I once <a href="http://yurisk.info/2009/09/18/ssh-login-alert-by-mail-linux-or-unix-based-systems/" > SSH login alert</a> presented the way to send mail alert after successful login by ssh to any Linux-based machine , including Checkpoint firewalls. Now,  thanks to folks at cpug.org that draw my attention to it, I will show how to get mail Alert on ANY rule in the security rulebase of the firewall, and also simplified script using Checkpoint version Of the sendmail.<br />
First , rules alerts – on any rule in the Security Rulebase you can set in its <strong>Track</strong> column to <strong> Mail</strong> . Now all hits<br />
On such rule will be sending mail alerts tp specified recipient(s) through the specified mail server (Checkpoint doesn&#8217;t have a mail server of its own)  . So, if you create rule that allows access by SSH you can set in Track Mail and each time this rule is used to access the firewall mail will be sent. Now how to configure mail server settings, you do it in<br />
<strong>Policy -> Global Properties -> Log and Alert -> Alert Commands , check &#8221; Send mail alert to SmartviewView Monitor&#8221;  and &#8220;Run mail alert script&#8221; </strong>. In the &#8220;Run mail alert script&#8221; field set to the string of form:</p>
<div class="cmd">internal_sendmail -s [subject of the mail] -t [ip of mail server to receive mail goes here] -f [from_who_field_in_mail]     [to_whom_send_this_mail] </cmd><br />
e.g. internal_sendmail -s SSH_login_alert  -t 63.161.169.140 -f yurisk@yurisk.info   president@whitehouse.gov<br />
<br />The mail you get on such alert looks like:</p>
<pre>
6Jan2010  7:29:55 accept fw-tokyo  >External mail rule: 2; rule_uid: {85A905A7-951E-4100-A23A-E280FAAA1D29}; SmartDefense profile: Default_Protection; service_id: ssh; src: my-management-host; dst: fw-tokyo  ; proto: tcp; product: VPN-1 &#038; FireWall-1; service: ssh; s_port: 47145;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/01/mail-alert-on-ssh-login-or-any-other-rule-hit-in-checkpoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capture packets at IOS Cisco router or finally we have a sniffer</title>
		<link>http://yurisk.info/2010/02/01/capture-packets-at-ios-cisco-router-or-finally-we-have-a-sniffer/</link>
		<comments>http://yurisk.info/2010/02/01/capture-packets-at-ios-cisco-router-or-finally-we-have-a-sniffer/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:33:06 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=466</guid>
		<description><![CDATA[Finally it is here – built-in sniffer on the Cisco IOS platform ! Starting IOS 12.4(20) release Cisco introduces  brand new feature
called Embedded Packet Capture (EPC) that allows us to capture raw packets on the Cisco router and then later analyze it offline.
It can capture any traffic passing through the router, destined to it, [...]]]></description>
			<content:encoded><![CDATA[<p>Finally it is here – built-in sniffer on the Cisco IOS platform ! Starting IOS 12.4(20) release Cisco introduces  brand new feature<br />
called <strong>Embedded Packet Capture (EPC)</strong> that allows us to capture raw packets on the Cisco router and then later analyze it offline.<br />
It can capture any traffic passing through the router, destined to it, or originated from it . The captured packets are stored in DRAM<br />
of the router from where you can upload the capture file using HTTP/SCP/HTTPS/TFTP/FTP anywhere and then dissect it. The capture<br />
is stored using PCAP format , so any protocol dissector will understand this file, including the favorite one WIreshark/Ethereal.<br />
Now some limitations:<br />
 &#8211; CEF has to be enabled on the router;<br />
 &#8211; The capture is stored in the DRAM , so you’d better have enough of it;<br />
 &#8211; While no maximum capture buffer or packet size is stated I guess it depends on the platform (see tests below);<br />
 &#8211; IOS has to be 12.4(20) or higher.<br />
Let&#8217;s now look at steps to configure the capture on the router and then look at the results.<br />
Configuration involves 5 steps:</p>
<ol>
<li> Create named capture buffer in router memory (including filters what to capture and what not to). Multiple buffers simultaneously are supported;</li>
<li>  Create named capture point , again, multiple capture points active at the same time are possible. Using multiple capture buffers and capture points gives us full flexibility in the process – I can say capture packets at the same time inbound on incoming interface and<br />
store it to the memory buffer A while the same traffic going outbound on outgoing interface capture to another buffer B and have this<br />
way capture of the same traffic at 2 distinct points on the router. Your imagination is the limit here.</li>
<li> Associate capture buffers with capture points;</li>
<li> Start/stop capture;</li>
<li>  Export captured packets as PCAP file elsewhere or see it in raw format on the router itself (in case binary is your first language).</li>
<p>Now I will walk through configuring,all this is being done on Cisco 2821 (250 Mb of DRAM). IOS is being Cisco IOS Software, 2800 Software (C2800NM-IPBASEK9-M), Version 12.4(24)T1, RELEASE SOFTWARE (fc3)<br />
    1)  Create named capture buffer in memory. Packets are stored there, as this is DRAM storage if router does restart all capture data will be lost. You also  specify filter for which  packets are to be captured , if none given it will capture ALL packets at the<br />
capture point. Not surprisingly for filtering you use access-lists, standard or extended, named or numbered.</p>
<p>  In my testing I am trying to capture all SMTP traffic passing through the interface Giga0/1. Accordingly the ACL for it will be:</p>
<div class="cmd">Eldorado(config)#ip access-list extended MAIL_TEST<br />
 Eldorado (config-ext-nacl)# permit tcp any any eq smtp </div>
<p>Now I create capture buffer in the memory:</p>
<div class="cmd">Eldorado #monitor capture buffer MAIL filter access-list MAIL_TEST </div>
<p>NOTE: Fo the particular platform (cisco 2821) the limits and defaults for the buffer are these:</p>
<div class="cmd">Eldorado#monitor capture buffer MAIL  size ?<br />
  <1-512>  Buffer size in Kbytes : 512K or less (default is 256K)</div>
<p>NOTE 2: In Cisco.com documentation this and other commands related to capture have options that trying to use them gave error.<br />
For example Command reference gives option to configure length of the packet to be captured (instead of default 68 bytes) :</p>
<div class="cmd">Eldorado #monitor capture buffer MAIL length<br />
                                      ^<br />
% Invalid input detected at &#8216;^&#8217; marker. </div>
<p>2) Creating capture point (i.e. where to capture packets on the router):</p>
<div class="cmd">Eldorado# monitor capture point ip cef GIGA  GigabitEthernet0/1 both</div>
<p>Here I specify interface GigabitEthernet0/1 as point of capture and also set that traffic is to be captured in both directions (or you can use in/out instead)</p>
<p>3) Associate capture buffer with capture point (it does not start capture yet):</p>
<div class="cmd">Eldorado#monitor capture point associate GIGA MAIL</div>
<p>4) Start  capturing packets:</p>
<div class="cmd">Eldorado#monitor capture point start GIGA</div>
<p>4.1)Stop capture (optional) , you can export capture in the next step without stopping it:</p>
<div class="cmd">Eldorado# monitor capture point stop GIGA</div>
<p>5)	Export  captured packets as file to external server , here I use SCP as protocol:</p>
<div class="cmd">Eldorado#monitor capture  buffer MAIL export scp://rumba@216.163.142.1:/capture.cap </p>
<p>Writing capture.cap<br />
Password:<br />
 Sink: C0644 309346 capture.cap<br />
!!<br />
Eldorado#</p></div>
<p>-  Now you can see the capture file with Wireshark .<br />
There is it to it.</p>
<p>Verifying.<br />
  &#8211; To see  parameters of the capture:</p>
<div class="cmd">Eldorado#show monitor capture buffer all parameters</div>
<pre> Capture buffer size (linear buffer)
Buffer Size : 262144 bytes, Max Element Size : 68 bytes, Packets : 0
Allow-nth-pak : 0, Duration : 0 (seconds), Max packets : 0, pps : 0
Associated Capture Points:
Configuration:
monitor capture buffer siz
Capture buffer MAIL (circular buffer)
Buffer Size : 512000 bytes, Max Element Size : 1024 bytes, Packets : 363
Allow-nth-pak : 0, Duration : 0 (seconds), Max packets : 0, pps : 0
Associated Capture Points:
Name : GIGA, Status : Inactive
Configuration:
monitor capture buffer MAIL size 500 max-size 1024 circular
monitor capture point associate GIGA MAIL
monitor capture buffer MAIL filter access-list MAIL_TEST
Eldorado#  </pre>
<p>- Seeing contents of the captured packets on the router :</p>
<div class="cmd">#   show monitor capture buffer MAIL dump </div>
<pre>08:18:59.995 UTC Jan 25 2010 : IPv4 LES CEF    : Gi0/1 None

45514C50:                            002414F7              .$.w
45514C60: 2723001F 9E4cd37F 03e4cda dd379aaa  'A...F&#038;...E..0W.
45514C70: dd379aaa dd379aaa  dd379aaa dd379aaa @.-.Eב#X.3,,.M%
45514C80: 03e4cda 03e4cda 03e4cda  03e4cda  ../..&#038;....s@yh
45514C90: 00000204 23ee3444 000000             .....d.....

08:19:00.699 UTC Jan 25 2010 : IPv4 LES CEF    : Gi0/1 None

45514C50:                            002414F7              .$.w
45514C60: 03e4cda 03e4cda 03e4cda 03e4cda 'A...F&#038;...E..KYj
45514C70: 03e4cda 03e4cda 03e4cda 03e4cda @.-.#4$f.%%
45514C80: 03e4cda 03e4cda 03e4cda 03e4cda../..'|S^^^0])
45514C90: 03e4cda 03e4cda 03e4cda 03e4cda..EHLO smtp02.bi
45514CA0: 03e4cda 03e4cda 03e4cda 03e4cda s.eu.blackberry.
45514CB0: 636F6D0D 0A00                        com... </pre>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/01/capture-packets-at-ios-cisco-router-or-finally-we-have-a-sniffer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
