The Spanner logo
    • Home
    • Blog
      • Blog home
      • RSS
    • Login
    • Home
    • Blog
      • Blog home
      • RSS
    • Login
    The Spanner logo

    The Spanner
    Web security blog

    Made by Gareth Heyes
    Follow me on Twitter: @garethheyes

    Javascript for hackers!

    Hackvertor logo
    Shazzer logo
    My Github account
    Recent posts
    Pure-CSS 3D world collision detection How to write a Hackvertor tagIntroducing Feedworm: A Privacy-First RSS Reader That Lives in DevToolsSpeedy RSVP extensionAutoVaderHackvertor history and tag finderShadow Repeater v1.2.3 releaseBurp Hackvertor v2.1.24 releaseHacking roomsXSSing TypeErrors in SafarivalueOf: Another way to get thisMaking the Unexploitable Exploitable with X-Mixed-Replace on FirefoxThe curious case of the evt parameterCSS-Only Tic Tac Toe ChallengeRewriting relative urls with the base tag in SafariBypassing DOMPurify with mXSSNew IE mutation vectorHow I smashed MentalJSMentalJS DOM bypassAnother XSS auditor bypassXSS Auditor bypassBypassing the IE XSS filterUnbreakable filterMentalJS bypassesmXSSJava SerializationBypassing the XSS filter using function reassignmentRPOSandboxed jQueryX-Domain scroll detection on IE using focusEpic fail IEnew operatorDecoding complex non-alphanumeric JavaScriptHacking FirefoxDOM ClobberingBypassing XSS AuditorThe evolution of codeNon-Alpha PHP in 6-7 charsetTweetable PHP-Non AlphaMentalJS for PHP

    Tracking without cookies part 2

    By Gareth Heyes (@hackvertor)

    Published 19 years 1 month ago • Last updated March 22, 2025 • ⏱️ < 1 min read

    ← Back to articles

    I've been experimenting with the various ways of tracking a user without cookies or sessions and I came up with a unique way of doing so that I haven't really seen documented anywhere. Using the script below you should receive a unique session id; if you then try the script in another browser it should return the same session id.

    It works by getting the first digits of your IP address e.g. 192 then combines it with the first 2 digits of your remote port between the server and client, it creates a unique hash from that information. This method would only work within the same session and it would not be possible to track users across new connections.

    Remote Port tracking

    Remote port source code

    Update...

    After discussing this further on the GeekUp mailing list Alan Burlison pointed out that various configurations of servers and load balancers would complicate the remote port assignment so it wouldn't be possible to track a user reliably using remote ports. He also provided a few links on Pipeline HTTP and various specifications of the HTTP standard which I found interesting.

    http://tools.ietf.org/html/rfc2616 http://en.wikipedia.org/wiki/Pipelined_HTTP http://en.wikipedia.org/wiki/HTTP_persistent_connection http://httpd.apache.org/docs/2.2/mod/core.html#keepalive http://www.mozilla.org/projects/netlib/http/pipelining-faq.html http://egonitron.com/2007/05/25/the-truth-about-the-firefox-pipelining-trick/

    ← Back to articles