forked from gabiufrj/STAG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
2,759 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## STAG Suite Tools | ||
|
||
### About | ||
|
||
This is a suite that has two associated projects, one intended for Steganography - STAG hide, and other intended for Steganalysis - STAG find. They were developed using C++ and the Qt suite, the 4.8 version. | ||
|
||
**Disclaimer:** | ||
This was a project I done when I was an undergrad student researcher at GRIS, the CSIRT (Computer Security Incident Response Team) of UFRJ (Federal University of Rio de Janeiro - Brazil). This project works fine and achieved its purpose of making me understand Steganography and Steganalysis. Even though there's a lot of work that could be done to add new methods and improve the steganalysis tool overall, I don't plan on improving this project anytime soon because I don't quite have the time currently. The tools were made in Portuguese, but I guess it is pretty straight-forward for anyone interested in using it. | ||
|
||
### STAG hide | ||
|
||
This was the project related to the Steganography part, where I wanted to hide information in images. I use the LSB filter, which stands for Least Significant Bits. This means that, for every pixel in a chosen image, I use the *n* least significant bits for its color components (red, blue and green) to hide some information, where *n* is a number input by the user. In a practical perspective, this means that when *n* is up to 3, I change each color component of a pixel in a maximum absolute value of 8, which is pretty much imperceptible if you are not comparing the result image to the original very closely. And even with a lower *n* (most of the time 1 is enough), you can write a lot of info in an image. | ||
|
||
With n equals to 1, you can write 3 bits per pixel, which roughly translates to 1 byte every 3 pixels. In unicode, each char uses 1 byte, so even a low resolution image can store a lot of information. | ||
|
||
For simplicity, I only allow the user to hide text inputs, but I store them as bits, so I could store anything actually, but the user interface would get more complex and I was still trying to fully grasp what I could learn of Steganography. | ||
|
||
I also write the length of the hidden info in the first pixel of the message hiding, so I can read that more easily from the *STAG find*, but that might not have been the best solution. | ||
|
||
### STAG find | ||
|
||
This was the Steganalysis counter-part. But it is not really an analysis tool, it is a reader for when the user already knows at what pixel the message starts, and the number of bits used for the LSB algorithm. It works like that, but it could be more aggressive in the *analysis* part, like trying to infer the initial pixel and number of bits by reading the pixels of the image. Or just outputting some possibilities for the user so he could make an educated guess. But I never got to really work on that part =(. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/**************************************************************************** | ||
** Meta object code from reading C++ file 'mainwindow.h' | ||
** | ||
** Created: Wed 3. Oct 23:54:06 2012 | ||
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1) | ||
** | ||
** WARNING! All changes made in this file will be lost! | ||
*****************************************************************************/ | ||
|
||
#include "../../Projeto-Gris-Esteganalise/mainwindow.h" | ||
#if !defined(Q_MOC_OUTPUT_REVISION) | ||
#error "The header file 'mainwindow.h' doesn't include <QObject>." | ||
#elif Q_MOC_OUTPUT_REVISION != 63 | ||
#error "This file was generated using the moc from 4.8.1. It" | ||
#error "cannot be used with the include files from this version of Qt." | ||
#error "(The moc has changed too much.)" | ||
#endif | ||
|
||
QT_BEGIN_MOC_NAMESPACE | ||
static const uint qt_meta_data_MainWindow[] = { | ||
|
||
// content: | ||
6, // revision | ||
0, // classname | ||
0, 0, // classinfo | ||
3, 14, // methods | ||
0, 0, // properties | ||
0, 0, // enums/sets | ||
0, 0, // constructors | ||
0, // flags | ||
0, // signalCount | ||
|
||
// slots: signature, parameters, type, tag, flags | ||
12, 11, 11, 11, 0x08, | ||
46, 11, 11, 11, 0x08, | ||
73, 11, 11, 11, 0x08, | ||
|
||
0 // eod | ||
}; | ||
|
||
static const char qt_meta_stringdata_MainWindow[] = { | ||
"MainWindow\0\0on_actionAbrir_Imagem_triggered()\0" | ||
"on_actionAjuda_triggered()\0" | ||
"on_btnAnalisar_clicked()\0" | ||
}; | ||
|
||
void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
Q_ASSERT(staticMetaObject.cast(_o)); | ||
MainWindow *_t = static_cast<MainWindow *>(_o); | ||
switch (_id) { | ||
case 0: _t->on_actionAbrir_Imagem_triggered(); break; | ||
case 1: _t->on_actionAjuda_triggered(); break; | ||
case 2: _t->on_btnAnalisar_clicked(); break; | ||
default: ; | ||
} | ||
} | ||
Q_UNUSED(_a); | ||
} | ||
|
||
const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = { | ||
0, qt_static_metacall | ||
}; | ||
|
||
const QMetaObject MainWindow::staticMetaObject = { | ||
{ &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow, | ||
qt_meta_data_MainWindow, &staticMetaObjectExtraData } | ||
}; | ||
|
||
#ifdef Q_NO_DATA_RELOCATION | ||
const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; } | ||
#endif //Q_NO_DATA_RELOCATION | ||
|
||
const QMetaObject *MainWindow::metaObject() const | ||
{ | ||
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; | ||
} | ||
|
||
void *MainWindow::qt_metacast(const char *_clname) | ||
{ | ||
if (!_clname) return 0; | ||
if (!strcmp(_clname, qt_meta_stringdata_MainWindow)) | ||
return static_cast<void*>(const_cast< MainWindow*>(this)); | ||
return QMainWindow::qt_metacast(_clname); | ||
} | ||
|
||
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
_id = QMainWindow::qt_metacall(_c, _id, _a); | ||
if (_id < 0) | ||
return _id; | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
if (_id < 3) | ||
qt_static_metacall(this, _c, _id, _a); | ||
_id -= 3; | ||
} | ||
return _id; | ||
} | ||
QT_END_MOC_NAMESPACE |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/**************************************************************************** | ||
** Meta object code from reading C++ file 'errordialog.h' | ||
** | ||
** Created: Wed 3. Oct 23:53:32 2012 | ||
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1) | ||
** | ||
** WARNING! All changes made in this file will be lost! | ||
*****************************************************************************/ | ||
|
||
#include "../../Projeto-Gris-Esteganografia/errordialog.h" | ||
#if !defined(Q_MOC_OUTPUT_REVISION) | ||
#error "The header file 'errordialog.h' doesn't include <QObject>." | ||
#elif Q_MOC_OUTPUT_REVISION != 63 | ||
#error "This file was generated using the moc from 4.8.1. It" | ||
#error "cannot be used with the include files from this version of Qt." | ||
#error "(The moc has changed too much.)" | ||
#endif | ||
|
||
QT_BEGIN_MOC_NAMESPACE | ||
static const uint qt_meta_data_ErrorDialog[] = { | ||
|
||
// content: | ||
6, // revision | ||
0, // classname | ||
0, 0, // classinfo | ||
1, 14, // methods | ||
0, 0, // properties | ||
0, 0, // enums/sets | ||
0, 0, // constructors | ||
0, // flags | ||
0, // signalCount | ||
|
||
// slots: signature, parameters, type, tag, flags | ||
13, 12, 12, 12, 0x08, | ||
|
||
0 // eod | ||
}; | ||
|
||
static const char qt_meta_stringdata_ErrorDialog[] = { | ||
"ErrorDialog\0\0on_buttonBox_accepted()\0" | ||
}; | ||
|
||
void ErrorDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
Q_ASSERT(staticMetaObject.cast(_o)); | ||
ErrorDialog *_t = static_cast<ErrorDialog *>(_o); | ||
switch (_id) { | ||
case 0: _t->on_buttonBox_accepted(); break; | ||
default: ; | ||
} | ||
} | ||
Q_UNUSED(_a); | ||
} | ||
|
||
const QMetaObjectExtraData ErrorDialog::staticMetaObjectExtraData = { | ||
0, qt_static_metacall | ||
}; | ||
|
||
const QMetaObject ErrorDialog::staticMetaObject = { | ||
{ &QDialog::staticMetaObject, qt_meta_stringdata_ErrorDialog, | ||
qt_meta_data_ErrorDialog, &staticMetaObjectExtraData } | ||
}; | ||
|
||
#ifdef Q_NO_DATA_RELOCATION | ||
const QMetaObject &ErrorDialog::getStaticMetaObject() { return staticMetaObject; } | ||
#endif //Q_NO_DATA_RELOCATION | ||
|
||
const QMetaObject *ErrorDialog::metaObject() const | ||
{ | ||
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; | ||
} | ||
|
||
void *ErrorDialog::qt_metacast(const char *_clname) | ||
{ | ||
if (!_clname) return 0; | ||
if (!strcmp(_clname, qt_meta_stringdata_ErrorDialog)) | ||
return static_cast<void*>(const_cast< ErrorDialog*>(this)); | ||
return QDialog::qt_metacast(_clname); | ||
} | ||
|
||
int ErrorDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
_id = QDialog::qt_metacall(_c, _id, _a); | ||
if (_id < 0) | ||
return _id; | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
if (_id < 1) | ||
qt_static_metacall(this, _c, _id, _a); | ||
_id -= 1; | ||
} | ||
return _id; | ||
} | ||
QT_END_MOC_NAMESPACE |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/**************************************************************************** | ||
** Meta object code from reading C++ file 'mainwindow.h' | ||
** | ||
** Created: Wed 3. Oct 23:53:31 2012 | ||
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1) | ||
** | ||
** WARNING! All changes made in this file will be lost! | ||
*****************************************************************************/ | ||
|
||
#include "../../Projeto-Gris-Esteganografia/mainwindow.h" | ||
#if !defined(Q_MOC_OUTPUT_REVISION) | ||
#error "The header file 'mainwindow.h' doesn't include <QObject>." | ||
#elif Q_MOC_OUTPUT_REVISION != 63 | ||
#error "This file was generated using the moc from 4.8.1. It" | ||
#error "cannot be used with the include files from this version of Qt." | ||
#error "(The moc has changed too much.)" | ||
#endif | ||
|
||
QT_BEGIN_MOC_NAMESPACE | ||
static const uint qt_meta_data_MainWindow[] = { | ||
|
||
// content: | ||
6, // revision | ||
0, // classname | ||
0, 0, // classinfo | ||
5, 14, // methods | ||
0, 0, // properties | ||
0, 0, // enums/sets | ||
0, 0, // constructors | ||
0, // flags | ||
0, // signalCount | ||
|
||
// slots: signature, parameters, type, tag, flags | ||
12, 11, 11, 11, 0x08, | ||
37, 11, 11, 11, 0x08, | ||
71, 11, 11, 11, 0x08, | ||
106, 11, 11, 11, 0x08, | ||
138, 133, 11, 11, 0x08, | ||
|
||
0 // eod | ||
}; | ||
|
||
static const char qt_meta_stringdata_MainWindow[] = { | ||
"MainWindow\0\0on_btnEsconder_clicked()\0" | ||
"on_actionAbrir_Imagem_triggered()\0" | ||
"on_actionSalvar_Imagem_triggered()\0" | ||
"on_actionAjuda_triggered()\0arg1\0" | ||
"on_sbNumBits_valueChanged(int)\0" | ||
}; | ||
|
||
void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
Q_ASSERT(staticMetaObject.cast(_o)); | ||
MainWindow *_t = static_cast<MainWindow *>(_o); | ||
switch (_id) { | ||
case 0: _t->on_btnEsconder_clicked(); break; | ||
case 1: _t->on_actionAbrir_Imagem_triggered(); break; | ||
case 2: _t->on_actionSalvar_Imagem_triggered(); break; | ||
case 3: _t->on_actionAjuda_triggered(); break; | ||
case 4: _t->on_sbNumBits_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; | ||
default: ; | ||
} | ||
} | ||
} | ||
|
||
const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = { | ||
0, qt_static_metacall | ||
}; | ||
|
||
const QMetaObject MainWindow::staticMetaObject = { | ||
{ &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow, | ||
qt_meta_data_MainWindow, &staticMetaObjectExtraData } | ||
}; | ||
|
||
#ifdef Q_NO_DATA_RELOCATION | ||
const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; } | ||
#endif //Q_NO_DATA_RELOCATION | ||
|
||
const QMetaObject *MainWindow::metaObject() const | ||
{ | ||
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; | ||
} | ||
|
||
void *MainWindow::qt_metacast(const char *_clname) | ||
{ | ||
if (!_clname) return 0; | ||
if (!strcmp(_clname, qt_meta_stringdata_MainWindow)) | ||
return static_cast<void*>(const_cast< MainWindow*>(this)); | ||
return QMainWindow::qt_metacast(_clname); | ||
} | ||
|
||
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
_id = QMainWindow::qt_metacall(_c, _id, _a); | ||
if (_id < 0) | ||
return _id; | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
if (_id < 5) | ||
qt_static_metacall(this, _c, _id, _a); | ||
_id -= 5; | ||
} | ||
return _id; | ||
} | ||
QT_END_MOC_NAMESPACE |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#------------------------------------------------- | ||
# | ||
# Project created by QtCreator 2012-04-19T19:01:33 | ||
# | ||
#------------------------------------------------- | ||
|
||
QT += core gui | ||
|
||
TARGET = Projeto-Gris-Esteganalise | ||
TEMPLATE = app | ||
|
||
|
||
SOURCES += main.cpp\ | ||
mainwindow.cpp \ | ||
algoritmos.cpp | ||
|
||
HEADERS += mainwindow.h \ | ||
algoritmos.h | ||
|
||
FORMS += mainwindow.ui |
Oops, something went wrong.