<?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>Abeon Tech &#187; Security</title>
	<atom:link href="http://abeontech.com/tag/security/feed" rel="self" type="application/rss+xml" />
	<link>http://abeontech.com</link>
	<description>Abeon Techs Geeky blog for Coders, Gamers, Webmasters and Tech Addicts!</description>
	<lastBuildDate>Thu, 28 Jul 2011 18:50:43 +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>WebWoW Captcha on Registration Mod</title>
		<link>http://abeontech.com/422-webdesign-webwow-captcha-on-registration-mod</link>
		<comments>http://abeontech.com/422-webdesign-webwow-captcha-on-registration-mod#comments</comments>
		<pubDate>Wed, 15 Dec 2010 19:35:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Mod]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://abeontech.com/?p=422</guid>
		<description><![CDATA[The WebWoW CMS has just released a v2 beta which is great so far.
Of course there are a few small bugs, but nothing huge.

I will probably make a few mods and hacks for the CMS as it's a great project with a nice style and ethos.
This modification will place a captcha on the registration page to help prevent spam, bots, and fake registrations.]]></description>
			<content:encoded><![CDATA[<p>The WebWoW CMS has just released a v2 beta which seems great so far.<br />
Of course there are a few small bugs, but nothing that breaks functionality&#8230; Mostly undefined indexes and the like.</p>
<p>I will probably make a few mods and hacks for the CMS as it&#8217;s a great project with a nice style and ethos.<br />
This simple modification will place a captcha on the registration page to help prevent spam, bots, and fake registrations.<span id="more-422"></span></p>
<p>After about 10 minutes of setting the WebWoW CMS I started to get bot registrations indicated by the spammy usernames and lack of activity.<br />
Hopefully this will be of use to someone <img src='http://abeontech.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Only two files edits are required so it shouldn&#8217;t take more than 5 minutes to implement.</p>
<h3>WebWoW Registration Captcha Mod</h3>
<p><img src="http://i56.tinypic.com/14ay0k8.jpg" alt="WebWoW Captcha Mod" /></p>
<p>Please remember to backup any files before editing!</p>
<p><strong>1 &#8211; Open:</strong> engine/func/session.php</p>
<p>&nbsp; <strong>1a. Find:</strong> (about line 324)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> register<span style="color: #009900;">&#40;</span><span style="color: #000088;">$subuser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subpass</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subemail</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Change To:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> register<span style="color: #009900;">&#40;</span><span style="color: #000088;">$subuser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subpass</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subemail</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subcaptcha</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></div>
<div style="height:20px">&nbsp;</div>
<p>&nbsp;<strong>1b. Find:</strong> (about line 397)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$subemail</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$subemail</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Add BELOW:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/* captcha error checking - nowares */</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$field</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;captcha&quot;</span><span style="color: #339933;">;</span> &nbsp;<span style="color: #666666; font-style: italic;">//Use field name for the generated captcha image</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$subcaptcha</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$subcaptcha</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'captcha'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setError</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$field</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;* captcha incorrect&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000088;">$subcaptcha</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$subcaptcha</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></div>
<div style="height:30px">&nbsp;</div>
<p><strong>2 &#8211; Open:</strong> engine/modules/register.php</p>
<p>&nbsp;<strong>2a. Find:</strong> (about line 26)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$retval</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass_word'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Replace with:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$retval</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass_word'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'captcha'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<div style="height:20px">&nbsp;</div>
<p>&nbsp;<strong>2b. Find: (about line 109)</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">error</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;email&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;</div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Add BELOW:</strong></p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Captcha:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;captcha/php_captcha.php&quot;</span>&gt;</span> <span style="color: #ddbb00;">&amp;nbsp;</span><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;captcha&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width:65px;position:relative;bottom:5px;&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $form-&gt;</span></span>value(&quot;captcha&quot;); ?&gt;&quot; /&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;?php echo $form-&gt;</span>error(&quot;captcha&quot;); ?&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span></div></div>
<div style="height:30px">&nbsp;</div>
<p>&nbsp;<strong>3. Upload:</strong> /captcha/ folder to your site root</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a  title='WebWoW Captcha' href='http://abeontech.com/?wpdmact=process&did=MS5ob3RsaW5r' style="background:url('http://abeontech.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download Captcha Files</a></p>
<p>Please let me know if you find any errors or have any problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/422-webdesign-webwow-captcha-on-registration-mod/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bypass iPhones screen lock (iOS 4.1)</title>
		<link>http://abeontech.com/419-security-bypass-iphones-screen-lock-ios-4-1</link>
		<comments>http://abeontech.com/419-security-bypass-iphones-screen-lock-ios-4-1#comments</comments>
		<pubDate>Tue, 02 Nov 2010 15:15:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://abeontech.com/?p=419</guid>
		<description><![CDATA[A recent security flaw in Apple&#8217;s iOS allows access to the device while the phone is &#8220;locked&#8221;. iOS is used in the iPhone 4, 3G and 3GS models so the attack has a high possible reach. With a few key presses you can make calls, listen to voicemail, browse the call history and address book! [...]]]></description>
			<content:encoded><![CDATA[<p>A recent security flaw in Apple&#8217;s iOS allows access to the device while the phone is &#8220;locked&#8221;.<br />
iOS is used in the iPhone 4, 3G and 3GS models so the attack has a high possible reach.<br />
With a few key presses you can make calls, listen to voicemail, browse the call history and address book!</p>
<p>This short article details how the attack works.<br />
<span id="more-419"></span></p>
<p>Enabling the passcode lock on your iPhone is, for now, not enough to prevent someone using your device and adding to your bill!<br />
This should worry you if your concerned about iPhone security.</p>
<h3>How the vulnerability works</h3>
<p><strong>1.</strong> Hit &#8220;emergency call&#8221;<br />
<strong>2.</strong> Type in a random number.<br />
<strong>3.</strong> Hit the call button.<br />
<strong>4. </strong>Shortly after, press the lock button on top of the phone.<br />
<strong>4.1</strong> That&#8217;s it! Your now an uber l33t haxor -_-</p>
<p>This isn&#8217;t a major security risk (yet) as full access to the phone&#8217;s operations isn&#8217;t granted, but it does point out yet another fundamental flaw in Apple&#8217;s iPhone software.<br />
Let&#8217;s hope the team working on security for iOS have a good look through the crappy code their producing to iron out any more surprises.</p>
<p>The video below shows how simple and quick this can be.</p>
<p><object width="500" height="290"><param name="movie" value="http://www.youtube.com/v/hq8Dok2Th2s&#038;hl=en_GB&#038;feature=player_embedded&#038;version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/hq8Dok2Th2s&#038;hl=en_GB&#038;feature=player_embedded&#038;version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="500" height="290"></embed></object></p>
<p>There is no fix for this hack yet and will probably only be patched on the next iOS update, 4.2.<br />
If you use an iPhone with iOS version 4.1 the only real way to keep it safe is to be careful who you let use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/419-security-bypass-iphones-screen-lock-ios-4-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jailbreak my bank account!</title>
		<link>http://abeontech.com/343-security-jailbreak-my-bank-account</link>
		<comments>http://abeontech.com/343-security-jailbreak-my-bank-account#comments</comments>
		<pubDate>Tue, 08 Dec 2009 16:06:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=343</guid>
		<description><![CDATA[While the Mac OS may be almost impervious to trojans and virii, the iPhone isn't. There are a few requirements for the iphone to be susceptible to this new wave of trojans and malware.

This article covers what the risks are and how to prevent this type of attack...]]></description>
			<content:encoded><![CDATA[<p>While the Mac OS may be almost impervious to trojans and virii, the iPhone isn&#8217;t.<br />
In recent weeks there have been three different trojans aimed at taking control of jail broken iPhones and one of these trojans tries to steal any banking data stored on the phone! As more and more banks release iPhone apps to make banking on the move easier, the possible attack vector for the malwares creators get larger.</p>
<p>This article covers what the risks are and how to prevent this type of attack&#8230;<br />
<span id="more-343"></span></p>
<p>The latest wave of iPhone attacks have revolved around one primary issue: <strong>Jail broken iPhones</strong>.<br />
A simple explanation of Jail breaking is quoted from <a href="http://en.wikipedia.org/wiki/Jailbreak_(iPhone_OS)">Wikipedia</a></p>
<blockquote><p>Jailbreaking is a process that allows iPhone and iPod Touch users to run unofficial code on their devices bypassing Apple&#8217;s official distribution mechanism, the App Store. Once jailbroken, iPhone users are able to download many applications previously unavailable through the App Store via unofficial installers such as Cydia, Rock App, Icy, and Installer. Cydia is preferred by the community, while Rock App has a small catalog of mainly paid apps. Icy and Installer are officially unsupported by their developers and rarely used. Cydia founder Jay Freeman estimates that 4 million (out of 40 million) iPods and iPhones are jailbroken.[1] A jailbroken iPhone or iPod Touch is still able to use and update apps downloaded and purchased from Apple&#8217;s official App Store.</p>
<p>Jailbreaking is distinct from SIM unlocking, which is the process by which a mobile device is made compatible with telephone networks with which it was not specifically licensed to be used. Jailbreaking, while not illegal, gives a user the option to install cracked (pirated,) apps, which is illegal. Jailbreaking voids Apple&#8217;s warranty on the device.</p></blockquote>
<p>The iPhone trojan attacks started as silly &#8220;<a href="http://en.wikipedia.org/wiki/Rickrolling">Rick Rolling</a>&#8221; hacks, but quickly turned into fully fledged bank phishing software!</p>
<p>These trojans will only effect you if you have Jail broken your iPhone to work with unofficial software and games and have not changed the default SSH account created by &#8220;unlocking&#8221; your iPhone.</p>
<p>The most harmful trojan is currently known as &#8220;iPhone firmware 1.1.3 prep&#8221;, or &#8220;113 prep&#8221;.<br />
It is written in Python and allows hackers access to the victim&#8217;s device from a computer running Windows, OSX/Unix and Linux. Nearly any data stored on the iPhone can be stolen and this trojan allows them to do just about anything with the stolen data.</p>
<p>Just think if this malware accessed your messages, bank account, paypal account, or other apps containing sensitive information.<br />
It could very easily turn nasty.</p>
<p>Below is a simple guide on how to prevent this happening&#8230;</p>
<h2>Secure Your iPhone&#8217;s SSH Password!</h2>
<p>Here&#8217;s how to change default SSH password on a jailbroken iPhone :</p>
<p><strong>1. Make sure you have Cydia installed on your jailbroken device. If you don’t already have MobileTerminal installed, launch Cydia and tap the ‘Search’ tab in the bottom navigation bar.</p>
<p>2. Type ‘MobileTerminal’ in the search field and select the first result. Select ‘Install’ on the top right corner and tap ‘Confirm’ on the next screen. It will now install MobileTerminal on your device. Now, tap on ‘Return to Cydia’ and tap home button.</p>
<p>3. Navigate to the newly installed ‘MobileTerminal’ application and tap to open.</strong></p>
<div style="width:320px;margin:auto auto">
<img src="http://i45.tinypic.com/9rop52.jpg" alt="iPhone SSH Password" /><br />
<img src="http://i50.tinypic.com/11rr5ec.jpg" alt="iPhone Password" /><br />
<img src="http://i50.tinypic.com/2ijkxue.jpg" alt="Fix iPhone SSH" />
</div>
<p><strong>4. In MobileTerminal, type ’su root’ and tap return. It will ask you for a password, enter &#8220;alpine&#8221; and tap return again.</strong></p>
<div style="width:320px;margin:auto auto"><img src="http://i46.tinypic.com/2iqifi8.jpg" alt="iPhone Trojan fix" /><br />
<img src="http://i46.tinypic.com/24mrmz5.jpg" alt="" /><br />
<img src="http://i50.tinypic.com/syr2fl.jpg" alt="" /></div>
<p><strong>5. Now, type &#8220;passwd&#8221; and then tap return. Type in a new password such as &#8220;secret&#8221; (<em>but not a word in the dictionary!</em>) and tap return. Retype the new password to confirm and then tap return one last time to change the password.</p>
<p>6. Now, your SSH password will be changed and your device will be protected against any future hacks that use SSH to access your device.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/343-security-jailbreak-my-bank-account/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XSS and web form security</title>
		<link>http://abeontech.com/232-security-xss-and-web-form-security</link>
		<comments>http://abeontech.com/232-security-xss-and-web-form-security#comments</comments>
		<pubDate>Thu, 13 Nov 2008 19:24:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=232</guid>
		<description><![CDATA[There are many instances when user input is needed. But allowing just any code to be passed can cause severe problems and lead to even the most annoying 10 year old script kiddie writing PWND all over website!

There a are some simple steps which you can take to prevent most of these.
This article will go over some of the fundamental xss attacks and how to stop them.]]></description>
			<content:encoded><![CDATA[<p>There are many instances when user input is needed. But allowing just any code to be passed can cause severe problems and lead to even the most annoying 10 year old script kiddie writing &#8220;PWND&#8221; all over website!</p>
<p>There a are some simple steps which you can take to prevent most of these.<br />
This article will go over some of the fundamental <abbr title="Cross Site Scripting">XSS</abbr> attacks and how to stop them.</p>
<p><span id="more-232"></span></p>
<blockquote><p>As of 2007, cross-site scripting carried out on websites were roughly 80% of all documented security vulnerabilities. Often during an attack &#8220;everything looks fine&#8221; to the end-user who may be subject to unauthorized access, theft of sensitive data, and financial loss.</p></blockquote>
<p><strong><a href="http://en.wikipedia.org/wiki/Cross-site_scripting">Cross-site scripting</a> (XSS)</strong> is, in short, a way of injecting code by a malicious web user. The code can be used for anything from displaying a persistent pop-up or crashing the browser, to including remote files to run scripts and steal cookies!</p>
<h2>What code do I need to sanitize?</h2>
<p><span class="dropcap">W</span>hat will this magical code look like?<br />
That&#8217;s an easy question to avoid as there are many ways to mess with a website that gives permission to post raw code! Not all XSS attacks will work on all websites or even all broswers. So you may see someone testing with strange looking code before you see some, if any, form of attack.</p>
<p>For this reason, I think it&#8217;s best to implement some form of <a href="http://en.wikipedia.org/wiki/BBCode">BBCode</a> system.<br />
But more on that later&#8230;</p>
<p>A few common XSS codes could include&#8230;</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;XSS&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Hackers-Site.com/xss.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">/</span>src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Hackers-Site.com/xss.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span>`javascript<span style="color: #339933;">:</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;XSS&quot;</span><span style="color: #009900;">&#41;</span>`<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>style type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'XSS'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>img <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #3366CC;">&quot;&gt;&lt;script&gt;alert(&quot;</span>XSS<span style="color: #3366CC;">&quot;)&lt;/script&gt;&quot;</span><span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">cookie</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;;</span></div></div>
<p>Most of these examples will just show an annoying pop-up saying &#8220;XSS&#8221;, but could be used for more malicious purposes.</p>
<p>If any of the above <abbr title="Cross Site Scripting">XSS</abbr> examples are allowed to be displayed as output from your page, you have could have serious problems!</p>
<p>As mentioned above, there are MANY ways to abuse a website that doesn&#8217;t check what your posting or submitting.<br />
It may seem like a good idea to ask for visitors comments or asking for an email address for news subscriptions, but it&#8217;s worth checking what content will be displayed when the form is submitted.</p>
<h2>How can I prevent XSS attacks?</h2>
<p><span class="dropcap">A</span>ny code that can be submitted by a user should be validated or filtered in someway. Steps need to be taken to ensure malicious code can&#8217;t be executed on output.</p>
<p>Non-crucial pages like a confirmation page don&#8217;t need full validation. But, if a feedback form is allowed to go unchecked it could mean a cookie stealer gets injected and your customers details get stolen!</p>
<p>Generally speaking, it&#8217;s best to validate of any forms or inputted data submitted to your web site. Validating the data on input (rather than output) not only helps prevent possible attacks more effectively, but also makes sure only clean code gets entered into the database.</p>
<p>There are other benefits to cleaning up the code before it gets entered into the database. One great advantage is clean output to an administration section.</p>
<p>Let&#8217;s take my <a href="http://www.nowares.net/">Free Online Arcade</a> as an example:<br />
If I decided to ask for visitors to submit games to the website, I could just use a simple textbox to ask for the embeddable code to be entered. If the submitted content wasn&#8217;t validated in some way an attacker could inject a cookie stealer to hijack the administrators session! Flash code would not even be required if no form of validation is used, so I could just use embed a cookie stealer and a game together.</p>
<p>In an idea world, ever input field would be validated to ensure clean output. But that can be very time consuming.</p>
<blockquote><p>When accepting data from a user, any data at all, it should be sanitized before making its way to your database.<br />
&#8230;..<br />
We’ll scan through the input, searching for anything that shouldn’t be there, like html code, &lt;script&gt; tags, etc<br />
&#8230;..<br />
To use, we simply pass any input to the function. The function works on single strings, as well as deep arrays.</p></blockquote>
<p><strong>Denham Coote&#8217;s Blog</strong> has a great article on <a href="http://www.denhamcoote.com/php-howto-sanitize-database-inputs">Stripping out malicious code</a> for PHP, which is easy to implement and very effective.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #000000; font-weight: bold;">function</span> cleanInput<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #000088;">$search</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;script[^&gt;]*?&gt;.*?&lt;/script&gt;@si'</span><span style="color: #339933;">,</span> &nbsp; <span style="color: #666666; font-style: italic;">// Strip out javascript</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;[\/\!]*?[^&lt;&gt;]*?&gt;@si'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Strip out HTML tags</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;style[^&gt;]*?&gt;.*?&lt;/style&gt;@siU'</span><span style="color: #339933;">,</span> &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Strip style tags properly</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;![\s\S]*?--[ \t\n\r]*&gt;@'</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Strip multi-line comments</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$search</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p><strong>Whenever you make a form you should not leave it alone without any form validation. Why? Because there is no guarantee that the input is correct and processing incorrect input values can make your application give unpredictable result.</strong></p>
<p><a href="http://www.php-mysql-tutorial.com/form-validation-with-php.php">Form Validation With PHP</a> covers the subject in a little more detail. The article includes full source code and examples.</p>
<h2>Closing Notes</h2>
<p><span class="dropcap">T</span>o sum it all up&#8230; Trust No One!<br />
Try to validate any code that will be submitted to the database or displayed on the website, even if only to remove the script tag.</p>
<p>In my opinion it&#8217;s a good idea to try and think like a hacker. Spam test your site before putting any changes in place. Try to execute some annoying javascript. Could you include remote javascript files? Will malformed tags allow injection?</p>
<p><strong>If you can do it, the hackers can generally do worse!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/232-security-xss-and-web-form-security/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Easter Egg</title>
		<link>http://abeontech.com/273-mixed-php-easter-egg</link>
		<comments>http://abeontech.com/273-mixed-php-easter-egg#comments</comments>
		<pubDate>Thu, 23 Oct 2008 18:20:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=273</guid>
		<description><![CDATA[If you add the code...
?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
to the end of any URL that is a PHP page, you will see a funny picture on most servers. Also on April 1st (April Fool's Day), the picture will replace the PHP logo on any phpinfo() page. If the PHP directive expose_php is set to be "off" in php.ini, then the PHP eggs will not show, but it is "on" by default, and many webhosting servers do not change it.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s nice to see the developers of PHP had some fun while they worked.<br />
If you add the code&#8230;</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F36<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>to the end of any URL that is a PHP page, you will see a funny picture on most servers. Also on April 1st (April Fool&#8217;s Day), the picture will replace the PHP logo on any phpinfo() page. If the PHP directive expose_php is set to be &#8220;off&#8221; in php.ini, then the PHP eggs will not show, but it is &#8220;on&#8221; by default, and many webhosting servers do not change it.</p>
<p><span id="more-273"></span></p>
<p>If you see such a URL in your website logs, it may be because someone is trying to determine if your server is running PHP and attempting to discover weaknesses in your system. By setting expose_php = off in the php.ini configuration file, you will reduce the amount of information available to them. If the PHP easteregg is active (the URL shows the image), then scanning the website with Nitko web server scanner will give the warning message, &#8220;<strong>PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings</strong>.&#8221;</p>
<p>These are the four QUERY strings you can add to the end of a PHP web page to view a (somewhat) hidden image or web page:</p>
<p>(1)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F36<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>This one is the most interesting, and displays an &#8220;easter egg&#8221; image of either a rabbit in a house, a brown dog in the grass, a black Scottish Terrier dog, a sloppy child-crayon-colored php logo, or a guy with breadsticks (looks like pencils or french fries) sticking out of his mouth like a walrus. The original dog was Stig Bakken&#8217;s (Stig is one of the PHP developers); the newer dog is <a href="http://www.suraski.net/blog/index.php?/archives/6-Scotch-is-gone.html">Zeev Suraski&#8217;s</a> dog (the link goes to his blog entry about the dog, called Scotch or Scottie, that died August 30, 2005); and the guy is Thies Arntzen (the logo image was taken from a picture from the PHP Developers&#8217; Meeting that the PHP Group held in January 2000). The five images are shown below. Anyone know whose rabbit it is, or more details on these? The black dog, colored logo, and rabbit pictures are 10 pixels shorter than the other two images.</p>
<p><img src="http://i38.tinypic.com/2v1vo5s.jpg" alt="PHP Easter Egg" /></p>
<p>(2)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F34<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>This is used by the phpinfo function to display the PHP logo, but works on other PHP pages.</p>
<p><img src="http://i37.tinypic.com/mta004.jpg" alt="PHP Easter Egg 2" /></p>
<p>(3)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F35<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>This is used by the phpinfo() function to display the Zend logo, but also works on other PHP-parsed pages.</p>
<p><img src="http://i38.tinypic.com/mufmtf.jpg" alt="PHP Easter Egg 3" /></p>
<p>(4)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPB8B5F2A0<span style="color: #339933;">-</span>3C92<span style="color: #339933;">-</span>11d3<span style="color: #339933;">-</span>A3A9<span style="color: #339933;">-</span>4C7B08C10000</div></div>
<p>This displays the PHP development credits, and is linked to from any phpinfo() page with text &#8220;PHP Credits&#8221;.</p>
<p>The only truly hidden image is the first one above. The other three are called from the web page produced by the phpinfo() function.</p>
<p>For the first code above, other online sources claim it displays a rabbit in PHP versions 5.0 and 5.01, a dog in 4.3.0 and higher (below 5.0), and the funny PHP coder guy in PHP versions 4.0 through 4.2.3. Below are the images I saw for these PHP versions:</p>
<p><strong>PHPCODER GUY WITH BREADSTICKS (Thies C. Arntzen):</strong><br />
PHP Version 4.0.1pl2<br />
PHP Version 4.1.2 *<br />
PHP Version 4.2.2 *</p>
<p><strong>BROWN DOG IN GRASS:</strong><br />
PHP4u Version 3.0, Based on PHP-4.3.2<br />
PHP Version 4.3.2<br />
PHP Version 4.3.3<br />
PHP Version 4.3.8<br />
PHP Version 4.3.9<br />
PHP Version 4.3.10</p>
<p><strong>BLACK SCOTTISH TERRIER DOG:</strong><br />
PHP Version 4.3.11<br />
PHP Version 4.4.0<br />
PHP Version 4.4.1<br />
PHP Version 4.4.2<br />
PHP Version 4.4.3<br />
PHP Version 4.4.4<br />
PHP Version 5.0.5-2ubuntu1.1<br />
PHP Version 5.0.5-pl3-gentoo<br />
PHP Version 5.1.0<br />
PHP Version 5.1.2</p>
<p><strong>RABBIT:</strong><br />
PHP Version 4.3.1 *<br />
PHP Version 5.0.0 *<br />
PHP Version 5.0.3 *</p>
<p><strong>COLORED PHP LOGO:</strong><br />
PHP Version 5.1.4<br />
PHP Version 5.2.0</p>
<p>The first code above, ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42, is returned by the hidden function (undocumented in the php.net online manual) php_egg_logo_guid(). PHP_EGG_LOGO_GUID is defined as a preprocessor macro in php-src/ext/standard/info.h, line 54, and referenced in 3 files:</p>
<p>php-src/ext/standard/info.c (lines 988 and 1032)<br />
php-src/ext/standard/info.h (line 54)<br />
php-src/main/php_logos.c (line 59).</p>
<p>Below are the four codes&#8217; definitions in the php source within php-source/ext/standard/info.h (lines 53 to 56):</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#define PHP_LOGO_GUID &quot;PHPE9568F34-D428-11d2-A769-00AA001ACF42&quot;<br />
</span><span style="color: #666666; font-style: italic;">#define PHP_EGG_LOGO_GUID &quot;PHPE9568F36-D428-11d2-A769-00AA001ACF42&quot;<br />
</span><span style="color: #666666; font-style: italic;">#define ZEND_LOGO_GUID &quot;PHPE9568F35-D428-11d2-A769-00AA001ACF42&quot;<br />
</span><span style="color: #666666; font-style: italic;">#define PHP_CREDITS_GUID &quot;PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000&quot;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/273-mixed-php-easter-egg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SockStress &#8211; TCP/IP Vulnerability</title>
		<link>http://abeontech.com/147-security-sockstress-tcp-ip-vulnerability</link>
		<comments>http://abeontech.com/147-security-sockstress-tcp-ip-vulnerability#comments</comments>
		<pubDate>Thu, 09 Oct 2008 19:30:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Exploit]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=147</guid>
		<description><![CDATA[Outpost24's Senior Security Researcher, Jack C. Louis has discovered a generic issue that affects the availability of TCP services. This issue could be used to create a Denial of Service attack. Vendors have been notified. Details are not available to the public at this point, but will be disclosed at an appropriate future date.]]></description>
			<content:encoded><![CDATA[<p>A serious TCP/IP Vulnerability known as “<strong>SockStress</strong>” has been found, exploited, and information released by a Security group called Outpost24.</p>
<p>This latest vulnerability not only has severe implications for many web masters, designers and programmers, but also affects routing servers and any system with TCP stack processes exposed to the outside world.</p>
<p>After the latest DNS poisoning vulnerability, webmasters seem on edge about how insecure the very foundations of the internet are (mainly due to being created before security was even thought of).</p>
<p><strong>Sockstress</strong> is the name of the tool created by Outpost24, which they are still testing before releasing it. They have, however, walked through how the attack could be achieved in great detail. Some security experts have showed concern over how they handled the information released.</p>
<p>The <em>sockstress</em> attack seems to be limited to the <strong>TCP stack</strong>, but mixes several techniques to allow a very low-bandwidth hacker to deplete local resources (memory, swap file and even kernel file abuse). Just a few packets a second and a little amount of time are needed to take down a server. As little as nine packets and a few minutes are all that is suggested to be needed!</p>
<p><span id="more-147"></span></p>
<p>Lack of timing of the TCP/IP stack and, more specifically, kernel&#8217;s response seems to be the most deciding factor. A &#8220;Badly designed TCP stack&#8221; is referred to and <em>after</em> the 3-way handshake (syn cookie verification and acknowledgment) has completed, resources can be exploited!&#8230;<br />
&#8220;The worst thing we ever had happen, was, we had Windows reboot and say &#8216;Operating system not found&#8217;&#8221;</p>
<p>In theory, a syn cookie validation process could be cycled. Sending for verification and acknowledgment, then a &#8220;no buffer space&#8221; response could be sent from the attackers end. This would force the target to allocate more resources to the attackers cycled process, with severe consequences.<br />
Please bear in mind that this is not a syn packet attack attack! (the magic happens after the syn ack)</p>
<p>This can result in a denial of service (Dos) by TCP servers (www, ftp, tftp, smtp, pop, etc.) running on Windows, Linux, BSD, certain routing servers, and other Internet applications and protocols!</p>
<p>An excerpt from Outpost24&#8242;s website, claims:</p>
<blockquote><p>Outpost24&#8242;s Senior Security Researcher, Jack C. Louis has discovered a generic issue that affects the availability of TCP services. This issue could be used to create a Denial of Service attack. Vendors have been notified. Details are not available to the public at this point, but will be disclosed at an appropriate future date.</p></blockquote>
<blockquote><p>Jack C. Louis, along with Outpost24&#8242;s Chief Security Officer Robert E. Lee, will be speaking at the T2 conference in Helsinki, Finland on October 16 &#8211; 17.</p></blockquote>
<p>You can read more about the <strong>Sock stress</strong> talks here:<br />
<a href="http://www.t2.fi/schedule/2008/#speech8">T2 Schedule</a> or <a href="http://www.t2.fi/2008/08/27/jack-c-louis-and-robert-e-lee-to-talk-about-new-dos-attack-vectors/">T2&#8242;s 08 Conference</a>.</p>
<blockquote><p>I want to know if there is anyone who can write a program that performs the operation described in this audio podcast.</p>
<p>http://debeveiligingsupdate.nl/audio/bevupd_0003.mp3</p>
<p>Please note, that the English portion of the audio starts about 4 minutes into the segment.<br />
This program must be testable prior to paying for it.</p></blockquote>
<p><strong><a href="http://www.getafreelancer.com/projects/Visual-Basic-NET/Build-SockStress-Application.html">Get A Freelancer</a> has a project asking for the tools creation.</strong> How long until someone makes it public?</p>
<h2>Podcast Downloads</h2>
<p><strong>You can listen to the security podcast in various formats. The Sockstress MP3 files are listed below:</strong></p>
<p>The wonderful guys at <a href="http://www.grc.com/intro.htm">GRC</a> (proud Twit army addict myself) have have hosted the interview, just in case the original goes down.<br />
Thanks Steve!<br />
<a href="http://debeveiligingsupdate.nl/audio/bevupd_0003.mp3">Entire Interview</a><br />
44 min, 10 sec &#8211; 128 kbps &#8211; 41.1 MB<br />
<a href="http://media.grc.com/mp3/Whole_SockStress_Mono_16kbps.mp3">Entire Interview</a><br />
44 min, 10 sec &#8211; 16 kbps &#8211; 5.3 MB<br />
<a href="http://media.grc.com/mp3/Trimmed_SockStress_Mono_64kbps.mp3">Trimmed Interview</a><br />
38 min, 59 sec &#8211; 64 kbps &#8211; 18.7 MB<br />
<a href="http://media.grc.com/mp3/Trimmed_SockStress_Mono_16kbps.mp3">Trimmed Interview</a><br />
38 min, 59 sec &#8211; 16 kbps &#8211; 4.7 MB</p>
<p>A full transcript is available from CurbRisk.com :<br />
<a href="http://www.curbrisk.com/security-blog/outpost24-tcp-denial-of-service-vulnerability-interview-transcript.html">Outpost24&#8242;s TCP &#8211; Denial Of Service vulnerability interview transcript</a></p>
<p>At time of posting, there is currently no known work around or fix for this issue. The authors seem to be white hat and want to help vendors resolve the issues. But, like the rest of us, know the internet has a long way to go before being secure.</p>
<p><strong>Sockstress has now also been entered into the <a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-4609">NIST CVE</a> database. The list of affected platforms is staggering!</strong></p>
<p>It is widely accepted that &#8220;the community&#8221; prefers to find workarounds for the flawed foundations of the internet and associated protocols. But would it not be better if, knowing as much about security as we do now, the internet was written from the ground up?<br />
Yes, it is impossible. But I think it would be the only way to make serious, major exploits like this and the recent DNS poisoning exploits avoidable.</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/147-security-sockstress-tcp-ip-vulnerability/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://media.grc.com/mp3/Whole_SockStress_Mono_16kbps.mp3" length="5301290" type="audio/mpeg" />
<enclosure url="http://media.grc.com/mp3/Trimmed_SockStress_Mono_64kbps.mp3" length="18716212" type="audio/mpeg" />
<enclosure url="http://media.grc.com/mp3/Trimmed_SockStress_Mono_16kbps.mp3" length="4679262" type="audio/mpeg" />
<enclosure url="http://debeveiligingsupdate.nl/audio/bevupd_0003.mp3" length="43176073" type="audio/mpeg" />
		</item>
		<item>
		<title>Securing Your Most Personnel Files</title>
		<link>http://abeontech.com/138-security-securing-your-most-personnel-files</link>
		<comments>http://abeontech.com/138-security-securing-your-most-personnel-files#comments</comments>
		<pubDate>Fri, 03 Oct 2008 14:40:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=138</guid>
		<description><![CDATA[As security online increases and encourages secure passwords, they also get harder to remember.
As a result of this, many of us have files on our hard drive / flash drive / cds etc containing our login details and other sensitive information.
There are many reasons why this is a bad idea. The latest to grab the attention of the media is related to the new powers given to US Customs and Border Patrol, allowing any suspicious electrical device to be search and / or seized!.....]]></description>
			<content:encoded><![CDATA[<p>We are all aware of the threats faced while online or connected to the internet.<br />
But think about the security problems that could arise if your laptop, flash drive or cds were stolen!<br />
Physical theft is often overlooked when thinking about the security of your personnel details.</p>
<p>As security online increases and encourages secure passwords, they also get harder to remember.<br />
As a result of this, many of us have files on our hard drive / flash drive / cds etc containing our login details and other sensitive information.</p>
<p>There are many reasons why this is a bad idea. The latest to grab the attention of the media is related to the new powers given to US Customs and Border Patrol, allowing any suspicious electrical device to be search and / or seized!&#8230;..</p>
<p><span id="more-138"></span></p>
<blockquote><p>Since 9/11, CBP agents have been searching and seizing laptops, digital cameras, cellphones and other electronic devices at the border, without search warrants, or probable cause. CBP agents can subject these devices to extensive forensic analysis, according to the courts.</p>
<p>Maria Udy, a UK citizen working for a US global marketing firm, had her company laptop seized by a federal agent prior to flying from Dulles International to London, in December, 2006. The Washington Post reports Udy said the agent told her he had a “security concern” with her. Fourteen months later, Udy’s laptop had not been returned, nor had she been able to find out what happened to it.</p></blockquote>
<p>[ Excerpt From <a href="http://www.tripso.com/today/warning-us-customs-and-border-protection-may-confiscate-your-laptop-and-pda/">Tripso.com</a>]</p>
<p>I would feel a lot better knowing my files where secured, if I were to lose my laptop or removable storage.</p>
<p>There are a few ways to hide files on your computer without too much effort.</p>
<p>In this example we will hide a text message inside a picture. We have choose for this tutorial a text file named Secret.txt and a picture firefox.jpg.</p>
<p>1. Move your files you want to combine in a new folder, in our case C:\Hidden.<br />
<img src="http://i34.tinypic.com/2vaebv5.jpg" alt="" /></p>
<p>2. Add the file you want to hide into a new RAR archive (in our example named Secret.txt.rar).<br />
<img src="http://i35.tinypic.com/5ow41u.jpg" alt="" /></p>
<p>3. WinRar created the archive in the folder where our files are located.<br />
<img src="http://i33.tinypic.com/mhr4gw.jpg" alt="" /></p>
<p>4. Open Command Prompt (Start -> Run&#8230;, type cmd and press Enter).</p>
<p>5. Go to the folder where your files are located, in this case C:\Hidden by using the cd command.<br />
<img src="http://i37.tinypic.com/2qxte0y.jpg" alt="" /></p>
<p>6. Now type copy /b firefox.jpg + secret.txt.rar helpero.jpg where firefox.jpg is the original picture, secret.txt.rar is the file that will be hidden, and helpero.jpg is the file which contains both.<br />
<img src="http://i33.tinypic.com/1zyzcrc.jpg" alt="" /></p>
<p>7. If you open helpero.jpg you will see the firefox.jpg image.<br />
<img src="http://i37.tinypic.com/24omsjk.jpg" alt="" /></p>
<p>8. Try opening the file with WinRar (select All files).<br />
<img src="http://i35.tinypic.com/2ilbg95.jpg" alt="" /></p>
<p><img src="http://i38.tinypic.com/zk2tn6.jpg" alt="" /></p>
<p>9. Now you can see the text file that is hidden in the picture.<br />
<img src="http://i36.tinypic.com/2wdzyp0.jpg" alt="" /></p>
<p>Using this method, you can &#8220;hide&#8221; any rar file (or other file, for that matter) inside the picture. It will also retain the preview and other standard picture file associations.</p>
<p>This won&#8217;t stop a major forensic examination, but should stop the casual user from finding your most personnel login details!</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/138-security-securing-your-most-personnel-files/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Game Hacked?</title>
		<link>http://abeontech.com/81-security-flash-game-hacked</link>
		<comments>http://abeontech.com/81-security-flash-game-hacked#comments</comments>
		<pubDate>Wed, 10 Sep 2008 19:09:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=81</guid>
		<description><![CDATA[A friend of mine just sent me the URL to a flash game (for obvious reasons I will not share the link) which is part of a number of games with a price of 10.000 EUR in the end. One would believe that a game with such a price money is secure.]]></description>
			<content:encoded><![CDATA[<p>A friend of mine just sent me the URL to a flash game (for obvious reasons I will not share the link) which is part of a number of games with a price of 10.000 EUR in the end. One would believe that a game with such a price money is secure. Especially when the organising party is an internet provider.</p>
<p><span id="more-81"></span></p>
<p>But guess what&#8230; At the end of the flash game you can optionally submit your score to the highscore server, which results in a POST to the file submithigh.php with several parameters, one parameter saying score=XXXX. And of course you can submit whatever score you want. So now I lead the highscore with 10000 of about 900 possible points. I set it that high to ensure that the guys at the ISP will realize that this is faked, but imagine I had just increased the current highscore by 10. I seriously doubt anyone would have noticed and I would have won the competition without even decompiling the flash.</p>
<p>[ Original Post From <a href="http://blog.php-security.org/archives/95-Flash-Game-10000-of-900-possible-points!!.html" title="PHP Security">php-security.org</a> ]</p>
<p>======<br />
Even simple mistakes can cause a lot of trouble.<br />
Think if all the top scores on every game game were hacked to show obscene comments!<br />
It&#8217;s best to try and think like a hacker when creating public content <img src='http://abeontech.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/81-security-flash-game-hacked/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Security Tutorial</title>
		<link>http://abeontech.com/56-security-javascript-security-tutorial</link>
		<comments>http://abeontech.com/56-security-javascript-security-tutorial#comments</comments>
		<pubDate>Thu, 04 Sep 2008 20:24:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=56</guid>
		<description><![CDATA[JavaScript is designed as an open scripting language. It is not intended to replace proper security measures, and should never be used in place of proper encryption.

JavaScript has its own security model, but this is not designed to protect the Web site owner or the data passed between the browser and the server. The security model is designed to protect the user from malicious Web sites, and as a result, it enforces strict limits on what the page author is allowed to do. They may have control over their own page inside the browser, but that is where their abilities end.]]></description>
			<content:encoded><![CDATA[<p>JavaScript is designed as an open scripting language. It is not intended to replace proper security measures, and should never be used in place of proper encryption.</p>
<p>JavaScript has its own security model, but this is not designed to protect the Web site owner or the data passed between the browser and the server. The security model is designed to protect the user from malicious Web sites, and as a result, it enforces strict limits on what the page author is allowed to do. They may have control over their own page inside the browser, but that is where their abilities end.</p>
<p><span id="more-56"></span></p>
<ul>
<li> JavaScripts cannot read or write files on users&#8217; computers. They cannot create files on the server (except by communicating with a server side script that creates files for them). The only thing they can store on the user&#8217;s computer are cookies.</li>
<li> They are allowed to interact with other pages in a frameset, if those frames originate from the same Web site, but not if they originate from another Web site (the postMessage method from HTML 5 does safely extend this capability, but I will not cover that here). Some browsers will even treat different port numbers on the same server as a different Web site.</li>
<li> JavaScript cannot be used to set the value attribute of a file input, and will not be allowed to use them to upload files without permission.</li>
<li> JavaScript cannot read what locations a user has visited by reading them from the location object, although it can tell the browser to jump back or forward any number of steps through the browser history. It cannot see what other Web pages the user has open.</li>
<li> JavaScript cannot access the cookies or variables from other sites.</li>
<li> It cannot see when the user interacts with other programs, or other parts of the browser window.</li>
<li> It cannot open windows out of sight from the user or too small for the user to see, and in most browsers, it cannot close windows that it did not open.</li>
</ul>
<p>Most people who want to know about security with JavaScript are interested in producing password protected pages or sending encrypted data to or from the user&#8217;s computer. For true security, use SSL/TLS (HTTPS) and put all of your checks on the server. You could also use a security lockout if too many false attempts are made, preventing brute force cracks. JavaScript cannot replace this functionality. The problem lies in the fact that if a person can read what you are sending over the internet, they can also rewrite it. So when you think you are filling in a password to access a protected page, they have changed it so that you are actually filling in a password that will be sent to them. This requires SSL to be sure that you are protected. Still, this tutorial is about JavaScript, so I will now show you what can and cannot be done with JavaScript.</p>
<h1>Protecting the source of your scripts</h1>
<p>Oh dear. This is just not possible. Many people make futile attempts to do so, but to be honest, there is no point in trying. In fact, in many developers&#8217; opinions, there is no such thing as copyright with JavaScript, although it is theoretically possible. The point with copyright and patents is that you can only copyright or patent something completely new, a new innovation, something that has not been done or written before. You can almost guarantee that nothing you do with JavaScript will be a new innovation or even newly written. Someone will have done it before, almost certainly using the exact same algorithm with just a few variable names changed. JavaScript is just not designed for innovative programming since it just uses APIs designed by someone else to do what you are doing, and they already came up with it before you in order to invent the API. Even if you write something in a &#8216;new&#8217; way, it will still be doing something that has already been done, and if you did attempt to take things too far and take the matter to court, you would just be laughed back out of it again.</p>
<p>As for protecting what you send, JavaScript is passed in text, not compiled to a binary first, so the code is always visible. How can you stop people seeing the source when you are sending the source to each viewer? Let me walk through the problem.</p>
<p>If the source of the JavaScript is held in the page you are viewing, a simple &#8216;view source&#8217; will show you the script. Looking in the browser&#8217;s cache will show the scripts that are in header files. Of course you need to check the source first to find the name of the header file.</p>
<p>Many developers have spotted the fact that both of these methods require the &#8216;view source&#8217; to be available, so they prevent the viewer from viewing the source. They do this by preventing the context menu from appearing when the user right clicks and by removing menus by using window.open etc. Believe me, both of these are useless. You cannot stop right clicks in Opera, Safari, OmniWeb or iCab like you can in other browsers. So some people try to prevent these browsers from viewing the page by using browser sniffing. This is equally uneffective. All the viewer has to do is swich off script when they get to the page, or view the source of previous pages to find the location of the protected page. In adition, Opera, Mozilla/Firefox and Internet Explorer are all capable of running user scripts that allow the user to override restrictions made by the page.</p>
<p>Some people even try to make sure that the page is only delivered if a referrer header is sent to make sure that the user came from the right page, and is not attempting to type in a location manually. So the user can use Curl, a program that allows them to request a page with referrer header, cookies, form fields etc., and save the download to a text file.</p>
<p>Some people try to encode the script using charCodeAt or escape, but as the decoding technique is provided in the page, only simple modifications are required to make the script appear in text, not as embedded script. I have seen one set of scripts that have been &#8216;protected&#8217; by changing their variable names to completely incomprehensible names, and adding several redundant lines of incompressible code and removing all redundant spaces and linebreaks. It does not take too much work to turn this back into understandable code.</p>
<p>You may want to protect your code, but it simply is not possible. Someone who is determined will be able to find it out.</p>
<h1>Password protecting a file</h1>
<p>It is best to do this with a server side script, and an encrypted connection. But since this is JavaScript &#8230;</p>
<p>Take the following for example. I want to only allow someone to access my page if they put in the correct password. I want to provide a box for them to write it, and then I want to test if it is correct. If it is, I let them view the page. The problem is that in the source of the page, I have to write the password in the script to test what they have written. For example:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> document.<span style="color: #660066;">forms</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">elements</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'mypassword'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; location.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'protectedpage.html'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>As described in the above section, you cannot protect the source of a page, especially from someone who is really determined. There is no point in trying. Once a user managed to see the source, they could see the password or the URL in plain text, or encoded, but again, that is easy to break.</p>
<p>For simple security, try this technique. Name the file to be protected whateverYourPasswordIs.html and make sure there is an index.html file in the same directory. Now use the following:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>form action<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span> onsubmit<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;location.href = this.elements[0].value + '.html'; return false;&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;submit&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Submit&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span></div></div>
<p>The problem with this technique is that the page is still passed in plain text across the Internet, as is the name of the page that you send. If anyone is snooping at data packets on the Internet, they can retrieve the page&#8217;s contents. In many places, packet snooping is illegal, but that does not mean that no-one does it.</p>
<p>This protection technique is known as security by obscurity, in other words, it is only secure because no-one knows it is there. If someone was determined, they would find it.</p>
<p>As a more complicated solution, try creating your own encryption technique that uses a password as an encryption key. Encrypt the contents of the file. As the page loads, use window.prompt to ask the user for a key. Try decrypting the page with their key, using document.write to write the page. If your technique is good enough, wrong passwords would only produce an incomprehensible output. With this technique, the password is never transmitted over the internet in plain text, and neither is the content. This technique could be cracked by brute force, trying every possible password until something works. Better passwords and encryption algorithms will help, but if someone was determined, they would break it. One of my readers has submitted a script to do this based on RC4 and Base64.</p>
<p>I have used both of these techniques.</p>
<h1>Encrypting data before it is sent to you</h1>
<p>Normally, this cannot be done with JavaScript using the Internet alone. You can encrypt text at the user&#8217;s end and unencrypt it at your end. The problem is that the user has to encrypt it with a password that you know so that you can unencrypt it. They would have to tell you by telephone or post. Alternatively, you could put the password in the source of the page and get the function to encrypt using that key. But this password would have to be sent over the internet in plain text. Even if you did encode it, it would not be too much work for a snooper to crack it. In fact, the encryption could even be broken with brute force techniques. So what do you do?</p>
<p>The best possible technique would be to create a symmetric encryption key using a twin public/private key pair as with techniques such as Diffie-Hellman or SSL, or use an asymetric public/private key pair and encryption technique as with PGP or RSA. The problem is that in order to prevent brute force cracking techniques, these require the browser to handle numbers as high as 2&#215;10600 or higher. JavaScript is just not natively capable of working with numbers as high as this. As yet, I have found no solution to this, although on http://shop-js.sourceforge.net/ there is an algorithm for emulating large number handling, and an example of JavaScript powered RSA. The technique seems to work and takes only a few seconds to create keys, by using complex mathematics and algorithms (look at the source of crypto.js) to emulate large number handling.</p>
<p>Even so, if doing the equivalent of RSA (etc.), it is still not possible for the user to verify your identity as with SSL certificates, so it would be possible for a third party to inject their own code and have the information sent to them instead, without the user&#8217;s knowledge. For the best security, stick to real SSL.</p>
<h1>Protecting your email address</h1>
<p>This is one of the very useful things that JavaScript can do. For those that don&#8217;t understand the problem, I will summarise. Search engines &#8216;crawl&#8217; the Internet, following the links in pages and requesting other ones so that they can add the pages to their search databases. Using the same technology, spammers crawl the Internet looking for email addresses, whether in mailto: links or just written on the page. These email harvesters are one of the most annoying uses of otherwise useful technologies.</p>
<p>Simply writing your email address on any web page (through newsgroup postings etc) can leave you flooded with unsolicited emails. Many people fall into the trap of replying to these emails asking to be removed from the mailing list, and succeed only in confirming that their email address is valid. The problem is that you may actually want your email address on the page, or a link that automatically opens up a new email to you. There are a couple of steps you can take to prevent the problems with unsolicited emails:</p>
<ul>
<li> Use a throw-away email address like a yahoo or hotmail account when posting to newsgroups, signing online guestbooks, or writing your email address on your Web pages. That way, when you start to get too much spam on that email address, you can just dispose of that email account, and get a new one.</li>
<li> If you can, tell your email client (program) not to send read-confirmations when you read your emails. This way your email client does not automatically confirm your email address.</li>
<li> Be careful when setting up auto-replies.</li>
<li> When you post your email address, change it to read something like myName@REMOVE_THISmydomain.com or myName(replace with @ symbol)mydomain.com and hope that anyone who legitimately replies to it works out what they need to do to turn it back into a proper email address. The problem is that not all of them understand this, and don&#8217;t understand why the email adress does not just work. So, you can try the next point as well:</li>
<li> Use JavaScript. How? Read on!</li>
</ul>
<h1>Using JavaScript to write your email address</h1>
<p>I have never heard of an email harvester that is clever enough to interpret JavaScript. All they can do is read the text that makes up the page. So if you write your email address with JavaScript, they will not be able to read it. Remember that if you write the email address as a single word, even in the JavaScript, they may still interpret it as an email address, so it helps to break it up a little:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> theName <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailName'</span><span style="color: #339933;">,</span> theDomain <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailDomain.com'</span><span style="color: #339933;">;</span><br />
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'My email address is '</span> <span style="color: #339933;">+</span> theName <span style="color: #339933;">+</span> <span style="color: #3366CC;">'@'</span> <span style="color: #339933;">+</span> theDomain <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>You can also use a mailto link:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> theName <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailName'</span><span style="color: #339933;">,</span> theDomain <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailDomain.com'</span><span style="color: #339933;">;</span><br />
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'&lt;a href=&quot;mailto:'</span> <span style="color: #339933;">+</span> theName <span style="color: #339933;">+</span> <span style="color: #3366CC;">'@'</span> <span style="color: #339933;">+</span> theDomain <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;Contact me&lt;<span style="color: #000099; font-weight: bold;">\/</span>a&gt;'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>You could even use a combination of both:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> theName <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailName'</span><span style="color: #339933;">,</span> theDomain <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailDomain.com'</span><span style="color: #339933;">;</span><br />
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'&lt;a href=&quot;mailto:'</span> <span style="color: #339933;">+</span> theName <span style="color: #339933;">+</span> <span style="color: #3366CC;">'@'</span> <span style="color: #339933;">+</span> theDomain <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;'</span> <span style="color: #339933;">+</span> theName <span style="color: #339933;">+</span> <span style="color: #3366CC;">'@'</span> <span style="color: #339933;">+</span> theDomain <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;<span style="color: #000099; font-weight: bold;">\/</span>a&gt;'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>There is, however, a problem with this approach. It relies on your viewers having JavaScript enabled. Many of your more web-aware viewers will not. In my case, these are often likely to be people who I want to contact me. Fortunately, these viewers are the ones who are likely to understand what to change if you tell them to as I have showed above (in the bullet points). So, you can use a combination of both approaches:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> theName <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailName'</span><span style="color: #339933;">,</span> theDomain <span style="color: #339933;">=</span> <span style="color: #3366CC;">'myEmailDomain.com'</span><span style="color: #339933;">;</span><br />
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'&lt;p&gt;&lt;a href=&quot;mailto:'</span> <span style="color: #339933;">+</span> theName <span style="color: #339933;">+</span> <span style="color: #3366CC;">'@'</span> <span style="color: #339933;">+</span> theDomain <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;'</span> <span style="color: #339933;">+</span> theName <span style="color: #339933;">+</span> <span style="color: #3366CC;">'@'</span> <span style="color: #339933;">+</span> theDomain <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;<span style="color: #000099; font-weight: bold;">\/</span>a&gt;&lt;<span style="color: #000099; font-weight: bold;">\/</span>p&gt;'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span><br />
&lt;noscript&gt;<br />
&nbsp; &lt;p&gt;&lt;a href=&quot;mailto:myEmailName(replace with @ symbol)myEmailDomain.com&quot;&gt;<br />
&nbsp; myEmailName(replace with @ symbol)myEmailDomain.com&lt;/a&gt;&lt;/p&gt;<br />
&lt;/noscript&gt;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/56-security-javascript-security-tutorial/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blocking Proxies Tutorial</title>
		<link>http://abeontech.com/51-security-blocking-proxies-tutorial-_simple-ddos-protection</link>
		<comments>http://abeontech.com/51-security-blocking-proxies-tutorial-_simple-ddos-protection#comments</comments>
		<pubDate>Thu, 04 Sep 2008 20:03:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=51</guid>
		<description><![CDATA[Since a lot of people proxy DDoS, it's useful to protect your site against it.

You have three options if you have total control over the server...
1 - Detect proxies and block them on firewall/mod_security level
2 - Detect and block them via .htaccess.
3 - Detect them via PHP and block them via .htaccess

This tutorial explains how to detect and block proxies.]]></description>
			<content:encoded><![CDATA[<p>Since a lot of people proxy DDoS, it&#8217;s useful to protect your site against it.</p>
<p>You have three options if you have total control over the server&#8230;</p>
<p><span id="more-51"></span></p>
<ol>
<li>Detect proxies and block them on firewall/mod_security level</li>
<li>(1) Detect them via PHP and block them via .htaccess</li>
<li>(2) Detect and block them via .htaccess (new method added!)</li>
</ol>
<p class="blocknumber"><span class="bignumber">01</span>Since most people use shared hosting, number 3 is the best option unless you feel like manually banning 600 ips from /</p>
<p>So, just put this litle code at the top of all your main PHP files, and it will consume little to no resources.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_X_FORWARDED_FOR'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_VIA'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">!=</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Don't use proxies, please.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<h3>Break down:</h3>
<p>HTTP_X_FORWARDED_FOR: When a proxy connects to a site, it sends Forwaded-For: YourIPHere, unless it&#8217;s an elite proxy. People that don&#8217;t use proxies have no http_x_forwaded_for so that&#8217;s a dead easy way to spot them.</p>
<p>HTTP_USER_AGENT: This script checks and make sure the user DOES send a user agent. Most DDoSing programs don&#8217;t have a User-Agent attribute where as all internet browsers do =) Another easy spot on.</p>
<p>HTTP_VIA: HTTP_VIA pretty much sends what kind of proxy server it&#8217;s using, ie squid/squidX.</p>
<h3>Info:</h3>
<p>Most DDoSing programs hit http://site.com, not http://site.com/page.php. When the program connects to site.com/, the index file is loaded. index.php in most forums.</p>
<p>So, if you put that code in index.php, the first line of it, then you&#8217;ll barely feel any effects of proxy DDoSing.</p>
<p>You can modify that script to add on to the .htaccess to deny the attacking IP&#8230;.. ie:</p>
<h3>PHP</h3>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.htaccess&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/*append the file*/</span><br />
<span style="color: #000088;">$write</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;deny from &quot;</span> &nbsp;<span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Open the file for appendage, write &#8220;deny from xxx.xxx.xxx.xxx&#8221;, add a new line, close/save file.</p>
<p class="blocknumber"><span class="bignumber">02</span>There is a a better way to block proxy servers, using <abbr title="Hypertext Access">.htaccess</abbr></p>
<div class="bubble4">
<div>
<div>
<div>
<div>
<div><strong>Rather than attempt to block proxy servers by who they are (i.e., via their specified domain identity), it is far more expedient and effective to block proxy servers by what they do. By simply blacklisting the various HTTP protocols employed by proxy servers, it is possible to block virtually all proxy connections. Here is the code that I use for stopping 99% of the proxies that attempt to access certain sites:</strong>
</div>
</div>
</div>
</div>
</div>
<p><span><strong>.htaccess code below:</strong></span>.</p>
</div>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">RewriteEngine on<br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>VIA<span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">!</span>^$ <span style="color: #009900;">&#91;</span>OR<span style="color: #009900;">&#93;</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>FORWARDED<span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">!</span>^$ <span style="color: #009900;">&#91;</span>OR<span style="color: #009900;">&#93;</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>USERAGENT_VIA<span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp; <span style="color: #339933;">!</span>^$ <span style="color: #009900;">&#91;</span>OR<span style="color: #009900;">&#93;</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>X_FORWARDED_FOR<span style="color: #009900;">&#125;</span> &nbsp; &nbsp; <span style="color: #339933;">!</span>^$ <span style="color: #009900;">&#91;</span>OR<span style="color: #009900;">&#93;</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>PROXY_CONNECTION<span style="color: #009900;">&#125;</span> &nbsp; &nbsp;<span style="color: #339933;">!</span>^$ <span style="color: #009900;">&#91;</span>OR<span style="color: #009900;">&#93;</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>XPROXY_CONNECTION<span style="color: #009900;">&#125;</span> &nbsp; <span style="color: #339933;">!</span>^$ <span style="color: #009900;">&#91;</span>OR<span style="color: #009900;">&#93;</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>HTTP_PC_REMOTE_ADDR<span style="color: #009900;">&#125;</span> <span style="color: #339933;">!</span>^$ <span style="color: #009900;">&#91;</span>OR<span style="color: #009900;">&#93;</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP<span style="color: #339933;">:</span>HTTP_CLIENT_IP<span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp;<span style="color: #339933;">!</span>^$<br />
RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$ <span style="color: #339933;">-</span> <span style="color: #009900;">&#91;</span>F<span style="color: #009900;">&#93;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/51-security-blocking-proxies-tutorial-_simple-ddos-protection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

