<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>CyberiaPC.com Most Recent Posts</title>
	<description>Most recent posts from our community forums</description>
	<link>http://cyberiapc.com/forums/index.php</link>
	<pubDate>Mon,  6 Jul 2009 11:44:30 -0500</pubDate>
	<ttl>60</ttl>
	<image>
		<title>CyberiaPC.com Most Recent Posts</title>
		<url />
		<link>http://cyberiapc.com/forums/index.php</link>
	</image>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/cyberiapc_community" type="application/rss+xml" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Preventing semantic URL attacks in Web applications</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11298</link>
		<description><![CDATA[<b>The problem</b><br /><br />A semantic URL attack is a type of security exploit that takes advantage of the fact that a web browser cannot infer any semantics from an HTTP request.  Take the following URL for example:<br /><br /><a href="http://www.mywebapplication.com/viewPaymentDetails?receiptId=7892" target="_blank">http://www.mywebapplication.com/viewPaymen...?receiptId=7892</a><br /><br />Let us assume that when the URL is processed, the specified receiptId is used to query some receipts table and then display its details to the user (1).  Now, what would stop someone from simply changing the value of receiptId and retrieving the details of someone else&#8217;s receipt?  Surely that shouldn&#8217;t happen.  But, it can and it does.  The browser does not care at all about the request&#8217;s semantics, so it ends up blindly trusting it and therein lies the vulnerability.<br /><br />The example above would allow an attacker to retrieve and display arbitrary details, but realize that the issue can be much more serious than that when an application depends on parameters passed in through an HTTP request to do, say, branching or updates to or deletes from tables, which is why there is a whole other discussion about the importance of always assuming that user input is unsafe to begin with and the need to sanitize/validate/filter it before anything is done with it.<br /><br /><b>A solution</b><br /><br />Our solution should be two-fold:<br /><br />   1. Ensure that requests that are only sent from our application&#8217;s forms are checked and confirmed to have come from our forms<br />   2. Ensure that requests that are sent via hyperlink-clicks, which contain parameters, are checked and deemed permissible for the logged-in user to access<br /><br />Tokens, tokens, tokens<br /><br />Our problem is that our browser has no way of knowing if a request is being 1) formed and sent by our application&#8217;s forms, or 2) arbitrarily by the user.  Our solution should therefore involve providing extra information to allow the application to differentiate between the two types of requests.  One solution is to use tokens, which is simply a metaphor that involves generating random and unique numbers to pair users to requests.  Here is how it works:<br /><br />In every page where we have a form, we generate a unique and random number (a token) and then<br />    * Set it to the session, and<br />    * Add it as a hidden input field to the page containing the form<br /><br />Then, in the server-side class that takes care of processing the form (Action class, form handler, etc), simply check to make sure that the value of the token that is set to the session is equal to the value of the token that was sent in the HTTP request (the hidden field).  If so, then we can consider the token to be valid; if not, we can take an alternative course of action such as logging the user out.  Finally, we reset the token.<br /><br />Since the token is regenerated every time the page that includes the form loads and is reset both in the session and in the HTML page&#8217;s source, we can always be sure that the user will not be able to proceed if he or she directly accesses a URL, modified or not, without arriving at it through a form since no token will be set in the HTTP request and the token in the session may possibly have expired.<br /><br /><b>For your eyes only</b><br /><br />Our second issue exists if we, say, have a table of receipts for a particular user with each receipt number linked to a URL similar to the one shown above.  On submission, we need to make sure that our request handler verifies that the receipt number passed to it is in fact a receipt number that belongs to the logged-in user as identified by his credentials in the session.  Therefore, what we need to do is to add logic to query the database every single time an HTTP request is received and prior to its parameters being used for anything to ensure that the logged-in user has the necessary privileges to access the parameters.<br /><br />Encrypting URLs or individual parameters may also be an option, albeit it remains a limited one.  Using algorithms that allow for two-way encryption/decryption may leave the application vulnerable in the case that the encryption/decryption algorithm and possibly the salt is figured out by an attacker.  And encryption-only algorithms are only useful if the application knows what set of values a particular parameter is a subset of, meaning that if we&#8217;re going to encrypt a parameter using something like, say, MD5, we need to have a fairly small set of values to encrypt on the server-side to compare hashes and know when we have a match.<br /><br /><b>Code</b><br /><br />Instead of rewriting code that others have already written, I&#8217;ll point you to two places where you can find sample code listings of how to implement tokens in Struts and PHP.  For the former, check out Romain Guay&#8217;s article <a href="http://www.javaworld.com/javatips/jw-javatip136.html?page=1" target="_blank">here</a> and for the latter, check out the section titled Safeguarding Against CSRF in Chris Shiflett&#8217;s article <a href="http://shiflett.org/articles/foiling-cross-site-attacks" target="_blank">here</a>.  I would strongly recommend reading Chris&#8217; blog posts and book (referenced below) for succinct and clear descriptions of security issues to look out for in Web applications along with the best practices for mitigating them.<br /><br />For completeness, note that to check the validity of a token in PHP in your form handler, a simple guard such as the following would suffice:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if&#40;isset&#40;$_SESSION&#91;'token'&#93;&#41; && $_POST&#91;'token'&#93; == $_SESSION&#91;'token'&#93;&#41; {<br />&nbsp;&nbsp; //token is valid<br />}<!--c2--></div><!--ec2--><br /><br /><b>Footnotes and references</b><br /><br />(1) The URL need not be available as such in the application; it may in fact be the case that &#8220;receiptId&#8221; is sent via a POST request from a form to viewReceipts.do, but by simply viewing the source code, an attacker could construct such a URL and either execute it directly or conceal it in an image by setting it to the image&#8217;s src attribute.  In Java or PHP, HttpServletRequest and $_REQUEST, respectively, return parameters regardless of whether they were submitted via POST or GET.  Also note that although using POST instead of GET, the latter of which rewrites the URL, to transfer parameters may give the impression of added security since parameters are not visible in the URL, one should keep in mind that it is only slightly more inconvenient to view or modify POST variables by using applications such as Fiddler.  Nevertheless, it is always best to use POST for forms that perform actions other than simple retrievals of data as per RFC 2616 [Shiflett].<br /><br />[Shiflett] Chris Shiflett, Essential PHP Security, O&#8217;Reilly, 2006<br /><br />A. A. June 2009]]></description>
		<starter>usr.c</starter>
		<poster>usr.c</poster>
		<pubDate>Thu,  2 Jul 2009 07:41:39 -0500</pubDate>
		<lastPostDate>Thu,  2 Jul 2009 07:41:39 -0500</lastPostDate>
		<guid isPermaLink="false">11298</guid>
	</item>
	<item>
		<title>Goal.com logo competition</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11297</link>
		<description><![CDATA[&lt;spam&gt;<br />Goal.com had a logo competition a while ago and my brother and I submitted an entry, which made it through to the final selection.  So, guys, if you get a chance, head over there and vote for us: <a href="http://www.goal.com/en/contests/logo" target="_blank">http://www.goal.com/en/contests/logo</a> <img src="http://cyberiapc.com/forums/style_emoticons/default/original.gif" style="vertical-align:middle" emoid=":)" border="0" alt="original.gif" /><br /><br />The entry number is It's called <b>Logo 012 (submitted by skyrill)</b>.  Thanks.<br />&lt;/spam&gt;<br /><br /><img src="http://www.skyrill.com/portfolio/identity/goal/1.jpg" border="0" class="linked-image" />]]></description>
		<starter>usr.c</starter>
		<poster>usr.c</poster>
		<pubDate>Thu,  2 Jul 2009 06:58:27 -0500</pubDate>
		<lastPostDate>Thu,  2 Jul 2009 06:58:27 -0500</lastPostDate>
		<guid isPermaLink="false">11297</guid>
	</item>
	<item>
		<title>PS3 Stuff</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11295</link>
		<description><![CDATA[So,<br /><br />I has this PS3 thing right? Been kinda engulfed in Ghostbusters, Prototype & Infamous lately. But found somethin neat. I downloaded Final Fantasy 7 lol<br /><br />Whats really cool is that it makes a virtual playstation memory card; so you can get on your computer; download saved states or restore yours from your old memory card ( i did this, **** gettin that golden chocobo again just to not havta walk to my living room to use the playstation one lol) and go.<br /><br />Thought it was kinda neat.<br /><br /><br />But whats really killer is that playstation is working on a software update for the PS3. <br /><br />It's an emulation software that would make ANY model of the PS3 backwards compatible.<br /><br />The only bummer of that awesomeness is: its speculation. they could just be making the update to be able to port all their games a lot easier into the sony store. So you'd still havta rebuy games to play em on the ps3 which is kinda crappy.<br /><br /><br />So thats why I have always stuck with nintendo lol]]></description>
		<starter>Mario</starter>
		<poster>Mario</poster>
		<pubDate>Tue, 30 Jun 2009 21:27:03 -0500</pubDate>
		<lastPostDate>Tue, 30 Jun 2009 21:27:03 -0500</lastPostDate>
		<guid isPermaLink="false">11295</guid>
	</item>
	<item>
		<title>Question Regarding our Guess This Game..</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11291</link>
		<description><![CDATA[So, would we like to continue this?<br /><br />I was looking at it. DAMN. I fail. <img src="http://cyberiapc.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /><br /><br /><br />So, here's my initial idea (as in reboot the damn site!):<br /><br />We start it over again. Kick it into gear. I don't have the DB i created by all means anymore, but I can wing it. <br /><br />We can start anew. New rules, perhaps unremitting the 8bit crowd. I may not be the most fanatic gamer into the new area's but I can still recognize games pretty easily and still can find shots and info's at will (I have A LOT of free time and a shitty pc lol).<br /><br />Set the scores to 0, set the limit to somethin cool. Do a mass email to all those old members.. put a big flashy thing on the news..<br /><br />COME ON!!<br /><br />just a thought..]]></description>
		<starter>Mario</starter>
		<poster>Mario</poster>
		<pubDate>Tue, 30 Jun 2009 01:20:13 -0500</pubDate>
		<lastPostDate>Tue, 30 Jun 2009 01:20:13 -0500</lastPostDate>
		<guid isPermaLink="false">11291</guid>
	</item>
	<item>
		<title>Billy Mays RIP</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11288</link>
		<description><![CDATA[<img src="http://www.ctrlaltdel-online.com/comics/20090629.jpg" border="0" class="linked-image" /><br /><br /><br /><br />*wearing a blue shirt all week*]]></description>
		<starter>Mario</starter>
		<poster>MaD_cOw</poster>
		<pubDate>Tue, 30 Jun 2009 01:03:17 -0500</pubDate>
		<lastPostDate>Sat,  4 Jul 2009 11:39:29 -0500</lastPostDate>
		<guid isPermaLink="false">11288</guid>
	</item>
	<item>
		<title><![CDATA[Man kills soldier in Vietnam, returns photo to his daughter [Video]]]></title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11281</link>
		<description><![CDATA[<a href="http://www.youtube.com/watch?v=CWMM7fclV9k" target="_blank">http://www.youtube.com/watch?v=CWMM7fclV9k</a><br /><br />Pretty moving video of a man who killed a Vietnamese soldier during the Vietnam War, took a photo of him and his daughter from him and then went back to give the photo to the daughter of the man he killed many decades later.]]></description>
		<starter>usr.c</starter>
		<poster>usr.c</poster>
		<pubDate>Sun, 28 Jun 2009 22:22:13 -0500</pubDate>
		<lastPostDate>Sun, 28 Jun 2009 22:22:13 -0500</lastPostDate>
		<guid isPermaLink="false">11281</guid>
	</item>
	<item>
		<title>Asus Eee, and Netbooks in general</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11280</link>
		<description><![CDATA[I might be going on vacation soon and was thinking of buying an Asus Eee PC and taking it with me this time round instead of my laptop.  I figured it would be better that way considering that the Eee has 10 hours of battery life, is super-light, is cheap, can be used to backup images from my CF cards and won't have any personal data on it in case I end up losing it.  It seems like a good idea.  So, anyone used an Eee or any of the other similar netbooks out there?]]></description>
		<starter>usr.c</starter>
		<poster>MaD_cOw</poster>
		<pubDate>Sun, 28 Jun 2009 22:14:12 -0500</pubDate>
		<lastPostDate>Sat,  4 Jul 2009 11:42:41 -0500</lastPostDate>
		<guid isPermaLink="false">11280</guid>
	</item>
	<item>
		<title>CyberiaPC.com user on crack</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11275</link>
		<description><![CDATA[<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><b>Apr 20</b><br />Name: mspence<br />Email: mspence@suddenlink.net<br />Subject: LUNAR COMMAND<br />Message: YOU'RE GOING TO LET ME PLAY THIS ****ING GAME LIKE YOU'RE SUPPOSED TO WHETHER YOU LIKE IT OR NOT.<br />recaptcha_response_field: gaudily Pa<br /><br /><br /><b>Apr 29</b><br />Name: mspence<br />Email: ***<br />Subject: LUNAR COMMAND<br />Message: IM TALKING TO YOU<br /><br />WAKE THE F**K UP OVER THERE<br />recaptcha_response_field: commission attune<br /><br /><br /><b>Apr 30</b><br />Name: mspence<br />Email: ***<br />Subject: LUNAR COMMAND GODAMMIT<br />Message: HOW MANY TIMES DO I HAVE TO TELL YOU PEOPLE TO WAKE THE F**K UP OVER THERE?<br />recaptcha_response_field: squander temp-<br /><br /><br /><b>Apr 30</b><br />Name: mspence<br />Email: ***<br />Subject: LUNAR COMMAND GODAMMIT<br /><br />Message: KISS MY ASS<br /><br />WAKE THE F**K UP OVER THERE JACKASSES<br />recaptcha_response_field: do dallies<br /><br /><br /><b>May 1</b><br />Name: mspence<br />Email: ***<br />Subject: LUNAR COMMAND FIX THE ****ING GAME<br />Message: YOU'RE GOING TO LET ME PLAY THIS F**KING GAME LIKE YOU'RE SUPPOSED TO WHETHER YOU LIKE IT OR NOT<br /><br />F**K YOU DO WHAT YOU'RE TOLD<br />recaptcha_response_field: Powers polaris<br /><br /><br /><b>May 6</b><br />Name: mspence<br />Email: ***<br />Subject: LUNAR COMMAND MOTHERF**KERS<br />Message: I DONT CARE WHAT YOUR ****ING PROBLEM IS. WAKE THE F**K UP OVER THERE ASSHOLES.<br />recaptcha_response_field: raunchy con<br /><br /><br /><b>June 4</b><br />Name: mspence<br />Email: ***<br />Subject: Lunar Command<br />Message: F**K YOU WAKE UP<br />recaptcha_response_field: Ascension neutered<br /><br /><br /><b>June 15 (3 days ago)</b><br />Name: mspence<br />Email: ***<br />Subject: LUNAR COMMAND<br />Message: WAKE THE F**K UP AND LET ME PLAY THIS F**KING GAME WHETHER YOU LIKE IT OR NOT<br />recaptcha_response_field: place dresden<br /><br /><br /><b>3 hours ago</b><br />Name: mspence<br />Email: ***<br />Subject: LUNAR COMMAND<br />Message: F**K YOU<br /><br />I DONT CARE WHAT TIME IT IS<br />recaptcha_response_field: CALDOR unpaid<!--QuoteEnd--></div><!--QuoteEEnd-->]]></description>
		<starter>usr.c</starter>
		<poster>j-rah</poster>
		<pubDate>Thu, 18 Jun 2009 04:41:37 -0500</pubDate>
		<lastPostDate>Sun, 28 Jun 2009 18:00:48 -0500</lastPostDate>
		<guid isPermaLink="false">11275</guid>
	</item>
	<item>
		<title>Announcing your plans makes you less likely to achieve them</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11274</link>
		<description><![CDATA[<a href="http://sivers.org/zipit" target="_blank">http://sivers.org/zipit</a><br /><br />Considering that I'm surrounded by cynics, I've always found it best to actually implement whatever ideas I think of and then later step back and see whether or not they were a good idea to begin with <img src="http://cyberiapc.com/forums/style_emoticons/default/original.gif" style="vertical-align:middle" emoid=":)" border="0" alt="original.gif" />]]></description>
		<starter>usr.c</starter>
		<poster>glitch</poster>
		<pubDate>Wed, 17 Jun 2009 06:07:30 -0500</pubDate>
		<lastPostDate>Sat, 20 Jun 2009 12:06:18 -0500</lastPostDate>
		<guid isPermaLink="false">11274</guid>
	</item>
	<item>
		<title>Tagged: The most annoying website in the world</title>
		<link>http://cyberiapc.com/forums/index.php?showtopic=11272</link>
		<description><![CDATA[God, I hate that website...<br /><br /><a href="http://www.time.com/time/business/article/0,8599,1903810,00.html" target="_blank">http://www.time.com/time/business/article/...1903810,00.html</a>]]></description>
		<starter>usr.c</starter>
		<poster>amir</poster>
		<pubDate>Sat, 13 Jun 2009 13:31:46 -0500</pubDate>
		<lastPostDate>Sun, 14 Jun 2009 16:35:35 -0500</lastPostDate>
		<guid isPermaLink="false">11272</guid>
	</item>
</channel>
</rss>
