Showing posts with label hacking. Show all posts
Showing posts with label hacking. Show all posts

Wednesday, September 17, 2014

Hacking Sessions to Hack into others account

Recently I've successfully hacked into somebody else account as an white collar using Session Hijacking on one of the Highest Traffic eCommerce Site. So thought of sharing for study purpose only.

What is session hijacking?
"Session hijacking (a.k.a cookie hijacking) is the exploitation of a valid computer session—sometimes also called a session key—to gain unauthorized access to information or services in a computer system."



E.g. on an typical eCommerce Site, a user can Hack into anybody's account using SessionId, and access Confidential user information like:
  • All Credit Cards details, All Postal Addresses, Mobile Numbers, Email address, All orders, shopping & favorites lists etc.
Further a hacker can,
  • Get the order at his place by changing address,
  • Place new order or cancel any genuine order
  • Call the customer pretending Company Representative to extract further information.

How the hell this haapens!
  1. Login to 2 different browsers on different or same machines (say user A & B).
  2. Pick up user B' Session Id value
  3. Edit user A's SessionId with the above Value (cookie editor!)
  4. BOOM!!! user "A" can access all the B's information.

What how the real hacker can get a session id?
  1. User can sniff the session Ids of other users, and he can do the rest.
  2. Brute force session id generation, and the rest you know already, don't you!

Be Proactive rather than reactive! 
Here are some examples of usual defense-in-depth strategies:
  1. Security of HTTP (HTTPS)
  2. Secure randomization (leading to extreme difficulty in guessing)
  3. Re-authentication (reenter password) for accessing sensitive information
  4. Regenerating the session id after a successful login to prevent session fixation
  5. Secondary checks against the identity of the user like check same IP, user agent
  6. Two factor authentication
Please note, you have to find out first the target site which is vulnerable to the above security threat

Resources:
  1. https://www.owasp.org/index.php/Session_Management_Cheat_Sheet
  2. http://technet.microsoft.com/en-us/magazine/2005.01.sessionhijacking.aspx 
  3. http://googlewebmastercentral.blogspot.com/2014/08/https-as-ranking-signal.html 
  4. http://techcrunch.com/2012/11/18/facebook-https/

Wednesday, May 14, 2014

MySQL Quick Hacks & problem solving

Few day to day MySQL working, administration, hacking and problem solving tips.

  1. ERROR 1 (HY000): Can't create/write to file '/tmp/#sql****.MYI' (Errcode: 13) 
    1. Solution : This is basically due to messed up /tmp permissions
      1. chown root:root /tmp
      2. chmod 1777 /tmp
      3. /etc/init.d/mysqld restart

Tuesday, October 29, 2013

Hacking Google : Tips & Tricks


  • Free Downloads of any type
    • Ever needed an old Android app but couldn't find the APK for what you were looking for? Or wanted an MP3 but couldn't find the right version? Google has a few search tools that, when used together, can unlock a plethora of downloads: inurl, intitle, and filetype. For example, to find free Android APKs, you'd search for -inurl:htm -inurl:html intitle:"index of" apk to see site indexes of stored APK files
      • -inurl:htm -inurl:html intitle:"index of" apk
      • intitle:"index of" downloads
      • filetype:pdf Javascript
  • Search Product, Recipes, and More with Reverse Image Search
    • With Google, you can just drop a picture into Google Images and it'll search for similar pictures. 
  • Get google cache copy directly
    • We all know Google Cache can be a great tool, but there's no need to search for the page and then hunt for that "Cached" link: just type cache: before that site's URL
      • cache:http://vishnu-agarwal.blogspot.com/

Wednesday, January 2, 2013

Hacking Mac : Useful installations & shortcuts

Some of the software usually you'll love to have:


Mac Installers:
  1. iSync (not available for Mountain Loin)
  2. Adobe Reader
  3. Adobe flash player
  4. Adobe Air
  5. Twhirl
  6. Evernote
  7. OneNote
  8. Picasa
  9. Adium
  10. Alfred
  11. Skype
  12. Chrome
  13. VLC
  14. Keepassx
  15. X11 and XQuartz (Macport)
  16. MySQL (mysql/php configuration)
  17. Skitch
  18. Sublime 2
  19. SilverLight
  20. ImageMagick
  21. Ntfs-3G
  22. Java & eclipse
  23. GreaseMonkey / TemperMonkey Script - firefox/chrome
Commands:
  1. Install .dmg from Command Line : hdiutil mount cotvnc-20b4.dmg 
*nix Commands:
In Mac Terminal:

  1. ls -lSr : list files (-S for sort by size)
  2. cd - :  to swap directories to the previous working directory
  3. for f in *.txt;do echo $f;done : Looping over a set of files
  4. find . –name "*.txt" –mtime 5 : files & folders modified in the last 5 days
  5. rename –v 's/foo/bar/g' * : Rename files using regular expressions
  6. mv /path/to/file.{txt,xml} #rename just part of a filename
  7. cp /etc/rc.conf{,-old} #Backup of the file
  8. sudo !! #represent the last command you ran
  9. mkdir my{1,2,3} #will create my1,my2 & my3 folders
  10. Bash Shortcut 
    1. Ctrl + U: Clears the line from the cursor point back to the beginning.
    2. Ctrl + A: Moves the cursor to the beginning of the line.
    3. Ctrl + E: Moves the cursor to the end of the line
    4. Ctrl + R: Allows you to search through the previous commands.
  11. Using Alias : Some useful examples
    1. alias agi='sudo apt-get install'
    2. alias emp='cd /usr/local/mysql/data/employee'
    3. alias grep='grep --color'
    4. alias ls='ls –l' # if you always wanted ls to actually do ls –l


Some shorcuts:
  1. Shift + Command + I : Compose outlook
  2. Shift + Command + N : New Folder
  3. Shift + Command + 4 : Screen Capture
  4. Command + Alt + D : Dock Hide / Unhide
  5. Command + Alt + Esc : Force Quit
  6. Command + M : Minimize
  7. Command + H : Hide 
  8. Command + D : Clone in finder
  9. Command + Q : Quit
  10. Command + I : File Info
  11. Command + S/C/V : Save/Copy/Paste
  12. Command + Delete : Delete
  13. Enter / Return : Rename
  14. Space : Quick Info
  15. Command + Space : Spotlight
  16. Delete : Backspace
  17. Delete + fn : Delete
  18. Command + Z : Undo
  19. Command + Shift + Z : Undo
  20. Command + Left : beginning of line
  21. Command + Left : Ending of line
  22. Alt + arrow : jump by word
  23. Command + Alt + I : Inspector in Browser
  24. Shift + Ctrl + arrow: Word selection
  25. ctrl + arrow : Desktop switch
  26. Lock Screen : Enable Hot Corner

Tuesday, September 20, 2011

Hacking Firefox : Useful Addons

After using firefox for almost 8 years, I think that there are so many firefox Addons without which my life wouldn't be so comfortable. In the progression of Hacking firefox to make browsing easy, here are few most used Firefox addons:
  • Firebug : Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
  • YSlow : YSlow analyzes web pages and why they're slow based on Predefined & Custom rules for high performance web sites.
  • Pagespeed : Very Similar to YSlow provided by Google.
  • ColorZilla : a color picker, which is used to find any color code just by hovering mouse.
  • Xmarks Sync : is a bookmarking add-on. Keep your bookmarks, passwords and open tabs backed up and synchronized across computers and browsers.
  • FoxClocks : FoxClocks lets you keep an eye on the time around the world - or just your local time - by putting small clocks in your statusbar.
  • AdBlock Plus : Annoyed by adverts? Troubled by tracking? Bothered by banners? Install Adblock Plus now to regain control of the internet and change the way that you view the web.
  • ChatZila : A clean, easy to use and highly extensible Internet Relay Chat (IRC) client.
  • Cookies Manager+ : Cookie manager that allows view, edit and create new cookies. It also allows show extra information about cookies and allows edit multiple cookies at once, as well as backup/restore them.
  • JS Switch : Add a toolbar button or an option in Tool menu to toggle JavaScript.

LinkWithin

Related Posts with Thumbnails