<?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>postIt &#187; scan</title>
	<atom:link href="https://lakm.us/postit/tag/scan/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/postit</link>
	<description>Post-It sticky notes with PasteBin sense</description>
	<lastBuildDate>Thu, 02 Jan 2025 01:33:57 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.18</generator>
	<item>
		<title>Socket monitoring by watching receive an &#8230;</title>
		<link>https://lakm.us/postit/2011/08/socket-monitoring-by-watching-receive-an/</link>
		<comments>https://lakm.us/postit/2011/08/socket-monitoring-by-watching-receive-an/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 08:03:50 +0000</pubDate>
		<dc:creator><![CDATA[Arif]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[scan]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://xp-racy.lan/postit/?p=136</guid>
		<description><![CDATA[Socket monitoring by watching receive and send queue every 5 seconds $ while true; do netstat -tn; sleep 5; clear; done Result: &#160; Active Internet connections &#40;w/o servers&#41; Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 10.238.133.152:43941 98.136.48.103:5050 ESTABLISHED tcp 1 0 10.238.133.152:42541 8.27.254.249:80 CLOSE_WAIT tcp 1 0 10.238.133.152:34355 184.73.222.16:80 CLOSE_WAIT tcp [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Socket monitoring by watching receive and send queue every 5 seconds</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span><span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-tn</span>; <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">5</span>; <span style="color: #c20cb9; font-weight: bold;">clear</span>; <span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>Result:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
Active Internet connections <span style="color: #7a0874; font-weight: bold;">&#40;</span>w<span style="color: #000000; font-weight: bold;">/</span>o servers<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span> 10.238.133.152:<span style="color: #000000;">43941</span>    98.136.48.103:<span style="color: #000000;">5050</span>      ESTABLISHED
tcp        <span style="color: #000000;">1</span>      <span style="color: #000000;">0</span> 10.238.133.152:<span style="color: #000000;">42541</span>    8.27.254.249:<span style="color: #000000;">80</span>         CLOSE_WAIT
tcp        <span style="color: #000000;">1</span>      <span style="color: #000000;">0</span> 10.238.133.152:<span style="color: #000000;">34355</span>    184.73.222.16:<span style="color: #000000;">80</span>        CLOSE_WAIT
tcp        <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span> 10.238.133.152:<span style="color: #000000;">43210</span>    199.59.148.87:<span style="color: #000000;">443</span>       ESTABLISHED
tcp        <span style="color: #000000;">0</span>    <span style="color: #000000;">229</span> 10.238.133.152:<span style="color: #000000;">43209</span>    199.59.148.87:<span style="color: #000000;">443</span>       ESTABLISHED</pre></td></tr></table></div>

<p>This is to emulate combination of <code>watch</code> and <code>ss</code> in Solaris, more or less same result</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">watch</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">5</span> ss <span style="color: #660033;">-t</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port
ESTAB      <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span>          10.238.133.152:<span style="color: #000000;">36045</span>       74.125.224.250:https
ESTAB      <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span>          10.238.133.152:<span style="color: #000000;">36044</span>       74.125.224.250:https
CLOSE-WAIT <span style="color: #000000;">1</span>      <span style="color: #000000;">0</span>          10.238.133.152:<span style="color: #000000;">59622</span>      174.129.233.179:www
ESTAB      <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span>          10.238.133.152:<span style="color: #000000;">43941</span>        98.136.48.103:mmcc
CLOSE-WAIT <span style="color: #000000;">38</span>     <span style="color: #000000;">0</span>          10.238.133.152:<span style="color: #000000;">49300</span>        199.59.148.87:https
ESTAB      <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span>          10.238.133.152:<span style="color: #000000;">33626</span>       74.125.224.191:https
CLOSE-WAIT <span style="color: #000000;">1</span>      <span style="color: #000000;">0</span>          10.238.133.152:<span style="color: #000000;">37621</span>        208.46.163.81:www</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>https://lakm.us/postit/2011/08/socket-monitoring-by-watching-receive-an/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Network map using nmap $ nmap -O -sS -p &#8230;</title>
		<link>https://lakm.us/postit/2010/03/network-map-using-nmap-nmap-o-ss-p/</link>
		<comments>https://lakm.us/postit/2010/03/network-map-using-nmap-nmap-o-ss-p/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 08:56:29 +0000</pubDate>
		<dc:creator><![CDATA[Arif]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[scan]]></category>

		<guid isPermaLink="false">http://xp-racy.lan/postit/?p=37</guid>
		<description><![CDATA[Network map using nmap $ nmap -O -sS -p 20-23,3300,80,443 ... Interesting ports on localhost &#40;127.0.0.1&#41;: PORT STATE SERVICE 20/tcp closed ftp-data 21/tcp closed ftp 22/tcp closed ssh 23/tcp closed telnet 80/tcp open http 443/tcp closed https 3300/tcp open unknown Device type: general purpose Running: Linux 2.6.X OS details: Linux 2.6.17 - 2.6.25 Network Distance: [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Network map using nmap</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">nmap</span> <span style="color: #660033;">-O</span> <span style="color: #660033;">-sS</span> <span style="color: #660033;">-p</span> <span style="color: #000000;">20</span>-<span style="color: #000000;">23</span>,<span style="color: #000000;">3300</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">443</span>
...
Interesting ports on localhost <span style="color: #7a0874; font-weight: bold;">&#40;</span>127.0.0.1<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
PORT    STATE  SERVICE
<span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">/</span>tcp  closed ftp-data
<span style="color: #000000;">21</span><span style="color: #000000; font-weight: bold;">/</span>tcp  closed <span style="color: #c20cb9; font-weight: bold;">ftp</span>
<span style="color: #000000;">22</span><span style="color: #000000; font-weight: bold;">/</span>tcp  closed <span style="color: #c20cb9; font-weight: bold;">ssh</span>
<span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span>tcp  closed telnet
<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">/</span>tcp  open   http
<span style="color: #000000;">443</span><span style="color: #000000; font-weight: bold;">/</span>tcp closed https
<span style="color: #000000;">3300</span><span style="color: #000000; font-weight: bold;">/</span>tcp  open   unknown
Device type: general purpose
Running: Linux <span style="color: #000000;">2.6</span>.X
OS details: Linux 2.6.17 - 2.6.25
Network Distance: <span style="color: #000000;">0</span> hops
...</pre></td></tr></table></div>

<p>I configured sshd to listen on port 3300, but nmap can&#8217;t resolve the type of service in the above sample. (It is found to be open but unknown service)</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/postit/2010/03/network-map-using-nmap-nmap-o-ss-p/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Angry IP Scan. Multi platform IP scanner &#8230;</title>
		<link>https://lakm.us/postit/2010/03/angry-ip-scan-multi-platform-ip-scanner/</link>
		<comments>https://lakm.us/postit/2010/03/angry-ip-scan-multi-platform-ip-scanner/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 03:11:51 +0000</pubDate>
		<dc:creator><![CDATA[Arif]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[rDNS]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[scan]]></category>

		<guid isPermaLink="false">http://xp-racy.lan/postit/?p=21</guid>
		<description><![CDATA[Angry IP Scan. Multi platform IP scanner in Java, and binaries in deb and rpm package for Linux. Windows version also available. Basic theory on scanning is also presented there. Where there exist two scan: port scanners IP scanner How? whether the host is up (alive, responding) or down (dead, not responding) average roundtrip time [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.angryip.org/w/Download">Angry IP Scan</a>. Multi platform IP scanner in Java, and binaries in deb and rpm package for Linux. Windows version also available.</p>
<p>Basic theory on scanning is also presented <a href="http://www.angryip.org/w/Documentation">there</a>. Where there exist two scan:</p>
<ol>
<li><span style="background-color: #ffffff;">port scanners</span></li>
<li><span style="background-color: #ffffff;">IP scanner</span></li>
</ol>
<p>How?</p>
<ol>
<li><span style="background-color: #ffffff;">whether the host is up (alive, responding) or down (dead, not responding)</span></li>
<li><span style="background-color: #ffffff;">average roundtrip time (of IP packets to the destination address and back) – the same value as shown by the ping program</span></li>
<li><span style="background-color: #ffffff;">TTL (time to live) field value from the IP packet header, which can be used to find out the rough distance to the destination address (in number of routers the packet has traveled)</span></li>
<li><span style="background-color: #ffffff;">host and domain name (by using a <strong>DNS reverse lookup</strong>)</span></li>
<li><span style="background-color: #ffffff;">versions of particular services running on the host (e.g., “Apache 2.0.32 (Linux 2.6.9)” in case of a web server)</span></li>
<li><span style="background-color: #ffffff;">open (responding) and filtered TCP and UDP port numbers</span></li>
</ol>
<ul></ul>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/postit/2010/03/angry-ip-scan-multi-platform-ip-scanner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Port scanner class.</title>
		<link>https://lakm.us/postit/2010/03/port-scanner-class/</link>
		<comments>https://lakm.us/postit/2010/03/port-scanner-class/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 02:39:00 +0000</pubDate>
		<dc:creator><![CDATA[Arif]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[scan]]></category>

		<guid isPermaLink="false">http://xp-racy.lan/postit/?p=20</guid>
		<description><![CDATA[Port scanner class. An example of usage is as follow where my IP is 192.168.1.10. The upper range for scanning isn&#8217;t alive: 192.168.1.11. I hide warnings due to open socket failure which will happen because the IP isn&#8217;t alive. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.developerfusion.com/code/3088/php-port-scanner/">Port scanner</a> class. An example of usage is as follow where my IP is 192.168.1.10. The upper range for scanning isn&#8217;t alive: 192.168.1.11. I hide warnings due to open socket failure which will happen because the IP isn&#8217;t alive.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;display_errors&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;scanner.class.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$ip_address1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;192.168.1.10&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$ip_address2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;192.168.1.11&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_scanner</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PortScanner<span style="color: #009900;">&#40;</span><span style="color: #000088;">$ip_address1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$ip_address2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$my_scanner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_ports</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;80&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$my_scanner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">do_scan</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$results</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$ip</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$ip_results</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #990000;">gethostbyaddr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ip</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&lt;blockquote&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
		<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ip_results</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$port</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$port_results</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$port</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; : &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$port_results</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pname'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; : &quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$port_results</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'status'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;open&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;closed&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/blockquote&gt;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Results are as follow (it includes developerfusion.com port scan by default (?)):</p>
<p>developerfusion.com</p>
<blockquote><p>15 : netstat : closed<br />
16 : N/A : closed<br />
17 : qotd : closed<br />
18 : msp : closed<br />
19 : chargen : closed<br />
20 : ftp-data : closed<br />
21 : ftp : closed<br />
22 : ssh : closed<br />
23 : telnet : closed<br />
24 : N/A : closed<br />
25 : smtp : open<br />
80 : www : open<br />
110 : pop3 : closed<br />
3306 : mysql : closed<br />
1337 : N/A : closed<br />
666 : N/A : closed</p></blockquote>
<p>xp-racy.local</p>
<blockquote><p>80 : www : open</p></blockquote>
<p>192.168.1.11</p>
<blockquote><p>80 : www : closed</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/postit/2010/03/port-scanner-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
