Sniffing & Spoofingsidejackingproxysession-hijackingcookies

Hamster Sidejack

Hamster is a sidejacking tool that acts as a proxy server, replacing your cookies with stolen session cookies to hijack others' sessions. Cookies are sniffed using the Ferret program.

Description

Hamster-sidejack is a specialized tool for session hijacking, known as 'sidejacking'. It functions as a proxy server that intercepts and swaps session cookies, enabling attackers to impersonate users by taking over their active web sessions. This tool is particularly useful in scenarios where an attacker has access to network traffic containing unencrypted cookies, such as on open Wi-Fi networks.

The primary use case involves combining Hamster with cookie-sniffing tools like Ferret to capture session tokens from victims. Once obtained, Hamster's proxy capability allows seamless takeover of the victim's authenticated sessions without needing their credentials. This technique bypasses login mechanisms for websites that do not enforce secure cookie attributes like HttpOnly or Secure flags.

Hamster requires Ferret for the sniffing component, making it part of a broader toolkit for man-in-the-middle attacks. It is lightweight, with an installed size of 154 KB, and is available in Kali Linux repositories for easy deployment in penetration testing environments.

How It Works

Hamster operates as a proxy server listening on a specified port, such as 127.0.0.1:1234. Users configure their browser to route traffic through this proxy. The tool replaces the browser's cookies with session cookies previously stolen via Ferret, which sniffs network traffic for unencrypted cookie data. Internally, it initializes listening ports, manages proxy threads, and performs cookie substitution during HTTP requests, enabling transparent session hijacking over protocols like HTTP.

Installation

bash
sudo apt install hamster-sidejack

Examples

Starts the Hamster side-jacking tool, setting up a proxy on 127.0.0.1:1234 and beginning the session hijacking thread.
hamster
Displays HAMPSTER 2.0 banner and instructs to set browser proxy to http://127.0.0.1:1234 for cookie replacement.
hamster
Configures browser proxy before running hamster to enable sidejacking with stolen cookies.
set browser to use proxy http://127.0.0.1:1234; hamster
Initiates proxy listening on port 1234 with debug output for port setting and mg_open_listening_port.
hamster
Begins proxy thread after successful port binding, ready for session hijacking operations.
hamster
Installs the tool and runs it to start the sidejacking proxy server.
sudo apt install hamster-sidejack; hamster
Updated 2026-04-16kali.org ↗