Mobile Banking Sicherheit – Interview DRS1 Espresso

Als Vorstandsmitglied von ISSS bin ich zum Thema Mobile Banking befragt worden. Das ist ein Thema, mit dem ich mich zurzeit stark beschäftige, auch weil ich kürzlich Mobile Phones forensisch untersucht habe und sich die Compass Security stark mit iPhone Trojanern, API-Hooking und Keyloggern beschäftigt.

Grundsätzlich bin ich der Meinung, dass aktuell (18.5.2012) die Nutzung von E-Banking über das iPhone oder iPhone App sicherer ist als die Nutzung über einen gewöhlichen Heim-PC. Zurzeit erachte ich Android basierte Smartphones jedoch als unsicher. Dies und weitere Aspekte, wurden von DRS1 Redaktor Matthias Schmid im Espresso Interview zusammengefasst.
Der Beitrag wurde am Mittwoch 16.5.2012 um 08:20 publiziert:
http://www.drs1.ch/www/de/drs1/sendungen/espresso/2649.bt10224641.html

Have a safe day
Ivan Bütler

 

Ein Nachmittag beim TVO

Nicht selten werden wir bei Compass von den Medien angefragt, zu dem einen oder anderen, aktuellen Sicherheitsthema Stellung zu nehmen. Meistens springen da unsere Profis, Ivan Bütler und Walter Sprenger, ein, die schon auf eine beachtliche TV-Erfahrung zurückblicken können.

Die Fügung wollte es, das es nun mich traf: Der Ostschweizer Sender “TVO” lud mich als Security Analysten der Compass ein, um das gehackte Facebook-Profil Aladin Abdijis zu kommentieren. Nach einem kurzen Telefongespräch mit der verantwortlichen Redakteurin machte ich mich auf den Weg ins Studio nach St. Gallen. Dort angekommen outete ich mich nicht ganz uneigennützig als blutiger Anfänger, um so direkt in den Genuss des Rookie-Bonus’ zu kommen, was mir auch sichtlich gelang. Schliesslich wurde mir das komplette Vorgehen einer Fernseh-Aufzeichnung inklusive Rundgang im Regieraum geduldig gewährt.

In einem kurzen Vorgespräch erklärte mir die versammelte TV-Mann- resp. Frauschaft (Stylistin, Moderatorin, Regieassistentin und Redakteurin) den Ablauf der Sendung. Wir gingen die Interview-Fragen und meine Antwort-Ideen durch und waren uns schnell einig, was ich wie sagen könne. Die Idee, Passwörter anhand persönlicher Lieblings-Zitate zu bilden, indem man die Anfangsbuchstaben der einzelnen Wörter zusammenhängt, kam besonders gut an und der inspirierte Blick Frau Eggenbergers, der Moderatorin, verriet, dass sie schon eine Idee zu haben schien, wie sie ihr neues Passwort gestalten wollte.

Noch während des Gesprächs wurde ich direkt auf den hell umleuchteten Schminksessel gebeten. Mit der Stylistin versuchte ich für die Menschheit endgültig zu klären, warum Männer im Vergleich zu Frauen grundsätzlich nur ein Zehntel der Zeit vor dem Spiegel brauchen: “Männer sind einfach naturschön.”

Mit dieser Meinung zufrieden ging es dann gestylt ins Studio, einem nicht sehr grossen, hellen Raum, dessen zentrales Design-Element die dunkelbraune Moderatoren-Theke ist. Ich war sichtlich erstaunt, dass ich mich auf einen Sockel zu stellen hatte, denn als Zwerg kam ich mir bisher nicht vor. Versöhnlich war es, dass Frau Eggenberger auch einen bekam. Die Kameraleute wirbelten im Studio herum und machten die letzten Einstellungen. Wir gingen nochmals kurz den Ablauf durch, ich durfte meine Kehle noch bewässern und dann ging es auch schon los. Der Einspieler lief und die letzten Sekunden wurden automatisch als Countdown akustisch angesagt: zehn, neun, acht … zwei, eins.

Das Ergebnis sehen Sie selbst.

Stephan Rickauer
Compass Security AG

OWASP 2012 Online Competition

Learning by Doing! We are proud to run the OWASP 2012 Online Competition with Hacking-Lab. The event is free for everyone, why not participating this educational program?

The winner will get a free ticket to one large OWASP conference. The winners choice are:

  1. AppSec US
  2. AppSec EU
  3. AppSec Latin America

We encourage readers of this blog to take the chance. There is nothing to loose, only to win.  See more details here:

https://www.hacking-lab.com/events/owasp-2012-online-competition.html

Ivan Bütler,
E1

 

Exploit credentials stored in Windows Group Policy Preferences

Group Policy preferences are a new feature set available since Windows Server 2008, which shouldn’t be confused with the well known Group Policy objects (GPOs) dating back to Windows NT. The main idea behind the creation of Group Policy preferences is the ability to push so-called “unmanaged” settings. Compared to “managed” GPOs, group policy preferences can be altered by the end user and aren’t enforced on a regular basis.

Before the release of the Group Policy feature, administrators could already set user preferences via scripts or .reg files. This lead to complex login scripts potentially containing sensitive information. Using Group Policy features, you can now manage this kind of settings centrally and in a convenient way.

While this addition was released with Windows 2008 Server, you can install the client-side extensions on client computers running on Vista, Windows XP SP2 or Windows 2003 SP1 for backward compatibility with all your workstations.

Let’s see an example on how we can define a local user on some workstations. It starts with the creation and edition of a group policy object:

In the Group Policy Management Editor, we still see our well-known Policies folder, but also a new hierarchy for these unmanaged preferences. Creating a local administrator on the machines targeted by the GPO “GPO_local_accounts” is only a matter of clicks:

Where is this setting stored and how secure is it? Group Policy Preferences are stored, as all other GPOs, within the SYSVOL folder on the domain controllers (%LOGONSERVER%\SYSVOL) but within xml files.

The above created policy gets translated into the following groups.xml file:

<?xml version="1.0" encoding="utf-8"?>
  <Groups clsid="{3125E937-EB16-4b4c-9934-544FC6D24D26}">
    <User clsid="{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}"
     name="ladmin_gpo" image="0" changed="2012-02-03 07:10:48"
     uid="{FE47E73C-7525-46CD-B2E0-F68D3022EDCE}">
      <Properties action="C" fullName="Local admin created by GPO"
       description=""
       cpassword="9QHhFTUdm6rDgu30J7ShZfqt07T6vOUGkyAFG3G7M+5AotJjkOva7E9KSAcamdrruTgly0O/uVTB/UUdLNU4775b5381hyuUzkd4lJW+llcNNNrQlYu7zqH3/i+8jfjhUq9lqPn8VjCtb9iaEqWbKQ"
       changeLogon="0" noChange="0" neverExpires="0"
       acctDisabled="0" userName="ladmin_gpo"/>
    </User>
    <Group clsid="{6D4A79E4-529C-4481-ABD0-F5BD7EA93BA7}"
     name="Administrators (built-in)" image="2"
     changed="2012-02-06 10:45:50"
     uid="{4D0CE71D-D2E4-42B1-9BF3-147C910A15F1}">
      <Properties action="U" newName="" description=""
       deleteAllUsers="0" userAction="ADD" deleteAllGroups="0"
       removeAccounts="0" groupSid="S-1-5-32-544"
       groupName="Administrators (built-in)">
        <Members>
          <Member name="ladmin_gpo" action="ADD" sid=""/>
        </Members>
      </Properties>
    </Group>
  </Groups>

So how secure is my password, stored within the cpassword attribute? According to the documentation, it’s using AES-256 – so pretty secure, isn’t it?

Well, not exactly, as the key is public and documented in the MSDN. All you need to do is open CrypTool, add some padding to the value to be base64 compliant, and perform a base64 decoding:

Choose then the AES decryption option (Analysis – Symmetric Encryption (modern) – Rijndael (AES) and paste the public key:

That’s it, the password is decrypted without any brute-force attack:

As conclusion, while Group Policy preferences are a great tool to distribute unmanaged settings, it should not be used to push down features containing credentials such as:

  • User preferences
  • Database connections strings
  • Scheduled tasks
  • Mapped drives settings
  • Service preferences

References

 

March Hacking-Lab News 2012

What’s new with Hacking-Lab?

1) New LiveCD
Please note, we have uploaded the new Hacking-Lab LiveCD v5.83 to
* http://media.hacking-lab.com/largefiles/livecd/

2) New Video Tutorial
Watch this short tutorial and learn how to use multiple firefox profiles with your new LiveCD
* http://media.hacking-lab.com/movies/multiple-firefox-browsers/

3) OWASP AppSec EU
OWASP rocks!!! Join the University Challenge in Athens this year and test your security skills in the University Challenge discipline provided by Hacking-Lab.
* http://www.appsecresearch.org

4) Hacking-Lab Magazine
The first release 0×01 will be released within the next 7 days!!! Register a Hacking-Lab account and make sure you receive a copy.

5) IRC service in vulnerable server network
Since a couple of days, we have an IRC service up and running within the vulnerable server network. Please join #hackinglab once you are vpn connected. (chat.hacking-lab.com)
* TUTORIAL VIDEO HERE: http://media.hacking-lab.com/movies/chat/

That’s it. Have a safe day
Ivan Buetler

 

Next Beer-Talk in June 7th, 2012

Hi all,

Don’t miss our tech/geek research talk series; mark the next Beer-Talk that will be held next June 7th, 2012 in Jona Switzerland in your agenda. As we have multiple research topics you can choose, please mark your favorite in the survey below:

Surveyhttp://www.csnc.ch/de/calendar/NextBeerTalk/

Did you miss the last Beer-Talk about Advanced Web Security by Philipp Oesch? Don’t worry; get the PDF from here: FileBox DownloadLink

Do you feel like gambling/testing with the Apache Struts2 vulnerability by yourself? Join the free Hacking-Lab event here: Hacking Challenge in Hacking-Lab

Watch this Apache Struts2 intro movie, to get familiar with the shown issue
* http://media.hacking-lab.com/movies/struts2/

Take Care
Ivan Buetler
ivan.buetler@csnc.ch

 

OWASP Apache Struts2 Security Challenge in Hacking-Lab

Hi all,

As you might know, Hacking-Lab is providing free OWASP TOP 10 hands-on challenges to the OWASP community. This is an inner service of GEC (Global Education Commitee) and as part of the Academy Portal project.

Vulnerabilities within used frameworks and libraries, like the Apache Struts vulnerability do not have a prominent place with the OWASP TOP 10 list, but very important because of it’s remote code execution characteristic. Hacking-Lab has written a vulnerable Apache Struts service and a tutorial video. Check it out.

I think it is important to discuss library and dependency risks.

Please watch the tutorial here:
* http://media.hacking-lab.com/movies/struts2/

Please read more about the Apache vulnerability here
* http://struts.apache.org/2.x/docs/s2-009.html

Please try it our, mess around in Hacking-Lab (if you like, it’s free!)
* https://www.hacking-lab.com/events/registerform.html?eventid=199

Looking forward to hearing from you
Ivan Buetler, Switzerland

Reversing in God Mode

Fridays, I was approaching a win32 reversing challenge. So I transferred the binary into my Windows XP virtual box and fired-up OllyDbg. The goal was to bypass the username and password prompt that occurred on application startup. Hilariously, I was just providing a dummy name and password to the app…. “asdf” “asdf” as probably most penetration testers have done so, over and over to test logon prompt behavior.

BANG… the app is telling me: “Correct, le clef est Le saucisson vaudois ca rapicole.!”

The force was with me and actually, only Chuck Norris could have topped that :) . Was I in god mode? Probably not. Later analysis just revealed that the application required the password to be equal to the username and had some minimal restrictions on the credentials length.

All in all, a 30 seconds exercise.

Lessons learned:
– Implement strong password policies
– Give it a try before you hurry to launch Olly.

JBoss 7.1 Web Server Hardening

JBoss is a popular open-source Java application server which underwent a major rewrite of its code-base for its latest version 7.x. Of this new branch, only version 7.1.0.Final, released a week ago, is certified for the Java EE 6 Full Profile.

As part of the code rewrite, the configuration settings also got a global overhaul. The settings are now mostly regrouped per mode (standalone or domain) and profile (default, full, ha and full-ha – e.g. standalone/standalone-full.xml).

The default settings for the web server component look as follow:

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.1">
[CUT BY COMPASS]
  <profile>
  [CUT BY COMPASS]
    <subsystem xmlns="urn:jboss:domain:web:1.1"
     default-virtual-server="default-host" native="false">
    <connector name="http" protocol="HTTP/1.1" scheme="http"
     socket-binding="http" />
    <virtual-server name="default-host"
     enable-welcome-root="true">
      <alias name="localhost" />
      <alias name="example.com" />
    </virtual-server>
  </subsystem>
  [CUT BY COMPASS]

Several hardening steps can be performed, such as:

  • Enabling only HTTPS and disabling HTTP
  • Disabling the display of source fragment
  • Removing the x-powered-by http header
  • Disabling the default JBoss 7 welcome pages

The following hardened configuration is therefore a good start for the web server component:

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.1">
[CUT BY COMPASS]
  <profile>
  [CUT BY COMPASS]
    <subsystem xmlns="urn:jboss:domain:web:1.1"
     default-virtual-server="default-host" native="false">
    <connector name="http" protocol="HTTP/1.1" scheme="http"
     socket-binding="http"
     enabled="false"/>
    <configuration>
      <jsp-configuration
       display-source-fragment="false"
       x-powered-by="false"/>
    </configuration>
    <connector
     name="https"
     protocol="HTTP/1.1"
     socket-binding="https"
     scheme="https"
     secure="true">
      <ssl
       name="ssl"
       protocol="TLSv1"
       password="[CUT BY COMPASS]"
       verify-client="false"
       cipher-suite="HIGH"
       certificate-key-file="${user.home}/.keystore"
       ca-certificate-file="${user.home}/.trustedstore"/>
    </connector>
    <virtual-server name="default-host"
     enable-welcome-root="false">
      <alias name="localhost" />
      <!-- COMMENT THIS SECTION TO DISABLE IT
      <alias name="example.com" />
      -->
    </virtual-server>
  </subsystem>
  [CUT BY COMPASS]

Documentation relating to these settings can either be found in the XML schema files located in docs/schema/*.xsd or in the online documentation (e.g. about the jsp-configuration element).

Nächster Compass BeerTalk am Donnerstag 01.03.2012

Am 1. März 2012 ist es wieder so weit, wir führen den ersten BeerTalk im Jahr 2012 zum Thema Advanced Web Security durch.

Das weit verbreitete Struts Framework war im letzten halben Jahr immer wieder auf Remote Code Execution verwundbar, was Angreifern erlaubte, ganze Systeme zu kompromittieren. Philipp Oesch, Leiter Software Entwicklung bei der Compass Security, hat diese Schwachstellen untersucht und wird am BeerTalk vom 1. März zwei Live Hacking Demos durchführen. Dabei wird ein Applikations- und Datenbank-Server komplett übernommen.

Interessant zu wissen, dieser Angriff funktioniert noch immer bei vielen Anwendungen – Konkret, bei allen Struts 2 Anwendungen die seit dem 22.01.2012 noch nicht gepatcht wurden!

Inhalt des BeerTalks:

  • Aufzeigen von Bedrohungen in komplexen & heterogenen Infrastrukturen
  • Welche neuen Security Herausforderungen stellen sich für die Entwickler?
  • Welche Risiken werden oft vergessen?
  • Neue HTTP Headers
  • Welche Risiken bringen OpenSource und Frameworks (Struts, JSF, Spring, ..) mit sich?
  • Welche Massnahmen können getroffen werden um das Risiko einzudämmen?

1. Live Hacking Demonstration:

  • Übernahme eines Applikations-Servers durch eine Remote Code Execution Vulnerability
  • Der Angriff funktioniert bei allen Struts 2 Anwendungen die seit  dem 22.1.2012 nicht gepatched wurden (Struts 2.0.0 – Struts 2.3.1.1)!

2. Live Hacking Demonstration:

  • Übernahme eines Datenbank-Servers durch eine kombinierte Web-Attacke (XXE & MySQL UDF), inklusive Reverse Shell
  • Die Demo zeigt Step-by-Step wie ein Angreifer vorgeht um eine Reverse Shell zu erhalten

Kommen Sie vorbei, geniessen Sie den Vortrag und anschliessend ein Steak oder eine Wurst vom Grill mit einem kühlen Bier!

Wir freuen uns auf Ihre Anmeldung bis zum 29. Februar.