A tool to read the binarycookie format of Cookies on iOS applications

Overview

BinaryCookieReader

Cloned from http://securitylearn.net/wp-content/uploads/tools/iOS/BinaryCookieReader.py

##Usage

Python BinaryCookieReader.py [Cookie.binarycookies-file-path]

##Cookies.binarycookies Format

Cookies.binarycookies file is composed of several pages and each page can have one or more cookies. The complete file format is explained below:

###File Format:

  1. The file starts with a 4 byte magic string: cook. It is used to identify the file type.
  2. Next four bytes is an integer specifying the number of pages in the file.
  3. Following that, a 4 byte integer for each page, represents the page size.
  4. Next to that, the file contains the actual page content. Each page is of length corresponding to the page size. Page format is explained below.
  5. The file ends with an 8 byte value and it might be file checksum.`

###Page Format:

  1. Every page starts with a 4 byte page header: 0x00000100.
  2. Next four bytes is an integer specifying the number of cookies in the page.
  3. Following that, a 4 byte integer for each cookie, represents the cookie offset. Offset specifies the start of the cookie in bytes from the start of the page.
  4. Next to that, the page contains the actual cookie contents. Each cookie is of variable length. Cookie format is explained below.
  5. Page ends with a 4 byte value and it is always 0x00000000.

###Cookie Format:

  1. First 4 bytes in the cookie is the size of the cookie.
  2. The next 4 bytes are unknown (may be related to cookies flags).
  3. The next four bytes are the cookie flags. This is an integer value (1=Secure, 4=HttpOnly, 5= Secure+HttpOnly).
  4. The next 4 bytes are unknown.
  5. The next 4 bytes is an integer specifying the start of the url field in bytes from the start of the cookie record.
  6. The next 4 bytes is an integer specifying the start of the name field in bytes from the start of the cookie record.
  7. The next 4 bytes is an integer specifying the start of the path field in bytes from the start of the cookie record.
  8. The next 4 bytes is an integer specifying the start of the value field in bytes from the start of the cookie record.
  9. The next 8 bytes represents the end of the cookie and it is always 0x0000000000000000.
  10. The next 8 bytes are the cookie expiration date. Date is in Mac epoch format (Mac absolute time). Mac epoch format starts from Jan 2001.
  11. The next 8 bytes are the cookie creation date.
  12. Next to that, the cookie contains the actual cookie domain, name, path & value. The order is not specific and they can appear in any order.
You might also like...
Swift sample app for running privileged operations on macOS using a helper tool
Swift sample app for running privileged operations on macOS using a helper tool

SwiftAuthorizationSample demonstrates how to run privileged operations on macOS using a helper tool managed by launchd. This sample was created with t

A GUI based virtualisation tool for running Linux on macOS Big Sur (x86 or arm64)
A GUI based virtualisation tool for running Linux on macOS Big Sur (x86 or arm64)

Project Mendacius GUI based virtualization tool to run Linux, based on the Virtualization framework introduced by Apple for macOS Big Sur with support

A command line tool for managing Swift Playground projects on your Mac.

swift-playground-tools A command line tool for managing Swift Playground projects on your Mac. Generate Xcode Project $ playground-tools generate-xcod

FocusSpace - A time-management tool to help you stay focus with your friends
FocusSpace - A time-management tool to help you stay focus with your friends

FocusSpace 🏆 ElleHacks2022 - (Telus) First Place 👩 Developers Manyi Cheng(@man

Apple SMC library & tool

SMCKit An Apple System Management Controller (SMC) library & command line tool in Swift for Intel based Macs. The library works by talking to the Appl

ExpoMod - a small application tool that lets you quickly setting up your computer for presentations / exhibitions
ExpoMod - a small application tool that lets you quickly setting up your computer for presentations / exhibitions

ExpoMod is a small application tool that lets you quickly setting up your computer for presentations / exhibitions. Or simply having useful shortcut to not being distract and keep awake your computer.

Cocoapods project gen tool.

cocoapods-project-gen A gem which can gen cocoapods project. Installation Add this line to your application's Gemfile: gem 'cocoapods-project-gen' And

iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android).
iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android).

FinanceReactNative iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android). Data is pulled from Yahoo Finance

Comments
  • Licensing

    Licensing

    If you find software that doesn’t have a license, that generally means you have no permission from the creators of the software to use, modify, or share the software. Although a code host such as GitHub may allow you to view and fork the code, this does not imply that you are permitted to use, modify, or share the software for any purpose.

    Source: https://choosealicense.com/no-permission

    Author's contact information is provided in the script header,

    For any bug fixes contact me: [email protected]

    I recommend reaching out to them and asking for permission to post their code.

    opened by Jnchi 1
Owner
Murphy
Murphy
📝 Read, update and write your Xcode projects

XcodeProj XcodeProj is a library written in Swift for parsing and working with Xcode projects. It's heavily inspired by CocoaPods XcodeProj and xcode.

Tuist 1.7k Dec 28, 2022
Kind of tired to need an Android Device on me, just to read manga, so here we are.

Dokusho Kind of tired to need an Android Device on me, just to read manga, so here we are. I am going to prioritize feature based on how I feel and no

Stephan Deumier 13 Oct 10, 2022
The template for SwiftPM-based highly modularized (iOS) applications

basic-ios-template Getting started Fork the repo as a template. Create a local folder for your app and navigate to it mkdir <YourAppName> cd <YourAppN

capturecontext 32 Jan 1, 2023
A Swift package that provides convenient Lorem Ipsum text, images, colors and other placeholders for rapidly prototyping, building and testing your iOS applications.

Lorem Introducing Lorem, a placeholder generator library for iOS to help you rapidly prototype, build and test your iOS applications. By leveraging Sw

Thirdfort Limited 10 Dec 5, 2022
A simple, reliable and scalable delivery API for transactional push notifications for websites and applications

Catapush is a simple, reliable and scalable delivery API for transactional push notifications for websites and applications. Ideal for sending data-dr

Catapush 0 Dec 29, 2021
 A curated list of awesome applications, softwares, tools and shiny things for macOS.

A curated list of awesome applications, software, tools and shiny things for macOS. Items marked with are open-source software and link to the source

Chaitanya Gupta 13.8k Jan 9, 2023
Open-source jailbreaking tool for many iOS devices

Open-source jailbreaking tool for many iOS devices *Read disclaimer before using this software. checkm8 permanent unpatchable bootrom exploit for hund

null 0 Nov 6, 2021
Command line tool for exporting resources and generating code from your Figma files

Fugen Fugen is a command line tool for exporting resources and generating code from your Figma files. Currently, Fugen supports the following entities

Almaz Ibragimov 69 Dec 17, 2022
A little beautifier tool for xcodebuild

xcbeautify xcbeautify is a little beautifier tool for xcodebuild. Similar to xcpretty, but faster. Features 2x faster than xcpretty. Human-friendly an

Thi Doãn 649 Dec 23, 2022
A Swift command line tool for generating your Xcode project

XcodeGen XcodeGen is a command line tool written in Swift that generates your Xcode project using your folder structure and a project spec. The projec

Yonas Kolb 5.9k Jan 9, 2023