<?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>Toey blog &#187; linux security</title>
	<atom:link href="http://toey.tc20.net/category/linux-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://toey.tc20.net</link>
	<description>บันทึกเรื่องราวต่างๆ</description>
	<lastBuildDate>Thu, 01 Sep 2011 11:51:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Edit ld.config on solaris 10</title>
		<link>http://toey.tc20.net/2010/07/28/edi-ld-config-on-solaris/</link>
		<comments>http://toey.tc20.net/2010/07/28/edi-ld-config-on-solaris/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 17:47:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=88</guid>
		<description><![CDATA[Edit Default Library Path on solaris 10 type &#8220;crle&#8221; for list Default Library Path crle Configuration file [version 4]: /var/ld/ld.config Default Library Path (ELF): /usr/local/lib:/lib:/usr/lib Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default) Command line: crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib type &#8220;crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib&#8221; to change Default Library Path crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib]]></description>
			<content:encoded><![CDATA[<p>Edit Default Library Path on solaris 10<br />
type &#8220;crle&#8221; for list Default Library Path</p>
<pre class="brush: shell;">
crle
</pre>
<p>Configuration file [version 4]: /var/ld/ld.config<br />
  Default Library Path (ELF):   /usr/local/lib:/lib:/usr/lib<br />
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)</p>
<p>Command line:<br />
  crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib</p>
<p>type &#8220;crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib&#8221; to change Default Library Path</p>
<pre class="brush: shell;">
crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib
</pre>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2010/07/28/edi-ld-config-on-solaris/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>enable php curl proxy</title>
		<link>http://toey.tc20.net/2010/01/02/enable-php-curl-proxy/</link>
		<comments>http://toey.tc20.net/2010/01/02/enable-php-curl-proxy/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 18:58:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=76</guid>
		<description><![CDATA[curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); curl_setopt($ch, CURLOPT_PROXY,&#8221;$host:$port&#8221;);]]></description>
			<content:encoded><![CDATA[<p>curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);<br />
curl_setopt($ch, CURLOPT_PROXY,&#8221;$host:$port&#8221;);</p>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2010/01/02/enable-php-curl-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu build essential</title>
		<link>http://toey.tc20.net/2010/01/02/build-essential/</link>
		<comments>http://toey.tc20.net/2010/01/02/build-essential/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 18:56:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=74</guid>
		<description><![CDATA[apt-get install build-essential]]></description>
			<content:encoded><![CDATA[<pre class="brush: shell;">
apt-get install build-essential
</pre>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2010/01/02/build-essential/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>snmptranslate</title>
		<link>http://toey.tc20.net/2009/06/26/snmptranslate/</link>
		<comments>http://toey.tc20.net/2009/06/26/snmptranslate/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 04:29:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux security]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=72</guid>
		<description><![CDATA[snmptranslate -IR tcpPassiveOpens.0 TCP-MIB::tcpPassiveOpens.0 snmptranslate -On TCP-MIB::tcpPassiveOpens.0 .1.3.6.1.2.1.6.6.0 snmptranslate .1.3.6.1.2.1.6.6.0 TCP-MIB::tcpPassiveOpens.0]]></description>
			<content:encoded><![CDATA[<pre class="brush: shell;">snmptranslate -IR  tcpPassiveOpens.0</pre>
<p>TCP-MIB::tcpPassiveOpens.0</p>
<pre class="brush: shell;">snmptranslate -On TCP-MIB::tcpPassiveOpens.0</pre>
<p>.1.3.6.1.2.1.6.6.0</p>
<pre class="brush: shell;">snmptranslate .1.3.6.1.2.1.6.6.0</pre>
<p>TCP-MIB::tcpPassiveOpens.0</p>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/06/26/snmptranslate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>command count tcp state</title>
		<link>http://toey.tc20.net/2009/06/08/command-count-tcp-state/</link>
		<comments>http://toey.tc20.net/2009/06/08/command-count-tcp-state/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 23:06:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[tcp stage]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=51</guid>
		<description><![CDATA[netstat -tan &#124; grep ':80 ' &#124; awk '{print $6}' &#124; sort &#124; uniq -c]]></description>
			<content:encoded><![CDATA[<pre class="brush: shell;">
netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c
</pre>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/06/08/command-count-tcp-state/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>การทำ null route บน linux</title>
		<link>http://toey.tc20.net/2009/05/31/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-null-route-%e0%b8%9a%e0%b8%99-linux/</link>
		<comments>http://toey.tc20.net/2009/05/31/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-null-route-%e0%b8%9a%e0%b8%99-linux/#comments</comments>
		<pubDate>Sun, 31 May 2009 13:23:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[null route]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=45</guid>
		<description><![CDATA[คำสั่งดรอปการโจมตีจาก ip ด้วยคำสั่ง route  บน linux route add xxx.xxx.xxx.xxx reject คำสั่งตรวจสอบว่าทำการปิดกันเรียบร้อยหรือยังถ้าแสดงข้อความแบบด้านล่างแสดงว่าได้ปิดกั้น ip นั้นเรียบร้อยแล้ว ip route get  xxx.xxx.xxx.xxx RTNETLINK answers: Network is unreachable ใช้คำสั่งด้านล่างเพื่อดู ตารางการ route [root@demo01 ~]#route -n ใช้คำสั่งด้านล่างเพื่อยกเลิกการปิดกัน ip ดังกล่าว [root@demo01 ~]#route del -host xxx.xxx.xxx.xxx reject  หมายเหตุ xxx.xxx.xxx.xxx คือ ip ที่ต้องการปิดกั้น]]></description>
			<content:encoded><![CDATA[<p>คำสั่งดรอปการโจมตีจาก ip ด้วยคำสั่ง route  บน linux</p>
<pre class="brush: shell;">route add xxx.xxx.xxx.xxx reject</pre>
<p>คำสั่งตรวจสอบว่าทำการปิดกันเรียบร้อยหรือยังถ้าแสดงข้อความแบบด้านล่างแสดงว่าได้ปิดกั้น ip นั้นเรียบร้อยแล้ว</p>
<pre class="brush: shell;">ip route get  xxx.xxx.xxx.xxx</pre>
<p>RTNETLINK answers: Network is unreachable<br />
ใช้คำสั่งด้านล่างเพื่อดู ตารางการ route</p>
<pre class="brush: shell;">[root@demo01 ~]#route -n</pre>
<p>ใช้คำสั่งด้านล่างเพื่อยกเลิกการปิดกัน ip ดังกล่าว</p>
<pre class="brush: shell;">[root@demo01 ~]#route del -host xxx.xxx.xxx.xxx reject</pre>
<p> หมายเหตุ xxx.xxx.xxx.xxx คือ ip ที่ต้องการปิดกั้น</p>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/05/31/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-null-route-%e0%b8%9a%e0%b8%99-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ป้องกันการโหลด files นามสกุล ที่ไม่อนุญาตใน apache</title>
		<link>http://toey.tc20.net/2009/05/25/%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%82%e0%b8%ab%e0%b8%a5%e0%b8%94-files-%e0%b8%99%e0%b8%b2%e0%b8%a1%e0%b8%aa%e0%b8%81%e0%b8%b8%e0%b8%a5/</link>
		<comments>http://toey.tc20.net/2009/05/25/%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%82%e0%b8%ab%e0%b8%a5%e0%b8%94-files-%e0%b8%99%e0%b8%b2%e0%b8%a1%e0%b8%aa%e0%b8%81%e0%b8%b8%e0%b8%a5/#comments</comments>
		<pubDate>Sun, 24 May 2009 20:44:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=32</guid>
		<description><![CDATA[บางครั้ง อัพโหลด files นามสกุล เหล่านี้ขึ้นไปโดยไม่ได้ตั้งใจ อาจทำให้ โดน hacker เข้ามาแอบอ่าน .bak ของ config สำคัญเราได้ เพื่อเป็นการป้องกันทำได้โดยการเพิ่มข้อความด้านล่างลงไปใน httpd.conf &#60;FilesMatch &#8220;.(sql&#124;bak&#124;old&#124;torrent)$&#8221;&#62;     Order allow,deny     Deny from all &#60;/FilesMatch&#62; แล้วสั่ง restart apache ใหม่เท่านี้ก็สามารถป้องกันไม่ให้ผู้ใช้ files นามสกุล ที่เราไม่อนุญาติได้แล้ว]]></description>
			<content:encoded><![CDATA[<p>บางครั้ง อัพโหลด files นามสกุล เหล่านี้ขึ้นไปโดยไม่ได้ตั้งใจ อาจทำให้ โดน hacker เข้ามาแอบอ่าน .bak ของ config สำคัญเราได้<br />
เพื่อเป็นการป้องกันทำได้โดยการเพิ่มข้อความด้านล่างลงไปใน httpd.conf</p>
<blockquote><p>&lt;FilesMatch &#8220;.(sql|bak|old|torrent)$&#8221;&gt;<br />
    Order allow,deny<br />
    Deny from all<br />
&lt;/FilesMatch&gt;</p></blockquote>
<p>แล้วสั่ง restart apache ใหม่เท่านี้ก็สามารถป้องกันไม่ให้ผู้ใช้ files นามสกุล ที่เราไม่อนุญาติได้แล้ว</p>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/05/25/%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%82%e0%b8%ab%e0%b8%a5%e0%b8%94-files-%e0%b8%99%e0%b8%b2%e0%b8%a1%e0%b8%aa%e0%b8%81%e0%b8%b8%e0%b8%a5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>การยกเลิกใช้งาน function อันตรายและไม่จำเป็นใน php</title>
		<link>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%a2%e0%b8%81%e0%b9%80%e0%b8%a5%e0%b8%b4%e0%b8%81%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-function-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%95%e0%b8%a3%e0%b8%b2/</link>
		<comments>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%a2%e0%b8%81%e0%b9%80%e0%b8%a5%e0%b8%b4%e0%b8%81%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-function-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%95%e0%b8%a3%e0%b8%b2/#comments</comments>
		<pubDate>Sun, 24 May 2009 20:21:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php function]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=25</guid>
		<description><![CDATA[แก้ไขที่ php.ini หาบรรทัดที่มีข้อความว่า   disable_functions = โดย เพิ่มข้อความเหล่านี้ไปหลัง เครื่องหมาย = แล้วจัดการเซฟ escapeshellarg, escapeshellcmd, exec, passthru, proc_open,proc_close,proc_get_status, proc_nice, proc_terminate,shell_exec, system,apache_child_terminate, apache_get_modules,apache_get_version,apache_getenv, apache_lookup_uri, apache_note,apache_request_headers,apache_reset_timeout, apache_response_headers,apache_setenv, getallheaders, virtual, popen, pclose สั่ง restart apache]]></description>
			<content:encoded><![CDATA[<p>แก้ไขที่ php.ini หาบรรทัดที่มีข้อความว่า   disable_functions =<br />
โดย เพิ่มข้อความเหล่านี้ไปหลัง เครื่องหมาย = แล้วจัดการเซฟ</p>
<pre class="brush: shell;">escapeshellarg, escapeshellcmd, exec, passthru, proc_open,proc_close,proc_get_status, proc_nice, proc_terminate,shell_exec, system,apache_child_terminate, apache_get_modules,apache_get_version,apache_getenv, apache_lookup_uri, apache_note,apache_request_headers,apache_reset_timeout, apache_response_headers,apache_setenv, getallheaders, virtual, popen, pclose</pre>
<p>สั่ง restart apache</p>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%a2%e0%b8%81%e0%b9%80%e0%b8%a5%e0%b8%b4%e0%b8%81%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-function-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%95%e0%b8%a3%e0%b8%b2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การป้องกันไม่ให้ user ใช้งาน crontab</title>
		<link>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b9%83%e0%b8%ab%e0%b9%89-user-%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2/</link>
		<comments>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b9%83%e0%b8%ab%e0%b9%89-user-%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2/#comments</comments>
		<pubDate>Sun, 24 May 2009 20:14:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=20</guid>
		<description><![CDATA[ตัวอย่างนี้เป้นการป้องกันไม่ให้ user apache ใช้งาน crontab [root@demo01 ~]#echo &#8220;apache&#8221; &#62;&#62; /etc/cron.deny]]></description>
			<content:encoded><![CDATA[<p>ตัวอย่างนี้เป้นการป้องกันไม่ให้ user apache ใช้งาน crontab</p>
<blockquote><p>[root@demo01 ~]#echo &#8220;apache&#8221; &gt;&gt; /etc/cron.deny</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b9%83%e0%b8%ab%e0%b9%89-user-%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การป้องกัน user แอบดึง file ข้อมูลในระบบโดยใช้ local infile ผ่าน mysql</title>
		<link>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-user-%e0%b9%81%e0%b8%ad%e0%b8%9a%e0%b8%94%e0%b8%b6%e0%b8%87-file-%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%a1/</link>
		<comments>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-user-%e0%b9%81%e0%b8%ad%e0%b8%9a%e0%b8%94%e0%b8%b6%e0%b8%87-file-%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%a1/#comments</comments>
		<pubDate>Sun, 24 May 2009 20:08:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[local infile]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=16</guid>
		<description><![CDATA[ให้ทำการเพิ่มข้อความด้านล่างลงไปใน my.cnf แล้วทำการ restart mysql local-infile=0]]></description>
			<content:encoded><![CDATA[<p>ให้ทำการเพิ่มข้อความด้านล่างลงไปใน my.cnf แล้วทำการ restart mysql</p>
<blockquote><p>local-infile=0</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-user-%e0%b9%81%e0%b8%ad%e0%b8%9a%e0%b8%94%e0%b8%b6%e0%b8%87-file-%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%a1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

