All Projects → vbatts → Tar Split

vbatts / Tar Split

Licence: bsd-3-clause
checksum-reproducible tar archives (utility/library)

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Tar Split

Command Injection Payload List
🎯 Command Injection Payload List
Stars: ✭ 658 (+1165.38%)
Mutual labels:  payload
Msfpc
MSFvenom Payload Creator (MSFPC)
Stars: ✭ 808 (+1453.85%)
Mutual labels:  payload
Peasauce
Peasauce Interactive Disassembler
Stars: ✭ 33 (-36.54%)
Mutual labels:  disassembly
Awesome Security Gists
A collection of various GitHub gists for hackers, pentesters and security researchers
Stars: ✭ 701 (+1248.08%)
Mutual labels:  payload
Shellen
🌸 Interactive shellcoding environment to easily craft shellcodes
Stars: ✭ 799 (+1436.54%)
Mutual labels:  disassembly
Nem Apps Lib
Semantic Java API Library for NEM Platform
Stars: ✭ 16 (-69.23%)
Mutual labels:  payload
Amber
Reflective PE packer.
Stars: ✭ 594 (+1042.31%)
Mutual labels:  payload
Ezxss
ezXSS is an easy way for penetration testers and bug bounty hunters to test (blind) Cross Site Scripting.
Stars: ✭ 1,022 (+1865.38%)
Mutual labels:  payload
Medusa
🐈Medusa是一个红队武器库平台,目前包括扫描功能(200+个漏洞)、XSS平台、协同平台、CVE监控等功能,持续开发中 http://medusa.ascotbe.com
Stars: ✭ 796 (+1430.77%)
Mutual labels:  payload
Tegrarcmgui
C++ GUI for TegraRcmSmash (Fusée Gelée exploit for Nintendo Switch)
Stars: ✭ 965 (+1755.77%)
Mutual labels:  payload
Sql Injection Payload List
🎯 SQL Injection Payload List
Stars: ✭ 716 (+1276.92%)
Mutual labels:  payload
Pupy
Pupy is an opensource, cross-platform (Windows, Linux, OSX, Android) remote administration and post-exploitation tool mainly written in python
Stars: ✭ 6,737 (+12855.77%)
Mutual labels:  payload
Ssti Payload
SSTI Payload Generator
Stars: ✭ 26 (-50%)
Mutual labels:  payload
Brutal
Payload for teensy like a rubber ducky but the syntax is different. this Human interfaes device ( HID attacks ). Penetration With Teensy . Brutal is a toolkit to quickly create various payload,powershell attack , virus attack and launch listener for a Human Interface Device ( Payload Teensy )
Stars: ✭ 678 (+1203.85%)
Mutual labels:  payload
Pysploit
Remote exploitation framework written in Python
Stars: ✭ 37 (-28.85%)
Mutual labels:  payload
Openhashtab
📝 File hashing and checking shell extension
Stars: ✭ 599 (+1051.92%)
Mutual labels:  checksum
Distorm
Powerful Disassembler Library For x86/AMD64
Stars: ✭ 829 (+1494.23%)
Mutual labels:  disassembly
Exploit Discord Cache System Poc
Exploit Discord's cache system to remote upload payloads on Discord users machines
Stars: ✭ 51 (-1.92%)
Mutual labels:  payload
Phantom Evasion
Python antivirus evasion tool
Stars: ✭ 997 (+1817.31%)
Mutual labels:  payload
Gensum
Powerful checksum generator!
Stars: ✭ 12 (-76.92%)
Mutual labels:  checksum

tar-split

Build Status Go Report Card

Pristinely disassembling a tar archive, and stashing needed raw bytes and offsets to reassemble a validating original archive.

Docs

Code API for libraries provided by tar-split:

Install

The command line utilitiy is installable via:

go get github.com/vbatts/tar-split/cmd/tar-split

Usage

For cli usage, see its README.md. For the library see the docs

Demo

Basic disassembly and assembly

This demonstrates the tar-split command and how to assemble a tar archive from the tar-data.json.gz

basic cmd demo thumbnail youtube video of basic command demo

Docker layer preservation

This demonstrates the tar-split integration for docker-1.8. Providing consistent tar archives for the image layer content.

docker tar-split demo youtube vide of docker layer checksums

Caveat

Eventually this should detect TARs that this is not possible with.

For example stored sparse files that have "holes" in them, will be read as a contiguous file, though the archive contents may be recorded in sparse format. Therefore when adding the file payload to a reassembled tar, to achieve identical output, the file payload would need be precisely re-sparsified. This is not something I seek to fix immediately, but would rather have an alert that precise reassembly is not possible. (see more http://www.gnu.org/software/tar/manual/html_node/Sparse-Formats.html)

Other caveat, while tar archives support having multiple file entries for the same path, we will not support this feature. If there are more than one entries with the same path, expect an err (like ErrDuplicatePath) or a resulting tar stream that does not validate your original checksum/signature.

Contract

Do not break the API of stdlib archive/tar in our fork (ideally find an upstream mergeable solution).

Std Version

The version of golang stdlib archive/tar is from go1.11 It is minimally extended to expose the raw bytes of the TAR, rather than just the marshalled headers and file stream.

Design

See the design.

Stored Metadata

Since the raw bytes of the headers and padding are stored, you may be wondering what the size implications are. The headers are at least 512 bytes per file (sometimes more), at least 1024 null bytes on the end, and then various padding. This makes for a constant linear growth in the stored metadata, with a naive storage implementation.

First we'll get an archive to work with. For repeatability, we'll make an archive from what you've just cloned:

git archive --format=tar -o tar-split.tar HEAD .
$ go get github.com/vbatts/tar-split/cmd/tar-split
$ tar-split checksize ./tar-split.tar
inspecting "tar-split.tar" (size 210k)
 -- number of files: 50
 -- size of metadata uncompressed: 53k
 -- size of gzip compressed metadata: 3k

So assuming you've managed the extraction of the archive yourself, for reuse of the file payloads from a relative path, then the only additional storage implications are as little as 3kb.

But let's look at a larger archive, with many files.

$ ls -sh ./d.tar
1.4G ./d.tar
$ tar-split checksize ~/d.tar 
inspecting "/home/vbatts/d.tar" (size 1420749k)
 -- number of files: 38718
 -- size of metadata uncompressed: 43261k
 -- size of gzip compressed metadata: 2251k

Here, an archive with 38,718 files has a compressed footprint of about 2mb.

Rolling the null bytes on the end of the archive, we will assume a bytes-per-file rate for the storage implications.

uncompressed compressed
~ 1kb per/file 0.06kb per/file

What's Next?

  • More implementations of storage Packer and Unpacker
  • More implementations of FileGetter and FilePutter
  • would be interesting to have an assembler stream that implements io.Seeker

License

See LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].