Sunday, January 21, 2024

ASIS CTF Quals 2015 - Sawthis Writeup - Srand Remote Prediction


The remote service ask for a name, if you send more than 64 bytes, a memory leak happens.
The buffer next to the name's is the first random value used to init the srand()


If we get this value, and set our local srand([leaked] ^ [luckyNumber]) we will be able to predict the following randoms and win the game, but we have to see few details more ;)

The function used to read the input until the byte \n appears, but also up to 64 bytes, if we trigger this second condition there is not 0x00 and the print shows the random buffer :)

The nickname buffer:



The seed buffer:



So here it is clear, but let's see that the random values are computed with several gpu instructions which are decompiled incorrectly:







We tried to predict the random and aply the gpu divisions without luck :(



There was a missing detail in this predcitor, but there are always other creative ways to do the things.
We use the local software as a predictor, we inject the leaked seed on the local binary of the remote server and got a perfect syncronization, predicting the remote random values:




The process is a bit ugly becouse we combined automated process of leak exctraction and socket interactive mode, with the manual gdb macro.




The macro:



















More articles

  1. Pentest Tools Kali Linux
  2. Pentest Tools Tcp Port Scanner
  3. Hacking Tools For Kali Linux
  4. Github Hacking Tools
  5. Hackers Toolbox
  6. Hacking Tools Download
  7. Pentest Tools Bluekeep
  8. Hacking Tools Github
  9. Pentest Tools Android
  10. Tools 4 Hack
  11. Best Hacking Tools 2019
  12. Pentest Tools For Android
  13. Hack Tools Pc
  14. Pentest Tools Windows
  15. Hacking Tools And Software
  16. Android Hack Tools Github
  17. Hacker Tools 2020
  18. Hacking Tools Hardware
  19. Hack Tool Apk
  20. Hacks And Tools
  21. Hacker Tools Software
  22. Hack Tools For Ubuntu
  23. Hacker Tools Linux
  24. Hack Website Online Tool
  25. Hacker Tools Mac
  26. Pentest Tools For Ubuntu
  27. Pentest Tools Apk
  28. New Hack Tools
  29. Pentest Tools Github
  30. Hacker Tools Github
  31. Hacker Search Tools
  32. Pentest Tools For Android
  33. Hacking Tools For Mac
  34. Pentest Reporting Tools
  35. Hacker Search Tools
  36. Hack Website Online Tool
  37. Pentest Box Tools Download
  38. Hack Tools For Mac
  39. Beginner Hacker Tools
  40. Hacking Tools Free Download
  41. World No 1 Hacker Software
  42. Hacking Tools 2020
  43. Pentest Reporting Tools
  44. Hacker Tools Hardware
  45. Black Hat Hacker Tools
  46. Hacker Tools List
  47. Pentest Tools Nmap
  48. Pentest Recon Tools
  49. Pentest Tools Bluekeep
  50. Hack Tools Download
  51. Termux Hacking Tools 2019
  52. Hacking Tools 2019
  53. Pentest Tools For Windows
  54. Hacking Tools Mac
  55. Hacker Tools Apk Download
  56. Easy Hack Tools
  57. Hack Apps
  58. Computer Hacker
  59. Best Pentesting Tools 2018
  60. Pentest Reporting Tools
  61. Hack Tools
  62. Black Hat Hacker Tools
  63. Tools 4 Hack
  64. Hacker Security Tools
  65. Wifi Hacker Tools For Windows
  66. Hacking Tools For Windows Free Download
  67. Hacker Tools Apk
  68. New Hack Tools
  69. Hacker Tools For Windows
  70. Underground Hacker Sites
  71. Pentest Tools Tcp Port Scanner
  72. Hacker Tools Free Download
  73. Physical Pentest Tools
  74. Pentest Tools List
  75. Hacking Tools Windows
  76. Pentest Tools Apk
  77. Pentest Tools Alternative
  78. Hackrf Tools
  79. Hacker Tools List
  80. How To Install Pentest Tools In Ubuntu