Hijacking Cookie Sessions « Null Byte :: WonderHowTo

Let's say that we want to see what someone is doing on their computer? In this tutorial, we'll be hijacking cookie sessions to do just that!Step 1: Preparing KaliIn order to do this, we need three tools:Ettercap (duh)HamsterFerretFerret is a nice little tool that runs with Hamster. It grabs session cookies that travel across the LAN. Hamster is a proxy that "manipulates" everything grabbed by Ferret. The only thing is that Ferret doesn't come with Kali 64-bit version. In order to install it, we need to add the i386 (32-bit) repository.Thenwe can install it. For convenience, run this 1-line script to install it:dpkg --add-architecture i386 && apt-get update && apt-get install ferret-sidejack:i386After you do that, let's move on.Step 2: Setting Up the MitM Attack VectorsEttercapWe're going to use Ettercap to ARP poison the targets. Open it up and do:Sniff-->Unified SniffingHosts-->Scan for HostsMitM-->Arp PoisoningandONLYcheckSniff Remote ConnectionsStart-->Start SniffingHamster & FerretNow thatFerretis installed, all we have to do is runferret -iinterface. For instance, I'll be using Ethernet.You should quickly be getting output like this.To run Hamster, just typehamsterin a new terminal.Step 3: Viewing the Cookie SessionsTo view the cookies that we have "sidejacked," simply open your web browser and type in the URL boxlocalhost:1234or anything of the equivilent (i.e., 127.0.0.1:1234). You should get a screen like this:Now we need to tell Hamster the interface to listen on. Go toadaptersand enter the same interface you entered in Ferret.PressSubmit Queryand let the magic begin (you'll have to wait a while before you get lots of cookies).Step 4: Viewing CookiesAfter a while you'll start to see some IP addresses pop up (including yours). To view the cookies, simply click on the IP address.Just click on the URLs the view them. For example, I just was talking about stuff in a chat, but I left. I didn't trust one of the members and guess what? I was right.Now, I didn't see it in the chat, but I decided to sidejack him just in case, and guess what I found?So I know what he said, but he doesn't know I know it....If you want to view the original cookies, just click thatcookiesbutton and replacehamsterwithlocalhost:1234at the beginning of the URL, or you can open up the .pcap file in the home folder.Mission CompleteNow we can view everything this guy says, and he won't ever know it. This same attack can also be used to hijack someone's session while they're logged in to a website, making things much faster than cracking passwords. Cool, eh?I hope you found this as much fun as I did.This was part of our C3 project.C|H of C3Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Session hijack with a pineappleHow To:Use BlackSheep to thwart the password stealing Firesheep in FirefoxSubterfuge:MITM Automated Suite That Looks Just Lame.How To:Create cookies and track sessions with the PHP scripting languageHow To:Prevent your Facebook cookies from being hijacked by FiresheepForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Prevent Social Networks from Tracking Your Internet ActivitiesNews:Cookie DoodleRECIPE:Chocolate Chip Cookie Dough CupcakesNews:Hollywood Billboard HijackNews:AR World Makes Wonderment BlogNews:5 Bourbon-Spiked Christmas Cookie RecipesNews:Get YouTube's New Layout Today with a Simple JavaScript HackNews:DIY Fractal GingerbreadmenFood Photography Challenge:Chocolate Spice CookiesNews:augmented reality cookiesNews:Vincent Laforet HDDSLR Session OnlineHow To:Get the New Google Navigation MenuHow To:Make Sierpinski Carpet CookiesHow To:Your Guide to Lazy Baking, Part 5: How to Bake Cookies Using Cake MixHow To:Make Chocolate Chip CookiesNews:LEGO Cookie RollerNews:Me want CookieNews:Me Want CookieGHOST PHISHER:Security Auditing ToolHow To:How did it goNews:If You Give an Artist a Cookie...Recipe:Hostess Cake Inspired CookiesNews:Eat Your WordsNews:FaceNiff App Allows Android Users to Hack FacebookNews:Raw Mint Chocolate Cookies