SlideShare a Scribd company logo
Arseniy Reutov
Timur Yunusov
Dmitriy Nagibin
Timeline of PHP problems with random numbers


     2008: “mt_srand and not so random numbers” by Stefan
     Esser

     Early 2010: “Abusing weak PRNGs in PHP applications” by
     gat3way

     July 2010: “How I Met Your Girlfriend” by Samy Kamkar

     July 2012: “I Forgot Your Password: Randomness Attacks
     Against PHP” by George Argyros and Aggelos Kiayias

     August 2012: “Random Numbers. Take Two”
PHP Developers: meh, so what?



     Documentation still lacks security warnings
     except for uniqid()

     PHP developers refuse to use external
     crypto providers in GENERATE_SEED

     Seeds in LCG and Mersenne Twister are
     interdependent (if you know one seed you
     will know the other)
PHP Developers: meh, so what?



    Make seeding
    more secure?

    Nope, fix the
    documentation
    instead.*



* didn’t do even this.
What we are going to hack today


       OpenCart 1.5.3.1

       DataLife Engine 9.5

       UMI.CMS 2.8.5.3

       OpenCart 1.5.4.1
Basics (1)


       Apache: mpm-prefork (separate
       processes) or mpm-worker (threads
       within a process)

       PHP: non-thread safe (used with mpm-
       prefork) or thread safe (used with mpm-
       worker)

       Apache+PHP: mod_php (same process on
       keep-alive requests) or CGI/FastCGI
       (different processes on keep-alive
       requests)
Basics (2)


       In a fresh process PHP
       automatically seeds its PRNGs

       Same seed for rand and mt_rand
       (max value 2^32)

       Two different seeds for LCG (max
       value 2^32 each)
OpenCart 1.5.3.1
OpenCart 1.5.3.1


   $code = md5(mt_rand());
   //admin/controller/common/forgotten.
   php

   $this->session->data['token'] =
   md5(mt_rand());
   //admin/controller/common/login.php
OpenCart 1.5.3.1


   Fresh Process Spawning on mpm-prefork Apache

       Initiate a number of keep-alive requests that is >
       MaxSpareServers (10 by default)

       Fill the pool

       Make target request on freshly seeded process
OpenCart 1.5.3.1


       php exploits/opencart/1.5.3.1.php

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_seed.exe” or
       ./tools/php_mt_seed/php_mt_seed <num> on
       obtained random number

       php exploits/opencart/genlinks.php seeds.txt
OpenCart 1.5.3.1
OpenCart 1.5.3.1


       php exploits/opencart/1.5.3.1.php

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_seed.exe” or
       ./tools/php_mt_seed/php_mt_seed <num> on
       obtained random number

       php exploits/opencart/genlinks.php seeds.txt
OpenCart 1.5.3.1


       php exploits/opencart/1.5.3.1.php

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_seed.exe” or
       ./tools/php_mt_seed/php_mt_seed <num> on
       obtained random number

       php exploits/opencart/genlinks.php seeds.txt
OpenCart 1.5.3.1


       php exploits/opencart/1.5.3.1.php

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_seed.exe” or
       ./tools/php_mt_seed/php_mt_seed <num> on
       obtained random number

       php exploits/opencart/genlinks.php seeds.txt
OpenCart 1.5.3.1
OpenCart 1.5.3.1




    GREAT SCOTT! IT WORKED!
DataLife 9.6
DataLife 9.6

   engine/modules/lostpassword.php:
   $salt = "abchefghjkmnpqrstuvwxyz0123456789";
   srand( ( double ) microtime() * 1000000 );
   for($i = 0; $i < 15; $i ++) {
       $rand_lost .= $salt{rand( 0, 33 )};
   }
   $lostid = sha1( md5( $lostname . $lostmail ) . time
   () . $rand_lost )

   engine/modules/pm.php:
   $salt = "abchefghjkmnpqrstuvwxyz";
   $random_key = "";
   for($i = 0; $i < 8; $i ++) {
       $random_key .= $salt{rand( 0, 23 )};
   }
DataLife 9.6


       Log on as test:123456 at http://datalife

       Copy PHPSESSID (View Page Info -> Details ->
       View Cookies)

       Delete cookies, go to
       http://datalife/?do=lostpassword

       Copy PHPSESSID and symbols on captcha

       php exploits/dle/dle.php <PHPSESSID 1>
       <PHPSESSID captcha> <captcha>
DataLife 9.6


       Log on as test:123456 at http://datalife

       Copy PHPSESSID (View Page Info -> Details ->
       View Cookies)

       Delete cookies, go to
       http://datalife/?do=lostpassword

       Copy PHPSESSID and symbols on captcha

       php exploits/dle/dle.php <PHPSESSID 1>
       <PHPSESSID captcha> <captcha>
DataLife 9.6
DataLife 9.6


       Log on as test:123456 at http://datalife

       Copy PHPSESSID (View Page Info -> Details ->
       View Cookies)

       Delete cookies, go to
       http://datalife/?do=lostpassword

       Copy PHPSESSID and symbols on captcha

       php exploits/dle/dle.php <PHPSESSID 1>
       <PHPSESSID captcha> <captcha>
DataLife 9.6


       Log on as test:123456 at http://datalife

       Copy PHPSESSID (View Page Info -> Details ->
       View Cookies)

       Delete cookies, go to
       http://datalife/?do=lostpassword

       Copy PHPSESSID and symbols on captcha

       php exploits/dle/dle.php <PHPSESSID 1>
       <PHPSESSID captcha> <captcha>
DataLife 9.6


       Log on as test:123456 at http://datalife

       Copy PHPSESSID (View Page Info -> Details ->
       View Cookies)

       Delete cookies, go to
       http://datalife/?do=lostpassword

       Copy PHPSESSID and symbols on captcha

       php exploits/dle/dle.php <PHPSESSID 1>
       <PHPSESSID captcha> <captcha>
DataLife 9.6
DataLife 9.6


               GREAT
               SCOTT!
               IT
               WORKED!
UMI.CMS 2.8.5.3
Time Synchronization (ATS)




    Date: T1   T2                     T2-T1=1

Time:               msec=0            msec=0 (!)




msec=0    msec=m1      m2    msec=0     msec=m1    m2


         msec(server) ~ [0;(m2-m1)/2]
UMI.CMS 2.8.5.3


(PHP<5.4) ext/session/session.c:

gettimeofday(&tv, NULL);
...
spprintf(&buf, 0, "%.15s%ld%ld%0.8F",
remote_addr ? remote_addr : "", tv.tv_sec,
(long int)tv.tv_usec,
php_combined_lcg(TSRMLS_C) * 10);
...
return PHP_MD5Update(&md5_context, (unsigned
char *) buf, strlen(buf));
UMI.CMS 2.8.5.3


   PHPSESSID:

   md5(127.0.0.11351346648192088.00206033)

      IP (known)

      timestamp (known)

      microtime0 (need to bruteforce)

      LCG (need to find two seeds)
UMI.CMS 2.8.5.3
   ext/standard/lcg_seed.h:
   static void lcg_seed(TSRMLS_D) {
       struct timeval tv;
       if (gettimeofday(&tv, NULL) == 0) {
           LCG(s1) = tv.tv_sec ^ (tv.tv_usec<<11);
       } else {
           LCG(s1) = 1;
   }
   #ifdef ZTS
       LCG(s2) = (long) tsrm_thread_id();
   #else
       LCG(s2) = (long) getpid();
   #endif
           if (gettimeofday(&tv, NULL) == 0) {
           LCG(s2) ^= (tv.tv_usec<<11);
   }
       LCG(seeded) = 1;
   }
UMI.CMS 2.8.5.3


   LCG seeds:

   S1 = timestamp ^ microtime1 << 11

   S2 = pid ^ microtime2 << 11

      timestamp (known)

      microtime1 (need to bruteforce: microtime1 –
      microtime0 = 1…4)

      pid (need to bruteforce: 1024-32768)

      microtime2 (need to bruteforce: microtime2 -
      microtime1 = 0…3)
UMI.CMS 2.8.5.3


   ext/standard/php_rand.h:

   #ifdef PHP_WIN32

   #define GENERATE_SEED() (((long) (time(0) *
   GetCurrentProcessId())) ^ ((long) (1000000.0 *
   php_combined_lcg(TSRMLS_C))))

   #else

   #define GENERATE_SEED() (((long) (time(0) *
   getpid())) ^ ((long) (1000000.0 *
   php_combined_lcg(TSRMLS_C))))

   #endif
UMI.CMS 2.8.5.3

function getRandomPassword ($length = 12) {
    $avLetters = "$#@^&!1234567890qwertyuiopasd
fghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
    $size = strlen($avLetters);
    $npass = "";
    for($i = 0; $i < $length; $i++) {
        $c = rand(0, $size - 1);
        $npass .= $avLetters[$c];
    }
    return $npass;
}
UMI.CMS 2.8.5.3



    Edit exploits/umi/umi.php, add your login

    php exploits/umi/umi.php [offset=0] [delay1=10000-
    100000] [delay2=10000]

    Run phpsessid_cuda with PHPSESSID, timestamp and
    your ip

    php exploits/umi/pass_gen.php <sec> <pid> <s1>
    <s2>
UMI.CMS 2.8.5.3



    Edit exploits/umi/umi.php, add your login

    php exploits/umi/umi.php [offset=0] [delay1=10000-
    100000] [delay2=10000]

    Run phpsessid_cuda with PHPSESSID, timestamp and
    your ip

    php exploits/umi/pass_gen.php <sec> <pid> <s1>
    <s2>
UMI.CMS 2.8.5.3
UMI.CMS 2.8.5.3



    Edit exploits/umi/umi.php, add your login

    php exploits/umi/umi.php [offset=0] [delay1=10000-
    100000] [delay2=10000]

    Run phpsessid_cuda with PHPSESSID, timestamp and
    your ip

    php exploits/umi/pass_gen.php <sec> <pid> <s1>
    <s2>
PHPSESSID Bruteforcer


      1,170 billion seeds/sec on a single Amazon EC2
      GPU Instance

      Supports multiple GPUs

      Covers the whole search space within 7,5 minutes

      Supports distributed computing based on sockets

      So fast that we don’t need microtime
      synchronization with remote server any more
PHPSESSID Bruteforcer
UMI.CMS 2.8.5.3



    Edit exploits/umi/umi.php, add your login

    php exploits/umi/umi.php [offset=0] [delay1=10000-
    100000] [delay2=10000]

    Run phpsessid_cuda with PHPSESSID, timestamp and
    your ip

    php exploits/umi/pass_gen.php <sec> <pid> <s1>
    <s2>
UMI.CMS 2.8.5.3
UMI.CMS 2.8.5.3




            GREAT SCOTT!
             IT WORKED!
PHDAYS.RU OWNED!!!
OpenCart 1.5.4.1
OpenCart 1.5.4.1


   $code = md5(mt_rand());

   $code = sha1(uniqid(mt_rand(), true));

   //admin/controller/common/forgotten.php

   $this->session->data['token'] =
   md5(mt_rand());
   //admin/controller/common/login.php
OpenCart 1.5.4.1


   Sources of entropy:

       mt_rand() : 92496817

       uniqid() : 1351070918 + 616520 (in hex)

       lcg_value() : 7.41222311

   sha1(924968175087b4c6968487.41222311)
OpenCart 1.5.4.1


   ext/standard/php_rand.h:

   #ifdef PHP_WIN32

   #define GENERATE_SEED() (((long) (time(0) *
   GetCurrentProcessId())) ^ ((long) (1000000.0 *
   php_combined_lcg(TSRMLS_C))))

   #else

   #define GENERATE_SEED() (((long) (time(0) *
   getpid())) ^ ((long) (1000000.0 *
   php_combined_lcg(TSRMLS_C))))

   #endif
OpenCart 1.5.4.1


       Send 3 requests in keep-alive (get token, user
       reset, admin reset)

       Find MT seeds (some collisions are present)

       Bruteforce LCG seeds (also collisions) given MT
       seeds

       Bruteforce our sha1 -> find out proper MT seed,
       LCG seed; also microseconds to start from

       Calculate admin mt_rand(), admin LCG

       Bruteforce microseconds given starting point from
       our sha1 (Request Twins approach)
OpenCart 1.5.4.1


       php exploits/opencart/1.5.4.1.php, get hash in
       local mail

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_rand.exe” to get seeds

       At Amazon run “lcg_sha1.exe” with seeds file,
       timestamp and sha1 hash

       Get back to exploit, specify mt_rand, admin LCG
       and microsecs to start from
OpenCart 1.5.4.1


       php exploits/opencart/1.5.4.1.php, get hash in
       local mail

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_rand.exe” to get seeds

       At Amazon run “lcg_sha1.exe” with seeds file,
       timestamp and sha1 hash

       Get back to exploit, specify mt_rand, admin LCG
       and microsecs to start from
OpenCart 1.5.4.1


       php exploits/opencart/1.5.4.1.php, get hash in
       local mail

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_rand.exe” to get seeds

       At Amazon run “lcg_sha1.exe” with seeds file,
       timestamp and sha1 hash

       Get back to exploit, specify mt_rand, admin LCG
       and microsecs to start from
OpenCart 1.5.4.1


       php exploits/opencart/1.5.4.1.php, get hash in
       local mail

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_rand.exe” to get seeds

       At Amazon run “lcg_sha1.exe” with seeds file,
       timestamp and sha1 hash

       Get back to exploit, specify mt_rand, admin LCG
       and microsecs to start from
LCG via mt_rand Seed Bruteforcer


       Allows to find LCG seeds (some collision are
       present) given mt_rand seed

       GPU-based

       16 billion seeds/sec on a single Amazon EC2 GPU
       Instance

       Covers the whole search space within 1 minute
OpenCart 1.5.4.1
OpenCart 1.5.4.1


       1 0.94821643
       2 9.31809351  mt_srand
       3 1.78501767
       4 5.16258654
       5 7.25796790  User LCG
       6 1.86345598
       7 3.57376950
       8 4.59748062  Admin LCG
       9 1.85684612
       10 2.74482567
OpenCart 1.5.4.1
OpenCart 1.5.4.1
OpenCart 1.5.4.1


       php exploits/opencart/1.5.4.1.php, get hash in
       local mail

       php exploits/opencart/md5crack.php <md5> or
       ./tools/hashcat/hashcat <md5> on obtained
       token

       At Amazon run “mt_rand.exe” to get seeds

       At Amazon run “lcg_sha1.exe” with seeds file,
       timestamp and sha1 hash

       Get back to exploit, specify mt_rand, admin LCG
       and microsecs to start from
OpenCart 1.5.4.1


       Wait a moment…
OpenCart 1.5.4.1 (4)



                       GREAT
                       SCOTT!
                       IT
                       WORKED!
Thanks!

Arseniy Reutov
Timur Yunusov
Dmitriy Nagibin

More Related Content

What's hot

Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧Orange Tsai
 
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
nyccamp
 
Hunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsHunting for security bugs in AEM webapps
Hunting for security bugs in AEM webapps
Mikhail Egorov
 
TakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian CrenshawTakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian CrenshawEC-Council
 
Php psr standard 2014 01-22
Php psr standard 2014 01-22Php psr standard 2014 01-22
Php psr standard 2014 01-22Võ Duy Tuấn
 
Anatomy of PHP Shells
Anatomy of PHP ShellsAnatomy of PHP Shells
Anatomy of PHP Shells
Vedran Krivokuca
 
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside ContainersThree Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Ben Hall
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
Mikhail Egorov
 
Cloud forensics putting the bits back together
Cloud forensics putting the bits back togetherCloud forensics putting the bits back together
Cloud forensics putting the bits back together
Shakacon
 
Waf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptWaf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScript
Denis Kolegov
 
What should a hacker know about WebDav?
What should a hacker know about WebDav?What should a hacker know about WebDav?
What should a hacker know about WebDav?
Mikhail Egorov
 
Bettercap
BettercapBettercap
Web-servers & Application Hacking
Web-servers & Application HackingWeb-servers & Application Hacking
Web-servers & Application Hacking
Raghav Bisht
 
Art of Web Backdoor - Pichaya Morimoto
Art of Web Backdoor - Pichaya MorimotoArt of Web Backdoor - Pichaya Morimoto
Art of Web Backdoor - Pichaya Morimoto
Pichaya Morimoto
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
Ericom Software
 
Google chrome sandbox
Google chrome sandboxGoogle chrome sandbox
Google chrome sandboxNephi Johnson
 
BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing
BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing
BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing
BlueHat Security Conference
 
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
OWASP Russia
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
Roberto Suggi Liverani
 
關於SQL Injection的那些奇技淫巧
關於SQL Injection的那些奇技淫巧關於SQL Injection的那些奇技淫巧
關於SQL Injection的那些奇技淫巧Orange Tsai
 

What's hot (20)

Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧
 
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
 
Hunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsHunting for security bugs in AEM webapps
Hunting for security bugs in AEM webapps
 
TakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian CrenshawTakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian Crenshaw
 
Php psr standard 2014 01-22
Php psr standard 2014 01-22Php psr standard 2014 01-22
Php psr standard 2014 01-22
 
Anatomy of PHP Shells
Anatomy of PHP ShellsAnatomy of PHP Shells
Anatomy of PHP Shells
 
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside ContainersThree Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside Containers
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
 
Cloud forensics putting the bits back together
Cloud forensics putting the bits back togetherCloud forensics putting the bits back together
Cloud forensics putting the bits back together
 
Waf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptWaf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScript
 
What should a hacker know about WebDav?
What should a hacker know about WebDav?What should a hacker know about WebDav?
What should a hacker know about WebDav?
 
Bettercap
BettercapBettercap
Bettercap
 
Web-servers & Application Hacking
Web-servers & Application HackingWeb-servers & Application Hacking
Web-servers & Application Hacking
 
Art of Web Backdoor - Pichaya Morimoto
Art of Web Backdoor - Pichaya MorimotoArt of Web Backdoor - Pichaya Morimoto
Art of Web Backdoor - Pichaya Morimoto
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
Google chrome sandbox
Google chrome sandboxGoogle chrome sandbox
Google chrome sandbox
 
BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing
BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing
BlueHat v17 || Betraying the BIOS: Where the Guardians of the BIOS are Failing
 
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
 
關於SQL Injection的那些奇技淫巧
關於SQL Injection的那些奇技淫巧關於SQL Injection的那些奇技淫巧
關於SQL Injection的那些奇技淫巧
 

Similar to Random numbers

Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
Andrea Cardinale
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
Ian Barber
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
Mikel Torres Ugarte
 
The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5
Wim Godden
 
node.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Servernode.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Server
David Ruiz
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
Ian Barber
 
Time tested php with libtimemachine
Time tested php with libtimemachineTime tested php with libtimemachine
Time tested php with libtimemachine
Nick Galbreath
 
php & performance
 php & performance php & performance
php & performance
simon8410
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
Wim Godden
 
Heavy Web Optimization: Backend
Heavy Web Optimization: BackendHeavy Web Optimization: Backend
Heavy Web Optimization: Backend
Võ Duy Tuấn
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
Emanuel Calvo
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
 
PHP & Performance
PHP & PerformancePHP & Performance
PHP & Performance
毅 吕
 
PHP Sessions and Non-Sessions
PHP Sessions and Non-SessionsPHP Sessions and Non-Sessions
PHP Sessions and Non-Sessions
Sven Rautenberg
 
HTTP For the Good or the Bad
HTTP For the Good or the BadHTTP For the Good or the Bad
HTTP For the Good or the Bad
Xavier Mertens
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
Sergi Almar i Graupera
 
The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5
Wim Godden
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008phpbarcelona
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
soft-shake.ch
 

Similar to Random numbers (20)

Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5
 
node.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Servernode.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Server
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
Time tested php with libtimemachine
Time tested php with libtimemachineTime tested php with libtimemachine
Time tested php with libtimemachine
 
php & performance
 php & performance php & performance
php & performance
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
Heavy Web Optimization: Backend
Heavy Web Optimization: BackendHeavy Web Optimization: Backend
Heavy Web Optimization: Backend
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
PHP & Performance
PHP & PerformancePHP & Performance
PHP & Performance
 
PHP Sessions and Non-Sessions
PHP Sessions and Non-SessionsPHP Sessions and Non-Sessions
PHP Sessions and Non-Sessions
 
HTTP For the Good or the Bad
HTTP For the Good or the BadHTTP For the Good or the Bad
HTTP For the Good or the Bad
 
My name is Trinidad
My name is TrinidadMy name is Trinidad
My name is Trinidad
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
 
The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 

More from Positive Hack Days

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Positive Hack Days
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows Docker
Positive Hack Days
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive Technologies
Positive Hack Days
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + Qlik
Positive Hack Days
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQube
Positive Hack Days
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps Community
Positive Hack Days
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Positive Hack Days
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для Approof
Positive Hack Days
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
Positive Hack Days
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложений
Positive Hack Days
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
Positive Hack Days
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application Security
Positive Hack Days
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 лет
Positive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Positive Hack Days
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПО
Positive Hack Days
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке Си
Positive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
Positive Hack Days
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опыт
Positive Hack Days
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services Center
Positive Hack Days
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атаки
Positive Hack Days
 

More from Positive Hack Days (20)

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows Docker
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive Technologies
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + Qlik
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQube
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps Community
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для Approof
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложений
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application Security
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 лет
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПО
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке Си
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опыт
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services Center
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атаки
 

Recently uploaded

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Random numbers

  • 2. Timeline of PHP problems with random numbers 2008: “mt_srand and not so random numbers” by Stefan Esser Early 2010: “Abusing weak PRNGs in PHP applications” by gat3way July 2010: “How I Met Your Girlfriend” by Samy Kamkar July 2012: “I Forgot Your Password: Randomness Attacks Against PHP” by George Argyros and Aggelos Kiayias August 2012: “Random Numbers. Take Two”
  • 3. PHP Developers: meh, so what? Documentation still lacks security warnings except for uniqid() PHP developers refuse to use external crypto providers in GENERATE_SEED Seeds in LCG and Mersenne Twister are interdependent (if you know one seed you will know the other)
  • 4. PHP Developers: meh, so what? Make seeding more secure? Nope, fix the documentation instead.* * didn’t do even this.
  • 5. What we are going to hack today OpenCart 1.5.3.1 DataLife Engine 9.5 UMI.CMS 2.8.5.3 OpenCart 1.5.4.1
  • 6. Basics (1) Apache: mpm-prefork (separate processes) or mpm-worker (threads within a process) PHP: non-thread safe (used with mpm- prefork) or thread safe (used with mpm- worker) Apache+PHP: mod_php (same process on keep-alive requests) or CGI/FastCGI (different processes on keep-alive requests)
  • 7. Basics (2) In a fresh process PHP automatically seeds its PRNGs Same seed for rand and mt_rand (max value 2^32) Two different seeds for LCG (max value 2^32 each)
  • 9. OpenCart 1.5.3.1 $code = md5(mt_rand()); //admin/controller/common/forgotten. php $this->session->data['token'] = md5(mt_rand()); //admin/controller/common/login.php
  • 10. OpenCart 1.5.3.1 Fresh Process Spawning on mpm-prefork Apache Initiate a number of keep-alive requests that is > MaxSpareServers (10 by default) Fill the pool Make target request on freshly seeded process
  • 11. OpenCart 1.5.3.1 php exploits/opencart/1.5.3.1.php php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_seed.exe” or ./tools/php_mt_seed/php_mt_seed <num> on obtained random number php exploits/opencart/genlinks.php seeds.txt
  • 13. OpenCart 1.5.3.1 php exploits/opencart/1.5.3.1.php php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_seed.exe” or ./tools/php_mt_seed/php_mt_seed <num> on obtained random number php exploits/opencart/genlinks.php seeds.txt
  • 14. OpenCart 1.5.3.1 php exploits/opencart/1.5.3.1.php php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_seed.exe” or ./tools/php_mt_seed/php_mt_seed <num> on obtained random number php exploits/opencart/genlinks.php seeds.txt
  • 15. OpenCart 1.5.3.1 php exploits/opencart/1.5.3.1.php php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_seed.exe” or ./tools/php_mt_seed/php_mt_seed <num> on obtained random number php exploits/opencart/genlinks.php seeds.txt
  • 17. OpenCart 1.5.3.1 GREAT SCOTT! IT WORKED!
  • 19. DataLife 9.6 engine/modules/lostpassword.php: $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand( ( double ) microtime() * 1000000 ); for($i = 0; $i < 15; $i ++) { $rand_lost .= $salt{rand( 0, 33 )}; } $lostid = sha1( md5( $lostname . $lostmail ) . time () . $rand_lost ) engine/modules/pm.php: $salt = "abchefghjkmnpqrstuvwxyz"; $random_key = ""; for($i = 0; $i < 8; $i ++) { $random_key .= $salt{rand( 0, 23 )}; }
  • 20. DataLife 9.6 Log on as test:123456 at http://datalife Copy PHPSESSID (View Page Info -> Details -> View Cookies) Delete cookies, go to http://datalife/?do=lostpassword Copy PHPSESSID and symbols on captcha php exploits/dle/dle.php <PHPSESSID 1> <PHPSESSID captcha> <captcha>
  • 21. DataLife 9.6 Log on as test:123456 at http://datalife Copy PHPSESSID (View Page Info -> Details -> View Cookies) Delete cookies, go to http://datalife/?do=lostpassword Copy PHPSESSID and symbols on captcha php exploits/dle/dle.php <PHPSESSID 1> <PHPSESSID captcha> <captcha>
  • 23. DataLife 9.6 Log on as test:123456 at http://datalife Copy PHPSESSID (View Page Info -> Details -> View Cookies) Delete cookies, go to http://datalife/?do=lostpassword Copy PHPSESSID and symbols on captcha php exploits/dle/dle.php <PHPSESSID 1> <PHPSESSID captcha> <captcha>
  • 24. DataLife 9.6 Log on as test:123456 at http://datalife Copy PHPSESSID (View Page Info -> Details -> View Cookies) Delete cookies, go to http://datalife/?do=lostpassword Copy PHPSESSID and symbols on captcha php exploits/dle/dle.php <PHPSESSID 1> <PHPSESSID captcha> <captcha>
  • 25. DataLife 9.6 Log on as test:123456 at http://datalife Copy PHPSESSID (View Page Info -> Details -> View Cookies) Delete cookies, go to http://datalife/?do=lostpassword Copy PHPSESSID and symbols on captcha php exploits/dle/dle.php <PHPSESSID 1> <PHPSESSID captcha> <captcha>
  • 27. DataLife 9.6 GREAT SCOTT! IT WORKED!
  • 29. Time Synchronization (ATS) Date: T1 T2 T2-T1=1 Time: msec=0 msec=0 (!) msec=0 msec=m1 m2 msec=0 msec=m1 m2 msec(server) ~ [0;(m2-m1)/2]
  • 30. UMI.CMS 2.8.5.3 (PHP<5.4) ext/session/session.c: gettimeofday(&tv, NULL); ... spprintf(&buf, 0, "%.15s%ld%ld%0.8F", remote_addr ? remote_addr : "", tv.tv_sec, (long int)tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10); ... return PHP_MD5Update(&md5_context, (unsigned char *) buf, strlen(buf));
  • 31. UMI.CMS 2.8.5.3 PHPSESSID: md5(127.0.0.11351346648192088.00206033) IP (known) timestamp (known) microtime0 (need to bruteforce) LCG (need to find two seeds)
  • 32. UMI.CMS 2.8.5.3 ext/standard/lcg_seed.h: static void lcg_seed(TSRMLS_D) { struct timeval tv; if (gettimeofday(&tv, NULL) == 0) { LCG(s1) = tv.tv_sec ^ (tv.tv_usec<<11); } else { LCG(s1) = 1; } #ifdef ZTS LCG(s2) = (long) tsrm_thread_id(); #else LCG(s2) = (long) getpid(); #endif if (gettimeofday(&tv, NULL) == 0) { LCG(s2) ^= (tv.tv_usec<<11); } LCG(seeded) = 1; }
  • 33. UMI.CMS 2.8.5.3 LCG seeds: S1 = timestamp ^ microtime1 << 11 S2 = pid ^ microtime2 << 11 timestamp (known) microtime1 (need to bruteforce: microtime1 – microtime0 = 1…4) pid (need to bruteforce: 1024-32768) microtime2 (need to bruteforce: microtime2 - microtime1 = 0…3)
  • 34. UMI.CMS 2.8.5.3 ext/standard/php_rand.h: #ifdef PHP_WIN32 #define GENERATE_SEED() (((long) (time(0) * GetCurrentProcessId())) ^ ((long) (1000000.0 * php_combined_lcg(TSRMLS_C)))) #else #define GENERATE_SEED() (((long) (time(0) * getpid())) ^ ((long) (1000000.0 * php_combined_lcg(TSRMLS_C)))) #endif
  • 35. UMI.CMS 2.8.5.3 function getRandomPassword ($length = 12) { $avLetters = "$#@^&!1234567890qwertyuiopasd fghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"; $size = strlen($avLetters); $npass = ""; for($i = 0; $i < $length; $i++) { $c = rand(0, $size - 1); $npass .= $avLetters[$c]; } return $npass; }
  • 36. UMI.CMS 2.8.5.3 Edit exploits/umi/umi.php, add your login php exploits/umi/umi.php [offset=0] [delay1=10000- 100000] [delay2=10000] Run phpsessid_cuda with PHPSESSID, timestamp and your ip php exploits/umi/pass_gen.php <sec> <pid> <s1> <s2>
  • 37. UMI.CMS 2.8.5.3 Edit exploits/umi/umi.php, add your login php exploits/umi/umi.php [offset=0] [delay1=10000- 100000] [delay2=10000] Run phpsessid_cuda with PHPSESSID, timestamp and your ip php exploits/umi/pass_gen.php <sec> <pid> <s1> <s2>
  • 39. UMI.CMS 2.8.5.3 Edit exploits/umi/umi.php, add your login php exploits/umi/umi.php [offset=0] [delay1=10000- 100000] [delay2=10000] Run phpsessid_cuda with PHPSESSID, timestamp and your ip php exploits/umi/pass_gen.php <sec> <pid> <s1> <s2>
  • 40. PHPSESSID Bruteforcer 1,170 billion seeds/sec on a single Amazon EC2 GPU Instance Supports multiple GPUs Covers the whole search space within 7,5 minutes Supports distributed computing based on sockets So fast that we don’t need microtime synchronization with remote server any more
  • 42. UMI.CMS 2.8.5.3 Edit exploits/umi/umi.php, add your login php exploits/umi/umi.php [offset=0] [delay1=10000- 100000] [delay2=10000] Run phpsessid_cuda with PHPSESSID, timestamp and your ip php exploits/umi/pass_gen.php <sec> <pid> <s1> <s2>
  • 44. UMI.CMS 2.8.5.3 GREAT SCOTT! IT WORKED!
  • 47. OpenCart 1.5.4.1 $code = md5(mt_rand()); $code = sha1(uniqid(mt_rand(), true)); //admin/controller/common/forgotten.php $this->session->data['token'] = md5(mt_rand()); //admin/controller/common/login.php
  • 48. OpenCart 1.5.4.1 Sources of entropy: mt_rand() : 92496817 uniqid() : 1351070918 + 616520 (in hex) lcg_value() : 7.41222311 sha1(924968175087b4c6968487.41222311)
  • 49. OpenCart 1.5.4.1 ext/standard/php_rand.h: #ifdef PHP_WIN32 #define GENERATE_SEED() (((long) (time(0) * GetCurrentProcessId())) ^ ((long) (1000000.0 * php_combined_lcg(TSRMLS_C)))) #else #define GENERATE_SEED() (((long) (time(0) * getpid())) ^ ((long) (1000000.0 * php_combined_lcg(TSRMLS_C)))) #endif
  • 50. OpenCart 1.5.4.1 Send 3 requests in keep-alive (get token, user reset, admin reset) Find MT seeds (some collisions are present) Bruteforce LCG seeds (also collisions) given MT seeds Bruteforce our sha1 -> find out proper MT seed, LCG seed; also microseconds to start from Calculate admin mt_rand(), admin LCG Bruteforce microseconds given starting point from our sha1 (Request Twins approach)
  • 51. OpenCart 1.5.4.1 php exploits/opencart/1.5.4.1.php, get hash in local mail php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_rand.exe” to get seeds At Amazon run “lcg_sha1.exe” with seeds file, timestamp and sha1 hash Get back to exploit, specify mt_rand, admin LCG and microsecs to start from
  • 52.
  • 53. OpenCart 1.5.4.1 php exploits/opencart/1.5.4.1.php, get hash in local mail php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_rand.exe” to get seeds At Amazon run “lcg_sha1.exe” with seeds file, timestamp and sha1 hash Get back to exploit, specify mt_rand, admin LCG and microsecs to start from
  • 54. OpenCart 1.5.4.1 php exploits/opencart/1.5.4.1.php, get hash in local mail php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_rand.exe” to get seeds At Amazon run “lcg_sha1.exe” with seeds file, timestamp and sha1 hash Get back to exploit, specify mt_rand, admin LCG and microsecs to start from
  • 55. OpenCart 1.5.4.1 php exploits/opencart/1.5.4.1.php, get hash in local mail php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_rand.exe” to get seeds At Amazon run “lcg_sha1.exe” with seeds file, timestamp and sha1 hash Get back to exploit, specify mt_rand, admin LCG and microsecs to start from
  • 56. LCG via mt_rand Seed Bruteforcer Allows to find LCG seeds (some collision are present) given mt_rand seed GPU-based 16 billion seeds/sec on a single Amazon EC2 GPU Instance Covers the whole search space within 1 minute
  • 58. OpenCart 1.5.4.1 1 0.94821643 2 9.31809351  mt_srand 3 1.78501767 4 5.16258654 5 7.25796790  User LCG 6 1.86345598 7 3.57376950 8 4.59748062  Admin LCG 9 1.85684612 10 2.74482567
  • 61. OpenCart 1.5.4.1 php exploits/opencart/1.5.4.1.php, get hash in local mail php exploits/opencart/md5crack.php <md5> or ./tools/hashcat/hashcat <md5> on obtained token At Amazon run “mt_rand.exe” to get seeds At Amazon run “lcg_sha1.exe” with seeds file, timestamp and sha1 hash Get back to exploit, specify mt_rand, admin LCG and microsecs to start from
  • 62. OpenCart 1.5.4.1 Wait a moment…
  • 63. OpenCart 1.5.4.1 (4) GREAT SCOTT! IT WORKED!