sat0ri RCE challenge/crackme – one/two

Posted: 8th January 2012 by sharpe in Challenges
Tags:

I just added challenges one & two, as I’ve had a few requests for these. Additionally, I have included the solutions for them as a separate download just to help you out, should this be necessary.

The two challenges can be downloaded here: Challenges one and two (21)
MD5 (one-and-two.zip) = 5f916c6459ffe8c4ca318c76bd368665

The solutions can be downloaded here: Solutions for one and two (15)
MD5 (solutions-one-and-two.zip) = 93d9ed441dfe7fc91c638ef06e0d1d47

I have been informed (thanks pot) that the download for challenge four is missing. I no longer have the code for this one, so if anyone is has it, please send it in so I can put it up here. Thanks ;)

As always, if you have any questions or comments, please don’t hesitate to post them in the forum.

Thanks!

Regards,
sharpe.

Share

sat0ri RCE challenge/crackme – eleven

Posted: 1st September 2011 by sharpe in Challenges
Tags: ,

Welcome back and thanks for considering challenge number 11. Inspired by my last challenge, I made this one simpler yet more difficult. More of an effort has gone into the encryption, which now uses 4 rotating DWORD keys instead of 1 static DWORD key. It should be more of a challenge. I removed all garbage code as well, so you can focus of the important stuff.

Here are the guidelines:

  • Find the correct key (used for decryption purposes)
  • Find the secret (look in memory)
  • Post feedback and questions in this challenge’s forum

A screen dump of this challenge:

 

It can be downloaded here: eleven.zip (96).
MD5 (eleven.zip) = 3164e9e986bcbdd759e6ba78714be3dc

Regards,

sharpe.

Share

European Nopsled Team win DEFCON 19 CTF

Posted: 17th August 2011 by sharpe in CTF
Tags: ,

The annual DEFCON Capture The Flag (CTF) competition is over and the winning team has been crowned, Men of 0×90, The European Nopsled Team.

Team members Rasmus Petersen (RP) (right).

European Nopsled Team win DEFCON 19 CTF

European Nopsled Team win DEFCON 19 CTF

Photograph by Sarid Harper, CSIS

What was the best part about winning the DEFCON CTF?
RP: Doing something you love with the awesome guys from the team, partying afterwards with the guys from Hates Irony and VedaGodz.

Prior to quals, how confident was the European Nopsled Team?
RP: With teams like Hates Irony and Routards, we knew the competition was going to be tough, I was secretly hoping for a 3rd place.

What did you do differently this year compared to last year?
RP: We did even more training and tools.

What are you going to do differently next year?
RP: Even more training and even more tools.

Do you have any comments for the organisers of this years CTF?
RP: Great job guys, we had a blast and thanks for listening to us whenever we experienced problems during the contest.

What are your expectations for next year?
RP: Do our very best

Any last minute advice for teams hoping to qualify next year?
RP: Start training

Share

sat0ri RCE challenge/crackme – ten

Posted: 9th August 2011 by sharpe in Challenges
Tags: , ,

OK, here we are again with a new series of challenges, which will start with number 10. This one isn’t that difficult but it requires that you consider new options. I left half of this challenge easy to help you along, so you can solve this one two ways, the tough way and the easier way. Here’s a tip: read all the code, there isn’t much.

Here are the guidelines:

  • Find the number of Nerf darts
  • Find the hash (it’s a number)
  • Generate the valid MD5 like so: MD5(<number of darts>:<valid hash>)
  • Enter the MD5 and press the “Unlock” button to decrypt the code
  • Press the “Go” button to see if you got it right.
  • Verify your hash here: http://blog.sat0ri.com/challenges/ten/verify.php?hash=<your hash value>

OR

  • Decrypt the code (you’re such a brute!)
  • Verify your hash here: http://blog.sat0ri.com/challenges/ten/verify.php?hash=<your hash value>
  • Post feedback and questions in this challenge’s forum

A screen dump of this challenge:

 

It can be downloaded here: ten.zip (112).
MD5 (ten.zip) = c88761b22d92d9a689bf6888cab6cf05

Regards,
sharpe.

Share

Summary

Sarid Harper has discovered a vulnerability in File Expert for Android, which can be exploited by malicious users to gain knowledge of sensitive information.

Input passed to the “path” parameter in “/webapps/file/listing” is not properly sanitised before being used to display files and directories. This can be exploited to list arbitrary directories and files via directory traversal attacks.

Affected Versions

This vulnerability is confirmed in the following versions:

  • The vulnerability is confirmed in versions 3.0.4, 3.0.5, and 3.0.6

Other versions may also be affected.

Screen Dumps

The following screen dump illustrates this issue:

Resolution

Upgrade to the latest version and grant access to trusted users only.

Time-line

  • Vulnerability identified: 09.04.11
  • Vendor informed: 16.04.11
  • Vendor response: 17.04.11
  • Vendor fix: 16.07.11

Credits

Vulnerability identified by Sarid Harper of CSIS Security Group.

References

Share

File Expert File Deletion Vulnerability

Posted: 16th July 2011 by sharpe in Vulnerabilities
Tags:

Summary

Sarid Harper has discovered a vulnerability in File Expert for Android, which can be exploited by malicious users to delete files residing outside the FTP root.

The vulnerability is caused by an error in the way FTP “DELE” requests are handled. This can be exploited to escape the FTP root and delete arbitrary files on the affected system by using the “../” character sequence.

Affected Versions

This vulnerability is confirmed in the following version:

  • The vulnerability is confirmed in version 3.0.4 and 3.0.5.

Other versions may also be affected.

Screen Dumps

The following screen dump illustrates this issue:

Resolution

Upgrade to the latest version and grant access to trusted users only.

Time-line

  • Vulnerability identified: 19.04.11
  • Vendor informed: 19.04.11
  • Vendor response: 19.11.10
  • Vendor fix: 16.06.11

Credits

Vulnerability identified by Sarid Harper of CSIS Security Group.

References

Share

Summary

Sarid Harper has discovered a vulnerability in Outlook, which can be exploited by malicious, anonymous individuals to cause a DoS (Denial of Service).

The vulnerability is caused as a result of the improper handling of email file attachments with no extension. This can be exploited to cause a DoS by tricking a user into clicking on an attachment with no file extension in the reading pane.

Affected Versions

This vulnerability is confirmed in the following version:

  • Microsoft Outlook 2007 (12.0.6539.5000) SP2 MSO (12.0.6545.5004)

Other versions may also be affected.

Screen Dumps

The following screen dumps illustrates this issue:

 

Resolution

Turn off the reading pane.

Time-line

  • Vulnerability identified: 03.09.10
  • Vendor informed: 19.11.10
  • Vendor response: 24.11.10
  • Vendor fix: Currently unavailable

Credits

Vulnerability identified by Sarid Harper of CSIS Security Group.

References

Share

Undocumented machine-specific registers (AMD)

Posted: 15th November 2010 by sharpe in Reverse Code Engineering
Tags:

I was recently turned on to a couple of interesting write-ups regarding some of the secret debugging capabilities (..included firmware-based debugging features that expand greatly over standard, architecturally defined capabilities of x86.) of AMD processors, >= Athlon XP.

For further information, please consult the following articles:

woodmann
CBID

Enjoy!

Share

Summary

A vulnerability has been discovered in Acrobat Reader, which can be exploited by malicious, anonymous individuals to compromise a vulnerable system.

The integer overflow in the CoolType.dll module is caused when parsing the “maxCompositePoints” field value in the TrueType font’s Maximum Profile table (maxp), and can be exploited to corrupt memory via a maliciously constructed PDF file.

Successful exploitation of this vulnerability enables execution of arbitrary code.

Affected Versions

This vulnerability is confirmed in the following versions:

  • Acrobat Reader 9.3.3

Prior versions may also be affected.

Screen Dumps

The following video illustrates this issue:


Resolution

Update to version 9.3.4

  • http://www.adobe.com/support/security/bulletins/apsb10-17.html

Credits

  • Vulnerability identified by Charlie Miller
  • Working exploit by Nicklas Wolff of CSIS Security Group

References

Share

Looking at some of the components present within the %systemroot%\system32 directory can be fun when attempting to identify low-hanging-fruit-vulnerabilities. I made a simple fuzzer that enumerated all executables within a given directory and attempted to execute them with user-defined arguments. A more advanced method also supported by the tool, is to specify the arguments for a given executable in the fuzzer’s configuration file and allow it to run the programme based on the configuration options.

A sample configuration might resemble the following:

<?xml version="1.0" encoding="iso-8859-1"?>
<configuration>
<session>
<top><![CDATA[C:/]]></top>
<denyrules>
<rule><![CDATA[Documents]]></rule>
<rule><![CDATA[Unencrypted]]></rule>
<rule><![CDATA[ie7updates]]></rule>
<rule><![CDATA[Installer]]></rule>
<rule><![CDATA[cmd.exe]]></rule>
</denyrules>
<extensions>
<extension value="exe" />
</extensions>
<!-- Add specific programmes and their arguments below -->
<!-- Arguments with values are followed with a "+" -->
<!-- Arguments that must be present are followed with a "!" -->
<!-- The first byte is the char that is used when giving arguments. -->
<!-- Some will be a forward slash and others a hyphen -->
<programmes enabled="0">
<programme name="C:/path/to/executable.exe" arguments="/l:+;/s:!;" />
</programmes>
</session>
<files>
<output>db.xml</output>
<errors>errors.xml</errors>
</files>
</configuration>

After a few practice, fine-tuning runs, I ran the tool in the %systemroot%\system32 directory and went to make myself a cup of tea. About five or ten minutes later I came back to find the debugger attached to the following 6 processes:

  • mrinfo.exe
  • locator.exe
  • eventvwr.exe
  • netsetup.exe
  • odbcconf.exe
  • sdbinst.exe

what does this mean? Well it means that the tool caused some kind of exception in the programmes to occur. Looking at the debugger, if we have a closer look at the contents of the registers and state of the stack (which was the cause of the exceptions) we can see that the data passed to the programme via the command-line is the culprit here. For the sake of illustration, lets have a look at some screen-dumps of some of the exceptions and the executables in which they occured.

 

If we have a closer look at the vulnerabilities mentioned above, we can see that they are all a result of improper bounds checking when reading command-line arguments. This is quite a common error, not only in the components mentioned above, but also in many other applications, which take arguments/data and/or options via the command-line.

Can this type of vulnerability be exploited to introduce a remote code execution vulnerability? The answer is, some will and some will not. All of the issues presented above, will require that the vulnerable programme is executed with a malicious command-line argument in order to cause any damage, and this is just not a realistic scenario. This could be done by sending a maliciously constructed scripting file to the user and attempting to trick him/her into executing it but again, this is highly unlikely, as scripting files are considered un-safe and will not likely make it to the user, due to restrictions within the software packages (e.g. e-mail and instant messaging clients, etc.) via which the attacker will possibly try to send the malicious scripting file. In other words, there is not vector.

Some of you may be asking how long the vulnerabilities mentioned above have been common knowledge and the answer is, a very long time. Most of these vulnerabilities are well known and date back to as far as 2002 and 2003. The only recent issue is the one identified in the Rpc locator executable, which I reported to Microsoft on the 24th of May 2010. You can expect no fixes for any of these issues as the likelihood of them being exploited is very low due to the previously mentioned, non-existing attack vector.

While fuzzing is fun, it’s just not good enough when attemtping to identify more complex vulnerabilities. Specially crafted payloads required to reach a specific branch of code-execution will require an in-depth analysis of the functionality. This in-depth analysis will enable you to construct just the right composition of data that will ensure your data’s contact with the vulnerable code, and this is when things really start to happen.

For fun, I have written a small PoC, which calls the Rpc locator executable with a long command-line argument. It can be downloaded here: Rpc Locator PoC (314)

Share