Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Repository files navigation

stegSecure

stegSecure is a software that intercepts new user files upon download, scans the images for LSB-steganography, and santizes them of hidden information if they are found to be steganographic.

stegSecure implements the Sample Pairs steganalysis algorithm, which returns a probability that a given image is steganographic (Dumitrescu 2002). stegSecure sanitizes the image if this probability is >50%.

**This version of stegSecure must be run on the Linux OS **

How to Run

Step 1: Clone Git Repository

Clone the following git repository with git clone https://github.com/standardrhyme/stegsecure.

Step 2: Begin stegSecure

Change the current directory into the recently cloned stegsecure folder. Start stegSecure with sudo go run main.go [MOUNTPATH].

Step 3: Download an image

Download an image from an Internet browser. stegSecure will automatically intercept, scan, and sanitize the file if needed.

Step 4: Terminate stegSecure

In a separate Terminal, run sudo umount MOUNTPATH.

Options

[MOUNTPATH]

Specifies the directory to mount over. This should be your Downloads folder, but can be any directory. If unspecified, it will default to the testdir/Downloads folder within the respository.

Screenshots

Running stegSecure without arguments:

image

Running stegSecure with specified directory:

image

Sample output when a steganographic (samplestego.png) and non-steganographic (samplesmaller.png) image are downloaded:

image

Terminating stegSecure:

image

Diagrams

General Workflow

image

File Interception Layers

image

File Sanitation via Bit Masking:

The LSB values of the steganographic image on top are all switched to 0, rendering the cleaned image below image

Features

image

Custom Data Structures

type FS struct {
	Debug      func(msg interface{})
	conn       *fuse.Conn
	mountpoint string
	binddir    string

	rootInum  Inum
	root      fs.Node
	nodes     map[Inum]*NodeAttr
	notifiers map[Inum]*func(Node)
	nextInum  Inum
	notifier  func(Node)

	nextPassInum Inum
	passNodes    map[Inum]*NodeAttr
}

type Node interface {
	fs.Node

	FS() *FS
	Inum() Inum
	Name() string
	SetName(newName string)
	Parent() *Dir
	SetParent(newDir *Dir)
	GetNode() (*NodeAttr, error)
	GetRelPath() string
	GetRealPath() string
	Passthrough() bool
}

type NodeAttr struct {
	fs   *FS
	attr fuse.Attr
}

type Dir struct {
	fs   *FS
	inum Inum

	name        string
	parent      *Dir
	children    map[string]Node
	passthrough bool
}

type File struct {
	fs   *FS
	inum Inum

	name   string
	parent *Dir
	data   []byte

	cleaned     bool
	passthrough bool
}

type FileHandle struct {
	*File
	passthroughHandle *os.File
}

Exit Codes

  • 0: Successful
  • 1: Incorrect command line input format
  • 2: External package function error

References

Dumitrescu, Sorina, Xiaolin Wu, and Zhe Wang (2002). “Detection of LSB steganography via sample pair analysis”. In: Signal Processing, IEEE Transactions on 51.7, pp. 1995–2007.

FUSE was used to build our virtual file interception feature.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages