<?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>Security &#8211; VeriTeknik</title>
	<atom:link href="https://www.veriteknik.net.tr/en/category/knowledge_base/network/security/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.veriteknik.net.tr/en/</link>
	<description>VeriTeknik Bilişim &#124; VeriTeknik Bilişim</description>
	<lastBuildDate>Tue, 12 May 2015 10:33:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>CentOS 7 Firewall Sheet</title>
		<link>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/</link>
					<comments>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Tue, 12 May 2015 10:33:50 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=997</guid>

					<description><![CDATA[<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall. To check the active zones: [root@rh7 ~]# firewall-cmd --get-active-zones public interfaces: enp1s0f0 To get available service names: [root@rh7 ~]# firewall-cmd --get-services RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/">CentOS 7 Firewall Sheet</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall.</p>
<p>To check the active zones:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --get-active-zones
public
  interfaces: enp1s0f0</pre>
<p>To get available service names:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --get-services
RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https</pre>
<p>If the service you want to enable listed with the command above, you don&#8217;t have to write explicit port number, to allow a service permanently:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --add-service=https --permanent
success</pre>
<p>If the desired service is not available such as POP3 use the following command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --add-port=110/tcp --permanent
success</pre>
<p>When you finish adding/removing rules, apply them with the command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --reload
success</pre>
<p>To check the services enabled on the zone public:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --list-all
public (default, active)
  interfaces: enp1s0f0
  sources: 
  services: dhcpv6-client http https imaps pop3s smtp ssh
  ports: 7071/tcp 110/tcp
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules:</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/">CentOS 7 Firewall Sheet</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">997</post-id>	</item>
		<item>
		<title>Snort rules for isc.org and ripe.net DNS Amplification Attacks</title>
		<link>https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/</link>
					<comments>https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Sat, 16 Mar 2013 21:25:55 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[amplification]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[isc]]></category>
		<category><![CDATA[pfsense]]></category>
		<category><![CDATA[ripe]]></category>
		<category><![CDATA[rule]]></category>
		<category><![CDATA[snort]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=783</guid>

					<description><![CDATA[<p>Everything started with a few queries of isc.org thrugh open DNS servers located at our data center. Searching through the net we found that we are not the victims but a part of  uncomprimised sources of  a huge DDoS attack. A 60 byte query will turn into 50 times larger data directed to victims IP [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/">Snort rules for isc.org and ripe.net DNS Amplification Attacks</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Everything started with a few queries of isc.org thrugh open DNS servers located at our data center. Searching through the net we found that we are not the victims but a part of  uncomprimised sources of  a huge DDoS attack. A 60 byte query will turn into 50 times larger data directed to victims IP addresses. Even we were not the victims, the attacks became threading our connection if you think of hundreds of servers each of them pushing 10 Mbits to the Net. We needed a solution to stop those attacks.</p>
<p>Finally we have found a solution to stop DNS Amplification Attacks using pfsense with snort.</p>
<p>The below codes are extracted from raw IP data, as a sample, you may check what we had done for ripe.net query:</p>
<pre>0x0000: 4500 0042 6142 4000 7911 e7c3 9a23 a00b E..BaB@.y....#..
0x0010: 5e67 200f 0035 0035 002e 0000 03b8 0100 ^g...5.5........
0x0020: 0001 0000 0000 00<span style="background-color: #ffff99;">01 <strong>0472 6970 6503 6e65</strong></span> .........<span style="background-color: #ffff99;"><strong>ripe.ne</strong></span>
0x0030: <span style="background-color: #ffff99;"><strong>74</strong></span>00 00ff 0001 0000 2910 0000 0080 0000 <span style="color: #ffff99;">t</span>.......).......
0x0040: 0000 ..</pre>
<p>Use the code below to stop DNS Amplification attacks, you can paste the code to snort interface Advanced configuration pass through section:</p>
<pre>alert udp $EXTERNAL_NET any -&gt; $HOME_NET 53 (msg:"DNS ripe.net UDP"; content:"|<span style="background-color: #ffff99;">01 04 72 69 70 65 03 6e 65 74 00</span>|";classtype:attempted-dos;sid:4000003;)
alert udp $EXTERNAL_NET any -&gt; $HOME_NET 53 (msg:"DNS isc.org UDP"; content:"|01 03 69 73 63 03 6f 72 67|";classtype:attempted-dos;sid:4000003;)</pre>
<p>The code is tested to have minimal overhead.</p>
<p>Please post your comment if you need additional DNS Amplification Attack rules.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/">Snort rules for isc.org and ripe.net DNS Amplification Attacks</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">783</post-id>	</item>
		<item>
		<title>Firewall Settings With IpTables on CentOS and RedHat</title>
		<link>https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/</link>
					<comments>https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Tue, 22 Jan 2013 08:54:37 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[iptables]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=761</guid>

					<description><![CDATA[<p>Here on this article we&#8217;ll discuss some basic methods to quickly apply to the iptables service so that you can basically get things running up. First of all, there are a couple of ways to edit the iptables infrastructure. One way is to use the /sbin/iptables binary file to append each line, or you can [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/">Firewall Settings With IpTables on CentOS and RedHat</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here on this article we&#8217;ll discuss some basic methods to quickly apply to the iptables service so that you can basically get things running up.</p>
<p>First of all, there are a couple of ways to edit the iptables infrastructure. One way is to use the <strong>/sbin/iptables</strong> binary file to append each line, or you can directly edit the <strong>/etc/sysconfig/iptables</strong> file.</p>
<p>There is basically no difference between the two methods, adding &#8220;THIS LINE&#8221; to the /etc/sysconfig/iptables file is the same thing by running the &#8220;/sbin/iptables THIS LINE&#8221; command. Just keep in mind that rules in iptables are respective, which means each rule is done in a chain order, the third line is <em>only</em> executed after the second line.</p>
<p>By default, when you install a CentOS system, the iptables will only allow connections to the 22nd port which is for obvious reasons : not to block your ssh connections. But if you change the ssh server port, or run httpd service, mail service or any other service, the default iptables rules will all incoming and outgoing connections.</p>
<p>The default settings a pretty much like this.</p>
<pre class="brush: text; gutter: true; first-line: 1"># Firewall configuration written by system-config-firewall
 # Manual customization of this file is not recommended.
 *filter
 :INPUT ACCEPT [0:0]
 :FORWARD ACCEPT [0:0]
 :OUTPUT ACCEPT [0:0]
 -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
 -A INPUT -p icmp -j ACCEPT
 -A INPUT -i lo -j ACCEPT
 -A INPUT -j REJECT --reject-with icmp-host-prohibited
 -A FORWARD -j REJECT --reject-with icmp-host-prohibited
 COMMIT</pre>
<p>Let&#8217;s say you install apache (or equivalent) on your server, then iptables will keep blocking 80 and 443 ports. To make them available, we have to add them to the ACCEPT chain before the REJECTION.</p>
<pre class="brush: text; gutter: true; first-line: 1">-A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
 -A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT</pre>
<p>Let&#8217;s say you want to block out a specific IP address, for any port, then you can add such line,</p>
<pre class="brush: text; gutter: true; first-line: 1">-A INPUT -s 192.168.16.29 -j DROP</pre>
<p>If you&#8217;d like to log the access attempts of this IP address, before the DROP line you can add,</p>
<pre class="brush: text; gutter: true; first-line: 1">-A INPUT -s 192.168.16.29 -m limit --limit 2/min -j LOG --log-prefix "STAY AWAY! "</pre>
<p>This line will log any attempt from the IP address 192.168.16.29 but will limit the logs. It will log any similar connection type as only two lines per minute, this way your log file won&#8217;t fill out the whole hdd. Also the &#8220;STAY AWAY!&#8221; will be on the log line, so that you can easily grep the relevant line from the log file. Don&#8217;t confuse this as a message, the line &#8220;STAY AWAY!&#8221; will NOT be sent to the blocked IP or anything, it will just be logged.</p>
<p>At the end our iptables file will be like this</p>
<pre class="brush: text; gutter: true; first-line: 1">
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -s 192.168.16.29 -m limit --limit 2/min -j LOG --log-prefix "STAY AWAY! "
-A INPUT -s 192.168.16.29 -j DROP
-A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/">Firewall Settings With IpTables on CentOS and RedHat</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">761</post-id>	</item>
		<item>
		<title>Can&#8217;t Get Ping Responses from MS Windows Servers</title>
		<link>https://www.veriteknik.net.tr/en/cant-get-ping-responses-from-ms-windows-servers/</link>
					<comments>https://www.veriteknik.net.tr/en/cant-get-ping-responses-from-ms-windows-servers/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Mon, 25 Jun 2012 08:24:10 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=578</guid>

					<description><![CDATA[<p>Even though it sounds like a simple problem, a lot of our customers have asked the question why they can&#8217;t get back ping responses from their MS Windows servers. The problem is simple, because on most flavors of MS Windows boxes, the firewall has disabled ICMP requests by default. To enable it, go to Start [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/cant-get-ping-responses-from-ms-windows-servers/">Can&#8217;t Get Ping Responses from MS Windows Servers</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Even though it sounds like a simple problem, a lot of our customers have asked the question why they can&#8217;t get back ping responses from their MS Windows servers. The problem is simple, because on most flavors of MS Windows boxes, the firewall has disabled ICMP requests by default.</p>
<p>To enable it, go to <strong>Start &gt; Administrative Tools &gt;  Windows Firewall With Advanced Security</strong></p>
<p><a href="http://www.plugged.in/wp-content/uploads/Screenshot-rdesktop-94.103.47.3.png"><img fetchpriority="high" decoding="async" class="alignnone size-medium wp-image-579" title="Win-Firewall-1" src="http://www.plugged.in/wp-content/uploads/Screenshot-rdesktop-94.103.47.3-300x233.png" alt="" width="300" height="233" /></a></p>
<p>Now go to <strong>Inbound Rules</strong> on the left pane of the new window, and find the <strong>File and Printer Sharing (Echo Request &#8211; ICMPv4-In)</strong> from the rules. <strong>Enable</strong> it by right clicking. Now, your server will respond back to ping requests from <strong>IPv4</strong> packets. You can also enable this for <strong>IPv6</strong> from the rule right below it.</p>
<p><a href="http://www.plugged.in/wp-content/uploads/Screenshot-rdesktop-94.103.47.3-2.png"><img decoding="async" class="alignnone size-medium wp-image-580" title="Win-Firewall-2" src="http://www.plugged.in/wp-content/uploads/Screenshot-rdesktop-94.103.47.3-2-300x233.png" alt="" width="300" height="233" /></a></p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/cant-get-ping-responses-from-ms-windows-servers/">Can&#8217;t Get Ping Responses from MS Windows Servers</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/cant-get-ping-responses-from-ms-windows-servers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">578</post-id>	</item>
		<item>
		<title>Password Generation in UNIX</title>
		<link>https://www.veriteknik.net.tr/en/password-generation-in-unix/</link>
					<comments>https://www.veriteknik.net.tr/en/password-generation-in-unix/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Thu, 17 May 2012 09:35:41 +0000</pubDate>
				<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[Programmin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password bash python md5]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=410</guid>

					<description><![CDATA[<p>Below I&#8217;ll describe a couple of nice methods to generate passwords using Python and Bash. Actually there are a lot of ways you can accomplish this especially with bash, but using the /dev/urandom file seems to be the most clever one. The /dev/urandom device doesn&#8217;t only generate read-friendly characters, so it&#8217;s best to filter out [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/password-generation-in-unix/">Password Generation in UNIX</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Below I&#8217;ll describe a couple of nice methods to generate passwords using Python and Bash.</p>
<p>Actually there are a lot of ways you can accomplish this especially with bash, but using the <strong>/dev/urandom</strong> file seems to be the most clever one.</p>
<p>The <strong>/dev/urandom</strong> device doesn&#8217;t only generate read-friendly characters, so it&#8217;s best to filter out the ones we&#8217;d like. The best tool for that would be <strong>tr</strong>.</p>
<p><strong>$ cat /dev/urandom | tr -dc [:alnum:] | head -c 10</strong></p>
<p>This will generate a password from 10 alphanumeric characters.</p>
<p>It will not include some characters though, such as <strong>. ! &#8211; _</strong> which are useful for passwords. So this line would be a little more &#8220;secure&#8221;.</p>
<p><strong>$ cat /dev/urandom | tr -cd &#8220;[:alnum:]\.\-_\!&#8221; | head -c 10<br />
</strong><br />
To generate a password in Python, using the <strong>string</strong> and <strong>random</strong> module would be a clever touch. Let&#8217;s try something like this,</p>
<pre class="brush: python; gutter: true; first-line: 1">&gt;&gt;&gt; import string, random
 &gt;&gt;&gt; def passgen(length) :
 ... keys = list(string.ascii_letters + string.digits)
 ... return "".join(random.choice(keys) for i in range(length)</pre>
<p>With this definition of the passgen function, we can generate alphanumeric passwords with whatever length we want. If you&#8217;d like to include all characters available, try the one below:</p>
<pre class="brush: python; gutter: true; first-line: 1">&gt;&gt;&gt; import string, random
 &gt;&gt;&gt; def passgen(length) :
 ... keys = list(string.ascii_letters + string.digits + ".,;:-_()@\"\\[]?!'^+*$%&amp;/=~`&lt;&gt;|")
 ... return "".join(random.choice(keys) for i in range(length)</pre>
<p>A sample output :</p>
<pre class="brush: python; gutter: true; first-line: 1">&gt;&gt;&gt; passgen(16)
 'pP!3p"(-uxdIqpAK'</pre>
<p>You can find some methods of password generation using MD5 algorithms. For example for password generation in MySQL some people prefer this method;</p>
<p><strong>&gt;SELECT SUBSTRING(MD5(RAND()) FROM 1 FOR 5)</strong></p>
<p>But this will generate very very weak passwords, no uppercase characters and a lot of characters missing, not even to mention the non-alpha numeric characters. Also you&#8217;ll have a limit for maximum character number since the MD5 algorithm has a limit for it. So it&#8217;s best to stay away from the md5 approach for password generation. Some people also use it for bash password generation too (which is wrong! due to same reasons)</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/password-generation-in-unix/">Password Generation in UNIX</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/password-generation-in-unix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">410</post-id>	</item>
		<item>
		<title>Nmap : Scanning Methods</title>
		<link>https://www.veriteknik.net.tr/en/nmap-scanning-methods/</link>
					<comments>https://www.veriteknik.net.tr/en/nmap-scanning-methods/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Mon, 07 May 2012 14:27:42 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[scan]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tcp]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=394</guid>

					<description><![CDATA[<p>Earlier we&#8217;ve discussed target specification in detail. But it is almost as import to choose your method to scan the target host. Nmap can scan in various algorithms, we should choose wisely considering the network, operating system and firewalls. Even though we usually don&#8217;t know what network architecture or operating system the target is affiliated [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/nmap-scanning-methods/">Nmap : Scanning Methods</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Earlier we&#8217;ve discussed <a href="http://www.plugged.in/network/nmap-target-specification-in-detail.html" title="Nmap : Target Specification in Detail">target specification</a> in detail. But it is almost as import to choose your method to scan the target host. Nmap can scan in various algorithms, we should choose wisely considering the network, operating system and firewalls. Even though we usually don&#8217;t know what network architecture or operating system the target is affiliated to, these methods are also useful for determining such information.</p>
<p>To understand the background of scanning, we should know some basic thing about the &#8220;three-way handshake&#8221; that occurs during a network connection. The three-way handshake is another way of describing the SYN/ACK method. When a computer sends a &#8220;Hello&#8221; signal to a target machine, it actually sends a SYN packet. After receiving this packet, if the target is listening, it will normally respond with a SYN/ACK packet. When the first computer receives this SYN/ACK packet, it will respond back to the target machine with an ACK packet. This way, the three-way handshake is accomplished.</p>
<p>The SYN/ACK handshake is analogously described by talking on the phone (back on the old days when there weren&#8217;t caller id&#8217;s!). When we dial some number, we basically send a SYN signal, when the target answers the phone saying &#8220;Hello?&#8221;, it actually is a SYN/ACK packet, meaning &#8220;I&#8217;m listening?&#8221;, after that when we introduce ourselves as in &#8220;Hi, I&#8217;m calling from VeriTeknik&#8221;, then we&#8217;re sending the last ACK packet.</p>
<p>Now since we understand what SYN, SYN/ACK and ACK means, we can start digging around with nmap and see what it uses these information for.<br />
By the way, for what it&#8217;s worth, SYN stands for <em>synchronize</em> and ACK stands for <em>acknowledge</em>.</p>
<p><strong>The TCP Scan</strong></p>
<p>Like we&#8217;ve discussed earlier in our target specification post, nmap executes a TCP scan with the <strong>-sT</strong> option. A TCP scan is accomplished with the full three-way handshake, meaning that when we ask nmap to execute a TCP scan on a port on some target, it will send a SYN, wait for the SYN/ACK and send back the ACK, after these, it will tell us that the port is open (or closed). Since we&#8217;re going all the way through with the three-way handshake in this method, even though it seems the most reliable one on standard targets (not behind firewall etc.) it has the slightest possibility to flood the target.</p>
<p>Here&#8217;s is the basic command to perform one.</p>
<p><strong>$ nmap -sT 10.20.30.40</strong></p>
<p><strong>The SYN Scan</strong></p>
<p>This is the most popular scan type of nmap. In fact, it is also the default option on nmap, meaning if you don&#8217;t specify any scan type, nmap will use the default SYN scan method.</p>
<p>The SYN scan is popular because it is faster. This comes from the fact that it doesn&#8217;t complete the three-way handshake. It only goes through the two steps of the handshake, first sending the SYN packet, waiting for a SYN/ACK packet, after this, instead of sending an ACK packet, it sends an RST (<em>reset</em>) packet, which tells the target to disregard any previous packets and close the connection between the two machines. The advantage of this is that the RST packet is much smaller than the ACK packet. Even though it may sound like one tiny packet won&#8217;t change much, when you add up hundreds (or thousands) of ports on multiple hosts, tiny packets do matter! Also, sending less information to the target always means less possibility to flood it.</p>
<p><strong>$ nmap -sS 10.20.30.40<br />
$ nmap 10.20.30.40</strong></p>
<p><strong>The UDP Scan</strong></p>
<p>Overlooking the UDP scanning technique is a common rookie mistake. Even though most services use the TCP ports today, UDP ports are still essential and cause security vulnerabilities. Also, UDP ports are as useful as TCP ports for getting information on the system.</p>
<p>Note that both TCP and SYN scanning use the TCP method of connection. There are basically two methods for computers to communicate, either the TCP (<em>Transmission Control Protocol</em>) or the UDP (<em>User Datagram Protocol</em>). TCP ensures that the packets sent from one computer to another arrive at the receiver intact and in the order they were sent. But, UDP has no such mechanism, it just sends the data and we never know whether it arrived to the target or not. There are many advantages and disadvantages between the two technologies including speed, reliability, error checking etc. The important thing is to know which one to use under your case.</p>
<p>Comparing the UDP scan to our analogous example of the phone call, it is often described with a mailing system. It is like when we write a mail (not an e-mail, the regular ones!), put a stamp on it, no return address and put it in the mailbox. Maybe sometime the post officer will pick it up, deliver it to the address. You&#8217;ll never know if the mail reached its destination or not, and the receiver might not know the origin.</p>
<p><strong>$ nmap -sU 10.20.30.40</strong></p>
<p>Don&#8217;t forget that even though people tend to think that services run on TCP ports, a lot of them still stick with the UDP ones, such as DNS, DHCP, SNMP, or TFTP.</p>
<p><strong>The Xmas Scan</strong></p>
<p>This scan method is based on the technical descriptions on the RFC 793 (page 65) of TCP. If the target operating system is bound to the RFC, then when dealing with TCP connections it should obey the following two rules.</p>
<p><strong>* If a closed port receives a packet that doesn&#8217;t have a SYN, ACK or RST flag, the port should respond with an RST packet of its own.<br />
* If an open port receieves a packet that doesn&#8217;t have a SYN, ACK or RST flag, the packet should be ignored.</strong></p>
<p>So, according to these rules, if a send a packet that doesn&#8217;t contain any one of SYN, ACK and RST, and if the relevant port does not answer back, that port should be open. So when we tell Nmap to perform a Xmas scan on a target, it simply sends FIN, PSH and URG packet flags on. The name Xmas comes from the fact that it has so many flags set to &#8220;on&#8221; as if it lights like a Christmas tree!</p>
<p>The problem with this scan type is that we <em>assume</em> the target operating system fully complies with the RFC standard of the TCP. Linux and Unix operating systems do, but Microsoft operating systems don&#8217;t. Ironically this makes Linux systems vulnerable to this scan type.</p>
<p><strong>$ nmap -sX -p- -PN 10.20.30.40</strong></p>
<p><strong>Null Scan</strong></p>
<p>This type of scanning is almost the same with the Xmas scanning method. Instead of switching some of the flags &#8220;on&#8221;, with the Null scan, Nmap switches everything &#8220;off&#8221;. This way, the closed ports will respond with a RST flag. (if the operating system complies with the RFC standards)</p>
<p>These type of scans are important when scanning a system behind firewalls. Some firewalls block communication establishment by filtering SYN packets. Since our scanning packets with the Xmas and Null scans don&#8217;t have a SYN packet, the firewall won&#8217;t filter it. Well, bear in mind that since we don&#8217;t have a SYN packet, it is not possible to establish a connection, but the point is scanning for ports, and that is possible without a SYN packet!</p>
<p><strong>$ nmap -sN -p- -PN 10.20.30.40</strong></p>
<p><strong>FIN Scan</strong></p>
<p>This is also almost the same with Xmas and Null scans, this time, nmap only sends the packet with the FIN flag &#8220;on&#8221;.</p>
<p><strong>$ nmap -sF -p- -PN 10.20.30.40</strong></p>
<p><strong>ACK Scan</strong></p>
<p>This scan type does <em>not</em> directly look for open ports. Instead it tests whether our ACK packets reach the ports or not. By default, it only has the ACK flag set. An unfiltered (ex. no firewall) system would return with RST packets when an ACK packet reaches it, regardless of the port state being open or closed. If a port doesn&#8217;t respond, or it responds with ICMP error messages, nmap will label it as filtered, if the port responds with an RST packet, it will be labeled as &#8220;reachable&#8221;. Detecting if reachable ports are open or not, is not checked by this scan. This type of scan is very useful to check the security of a target.</p>
<p><strong>$ nmap -sA -p- -PN 10.20.30.40</strong></p>
<p><strong>Window Scan</strong></p>
<p>This one is similar to the ACK scan, but categorizes the port filtered or unfiltered depending on the value the returning package&#8217;s RST flag is. On some systems open ports have a positive window size, but the closed ports have a window size equal to zero. So when a port replies RST, instead of labeling it as unfiltered (like it does in ACK scan), nmap will read the TCP Window value of the RST package. If the value is zero, the port is filtered, if it has a positive value, it is labeled as unfiltered. This type of scan does not work on most of the systems. In fact, if most of the ports you scan from 1000 ports are open, and only a few are closed, it is possible that the values are incorrect, the few closed ones might be the open ports and the open labeled ones might be the closed ones.<br />
So, things can get the other-way around, use the feedback with caution!</p>
<p><strong>$ nmap -sW -p- -PN 10.20.30.40</strong></p>
<p><strong>Additional Options for Detailed Information</strong></p>
<p>Lastly, there are a few options to remember that can give us great detail about the target system.</p>
<p><strong>Version detection :</strong> The <strong>-sV</strong> switch tries to determine what version of a service is running on a detected open port. This is great when scanning either UDP ports or unusual ports. If you find an unusual port number to be open, a version scan might tell you whether it is an SSH service running or an HTTP.</p>
<p><strong>Operating System detection :</strong> The <strong>-O</strong> switch is for determining the operating system of the target. This does not 100% work but it does give some clues. It also tries to determine the kernel version, if it fails to get the kernel version, it sometimes reports possibilities in percentages.</p>
<p>Another option for Operating System and Version detection is the <strong>-A</strong> switch. This does not provide as much detail as the -O option but is still useful.</p>
<p><strong>The Speed :</strong> You can choose the speed of each scan with the <strong>-T</strong> switch. The timing switch ranges on a numeric scale from 0 to 5, with 0 being the slowest scan.</p>
<p>It is important to know the backgrounds of a scan when executing it. Otherwise the results would seem meaningless to the scanner. Go ahead and try scanning your own systems. Don&#8217;t forget that if you have multiple servers, nmap also has a nice way of dealing with <a href="http://www.plugged.in/network/nmap-target-specification-in-detail.html" title="Nmap : Target Specification in Detail">target specification</a>.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/nmap-scanning-methods/">Nmap : Scanning Methods</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/nmap-scanning-methods/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">394</post-id>	</item>
		<item>
		<title>Nmap : Target Specification in Detail</title>
		<link>https://www.veriteknik.net.tr/en/nmap-target-specification-in-detail/</link>
					<comments>https://www.veriteknik.net.tr/en/nmap-target-specification-in-detail/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Wed, 02 May 2012 14:04:52 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[scan]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=370</guid>

					<description><![CDATA[<p>Every now and then, we need to scan ports as system administrators, even if the target machine is owned by us or not. To achieve this, nmap is the well known and reliable tool which is available for almost every platform. But to use nmap, we need to understand the background of it a little. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/nmap-target-specification-in-detail/">Nmap : Target Specification in Detail</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Every now and then, we need to scan ports as system administrators, even if the target machine is owned by us or not. To achieve this, <strong>nmap</strong> is the well known and reliable tool which is available for almost every platform. But to use nmap, we need to understand the background of it a little.</p>
<p>There are several methods to scan ports. One of them is the &#8220;TCP&#8221; scanning method. With this method, nmap will try to establish a TCP connection with each of the port to be scanned on the target.  If we don&#8217;t specify any ports, nmap will scan these. This speeds up the process a lot! Below, you&#8217;ll find an example of TCP scan on every port on the target machine.</p>
<p><strong>$ nmap -sT -p- -PN 10.20.30.40</strong></p>
<p>When we break down the arguments, things will get clearer.</p>
<p><strong>-sT :</strong> The <strong>-s</strong> there indicates what method to use to scan, so the following <strong>T</strong> says its a TCP scan.<br />
<strong>-p- :</strong> With this we tell nmap to scan every port on the target. Normally, nmap has a predefined list of 1000 ports that are widely used. To scan only the default 1000 ports, just don&#8217;t use this flag. Alternately you can tell which specific range of ports to scan. For example to scan the ports 21,23 and 25, we specify it as <strong>-p21,23,25</strong> or to scan every port between 21 and 25, <strong>-p21-25</strong>. If we want to scan everything between 21 and 25 plus the 80&#8217;th port, it goes like this : <strong>-p21-25,80</strong><br />
<strong>-PN :</strong> This options tells nmap to skip the host discovery, which means it&#8217;ll assume that every target we specify are online. Use this if you&#8217;re only sure that the host is online, when we specify a lot of targets, and a lot of ports on these targets, host discovery will come in as a handy time saver.</p>
<p>Target specification in a clever way is very important if you&#8217;re willing to scan multiple targets. Below, we&#8217;ll talk about how detailed we can specify targets on nmap.</p>
<p>The simplest way for telling nmap to scan 2 targets,</p>
<p><strong>$ nmap -sT -p21-25,80,8080 10.20.30.40-60 192.168.16.4 192.168.16.5</strong></p>
<p>The above will do the same thing with the notation below,</p>
<p><strong>$ nmap -sT -p21-25,80,8080 10.20.30.40-60 192.168.16.4,5</strong></p>
<p>Nmap can also understand various notations at the same time when specifying target addresses. For example we can specify a network with it&#8217;s CIDR notation, and use partial definitions on different subnet blocks. Take a look at this example :</p>
<p><strong>$ nmap -sT -p- -PN 192.168.1.0/16 10.20.30,31.40</strong></p>
<p>Note that you cannot use the comma notation and the CIDR notation at the same time. So target specification such as <strong>192.168.1,2.0/16</strong> is <strong>NOT</strong> allowed.</p>
<p>You can also specify IPv6 using the <strong>-6</strong> options. Below we&#8217;re scanning for the website <a href="http://my-ip6.com" target="_blank">my-ip6.com</a></p>
<p><strong>$ nmap -sT -p21-25,80 -6 2a00:7300:1::4</strong></p>
<p>Also note that with the IPv6 scanning, nmap does <strong>NOT</strong> support CIDR notation.</p>
<p>Needless to, we can also specify the target with its domain name.</p>
<p><strong>$ nmap -sT -p- -PN plugged.in</strong></p>
<p>Nmap can also get the targets from a text file if you can&#8217;t specify them in a sequential order. Just type your targets&#8217; IP addresses line by line on a file and run it like this:</p>
<p><strong>$ nmap -sT -p- -PN -iL my_targets_text_file</strong></p>
<p>When you specify a range of addresses, it sometimes is crutial to NOT SCAN some members of that network. For this, nmap allows you to exclude addresses. This time we specify multiple &#8220;excluded targets&#8221; as comma separated, and as usual, it supports all the syntax supported for target specification. (hostnames, CIDR, netblocks, octet ranges, etc.)</p>
<p><strong>$ nmap -sT -p- -PN 192.168.1.0/16 &#8211;exclude 192.168.16.30,192.168.1.10-15</strong></p>
<p>Here&#8217;s a problem with this syntax of nmap, since the excluded targets are specified with commas, we can&#8217;t use commas to define subnets within the exclusion. For example we can specify targets such as <strong>192.168.1,2.1</strong> but this is not allowed within the exclusion since nmap will use the comma as a target exclusion delimiter.</p>
<p>The good thing is, just like specifying your targets in a text file, you can also specify you exclusion list too!</p>
<p><strong>$ nmap -sT -p- -PN 192.168.1.0/16 &#8211;excludefile my_exclusion_text_file</strong></p>
<p>And the last but not least, nmap has an option to scan random addresses. This is built specifically for research (and fun!) yet you should always use this option at your own risk, since some networks might detect you as a possible break-in attempt for scanning their system. It is also a good idea to you exclusion lists with this option.</p>
<p><strong>$ nmap -sT -p80 -PN -iR 5 </strong></p>
<p>The number 5 above means that nmap will be scanning 5 addresses. So it will generate 5 random IP addresses. To generate infinate numbers of addresses, use the <strong>-iR</strong> option with the value <strong>0</strong>.</p>
<p>Let&#8217;s end this post with a quoat from the man page of nmap,</p>
<blockquote><p><em>&#8220;If you find yourself really bored one rainy afternoon, try the command</em> <strong>nmap -sS -PS80 -iR 0 -p 80</strong> <em>to locate random web servers for browsing.&#8221;</em></p></blockquote>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/nmap-target-specification-in-detail/">Nmap : Target Specification in Detail</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/nmap-target-specification-in-detail/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">370</post-id>	</item>
		<item>
		<title>Cisco PIX &#038; ASA Host name in greeting fix</title>
		<link>https://www.veriteknik.net.tr/en/cisco-pix-asa-host-name-in-greeting-fix/</link>
					<comments>https://www.veriteknik.net.tr/en/cisco-pix-asa-host-name-in-greeting-fix/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Fri, 22 Apr 2011 09:10:35 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[asa]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[pix]]></category>
		<guid isPermaLink="false">http://plugged.in/?p=12</guid>

					<description><![CDATA[<p>If it appears to be all (***) instead of your mail hostname and if you get, &#8220;550 Sorry, your HELO/EHLO greeting must resolve (#5.7.1)&#8221; error when sending mail to your mail server from outside, run the following command in your CISCO firewall: no fixup protocol smtp 25 and save with the &#8220;wr mem&#8221; command</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/cisco-pix-asa-host-name-in-greeting-fix/">Cisco PIX &#038; ASA Host name in greeting fix</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If it appears to be all (***) instead of your mail hostname and if you get, &#8220;550 Sorry, your HELO/EHLO greeting must resolve (#5.7.1)&#8221; error when sending mail to your mail server from outside, run the following command in your CISCO firewall:</p>
<blockquote><p>no fixup protocol smtp 25</p></blockquote>
<p>and save with the &#8220;wr mem&#8221; command</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/cisco-pix-asa-host-name-in-greeting-fix/">Cisco PIX &#038; ASA Host name in greeting fix</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/cisco-pix-asa-host-name-in-greeting-fix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">12</post-id>	</item>
	</channel>
</rss>
