summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarlinski2016-08-19 11:39:39 +0200
committerMarlinski2016-08-19 11:39:39 +0200
commitfd419f4bba33784ef9367937d5e3afc215ff25c5 (patch)
tree54baae072d2c0b382936f22bc5d5edac263ae9d6
downloadaur-fd419f4bba33784ef9367937d5e3afc215ff25c5.tar.gz
added PKGBUILD for sslsniff
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD39
-rw-r--r--fix_asio.patch113
3 files changed, 173 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f68b1c989d7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = sslsniff
+ pkgdesc = A tool for automated MITM attacks on SSL connections
+ pkgver = 0.8
+ pkgrel = 1
+ url = http://www.thoughtcrime.org/software/sslsniff/
+ arch = any
+ license = GPL3
+ depends = log4cpp
+ depends = asio
+ depends = boost
+ depends = boost-libs
+ depends = openssl
+ provides = sslsniff
+ conflicts = sslsniff
+ source = git://github.com/moxie0/sslsniff.git
+ source = fix_asio.patch
+ sha512sums = SKIP
+ sha512sums = 580280a8b4110bd194f84a817060da5281c33783e2925583617cfa7847fd276457f6a3ebd5a918f5a0682d3f9e362f0c801cb9f1b73f850e3b52e98b66e1f2ed
+
+pkgname = sslsniff
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fa63dd5340e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Lucien LOISEAU (Marlinski) <marlinski@disruptedsystems.org>
+
+pkgname=sslsniff
+pkgver=0.8
+pkgrel=1
+pkgdesc='A tool for automated MITM attacks on SSL connections'
+arch=('any')
+url='http://www.thoughtcrime.org/software/sslsniff/'
+license=('GPL3')
+depends=(log4cpp asio boost boost-libs openssl)
+makedepend=(base-devel git)
+conflicts=(sslsniff)
+provides=(sslsniff)
+
+source=(git://github.com/moxie0/sslsniff.git
+ fix_asio.patch)
+sha512sums=('SKIP'
+ 580280a8b4110bd194f84a817060da5281c33783e2925583617cfa7847fd276457f6a3ebd5a918f5a0682d3f9e362f0c801cb9f1b73f850e3b52e98b66e1f2ed)
+
+prepare() {
+ cd ${pkgname}
+ patch -p1 < ../fix_asio.patch
+}
+
+build() {
+ cd ${pkgname}
+ aclocal
+ autoconf
+ automake --add-missing
+ ./configure
+ make
+ g++ -ggdb -g -O2 -lpthread -lboost_thread -llog4cpp -o sslsniff SSLConnectionManager.o Destination.o FirefoxUpdater.o Logger.o SessionCache.o SSLBridge.o HTTPSBridge.o sslsniff.o FingerprintManager.o AuthorityCertificateManager.o TargetedCertificateManager.o CertificateManager.o HttpBridge.o HttpConnectionManager.o HttpHeaders.o UpdateManager.o OCSPDenier.o FirefoxAddonUpdater.o -lssl -lboost_filesystem -lboost_system -lcrypto
+}
+
+package() {
+ cd ${pkgname}
+ install -Dm 755 sslsniff "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm 644 README "${pkgdir}/usr/share/doc/${pkgname}/README"
+}
diff --git a/fix_asio.patch b/fix_asio.patch
new file mode 100644
index 00000000000..7317af3ffb1
--- /dev/null
+++ b/fix_asio.patch
@@ -0,0 +1,113 @@
+diff --git a/Makefile.am b/Makefile.am
+index 27b2ce5..a32c17f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4,6 +4,6 @@ bin_PROGRAMS = sslsniff
+
+ sslsniff_SOURCES = Bridge.hpp SSLConnectionManager.cpp FingerprintManager.hpp FirefoxAddonUpdater.hpp FirefoxUpdater.hpp HTTPSBridge.hpp Logger.hpp RawBridge.hpp SessionCache.hpp SSLBridge.hpp SSLConnectionManager.hpp sslsniff.hpp UpdateManager.hpp certificate/AuthorityCertificateManager.hpp certificate/Certificate.hpp certificate/CertificateManager.hpp certificate/TargetedCertificateManager.hpp http/HttpBridge.hpp http/HttpConnectionManager.hpp http/HttpHeaders.hpp http/OCSPDenier.hpp util/Destination.cpp util/Destination.hpp util/Util.hpp FirefoxUpdater.cpp Logger.cpp SessionCache.cpp SSLBridge.cpp HTTPSBridge.cpp sslsniff.cpp FingerprintManager.cpp certificate/AuthorityCertificateManager.cpp certificate/TargetedCertificateManager.cpp certificate/CertificateManager.cpp http/HttpBridge.cpp http/HttpConnectionManager.cpp http/HttpHeaders.cpp UpdateManager.cpp http/OCSPDenier.cpp FirefoxAddonUpdater.cpp
+
+-sslsniff_LDFLAGS = -lssl -lboost_filesystem -lpthread -lboost_thread -llog4cpp
++sslsniff_LDFLAGS = -lssl -lcrypto -lboost_filesystem -lboost_system -lpthread -lboost_thread -llog4cpp
+
+ EXTRA_DIST = certs/wildcard IPSCACLASEA1.crt leafcert.pem updates/Darwin_Universal-gcc3.xml updates/Linux_x86-gcc3.xml updates/WINNT_x86-msvc.xml
+diff --git a/SSLConnectionManager.cpp b/SSLConnectionManager.cpp
+index d7221cf..246070c 100644
+--- a/SSLConnectionManager.cpp
++++ b/SSLConnectionManager.cpp
+@@ -44,7 +44,7 @@ SSLConnectionManager::SSLConnectionManager(io_service &io_service,
+ }
+
+ void SSLConnectionManager::acceptIncomingConnection() {
+- boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor.io_service()));
++ boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor.get_io_service()));
+
+ acceptor.async_accept(*socket, boost::bind(&SSLConnectionManager::handleClientConnection,
+ this, socket, placeholders::error));
+@@ -76,7 +76,7 @@ void SSLConnectionManager::shuttleConnection(boost::shared_ptr<ip::tcp::socket>
+ ip::tcp::endpoint &destination)
+
+ {
+- Bridge::ptr bridge = RawBridge::create(clientSocket, destination, acceptor.io_service());
++ Bridge::ptr bridge = RawBridge::create(clientSocket, destination, acceptor.get_io_service());
+ bridge->shuttle();
+ }
+
+@@ -95,13 +95,13 @@ void SSLConnectionManager::interceptUpdate(boost::shared_ptr<ip::tcp::socket> cl
+ } catch (SSLConnectionError &error) {
+ std::stringstream errorStream;
+ errorStream << "Got exception: " << error.what();
+- std::string error = errorStream.str();
+- Logger::logError(error);
++ std::string errorstr = errorStream.str();
++ Logger::logError(errorstr);
+ } catch (FirefoxUpdateException &error) {
+ std::stringstream errorStream;
+ errorStream << "Got exception: " << error.what();
+- std::string error = errorStream.str();
+- Logger::logError(error);
++ std::string errorstr = errorStream.str();
++ Logger::logError(errorstr);
+ }
+ }
+
+@@ -120,13 +120,13 @@ void SSLConnectionManager::interceptAddon(boost::shared_ptr<ip::tcp::socket> cli
+ } catch (SSLConnectionError &error) {
+ std::stringstream errorStream;
+ errorStream << "Got exception: " << error.what();
+- std::string error = errorStream.str();
+- Logger::logError(error);
++ std::string errorstr = errorStream.str();
++ Logger::logError(errorstr);
+ } catch (FirefoxUpdateException &error) {
+ std::stringstream errorStream;
+ errorStream << "Got exception: " << error.what();
+- std::string error = errorStream.str();
+- Logger::logError(error);
++ std::string errorstr = errorStream.str();
++ Logger::logError(errorstr);
+ }
+ }
+
+@@ -134,7 +134,7 @@ void SSLConnectionManager::interceptSSL(boost::shared_ptr<ip::tcp::socket> clien
+ ip::tcp::endpoint &destination,
+ bool wildcardOK)
+ {
+- ip::tcp::socket serverSocket(acceptor.io_service());
++ ip::tcp::socket serverSocket(acceptor.get_io_service());
+ boost::system::error_code error;
+ serverSocket.connect(destination, error);
+
+@@ -151,9 +151,9 @@ void SSLConnectionManager::interceptSSL(boost::shared_ptr<ip::tcp::socket> clien
+ } catch (SSLConnectionError &error) {
+ std::stringstream errorStream;
+ errorStream << "Got exception: " << error.what();
+- std::string error = errorStream.str();
++ std::string errorstr = errorStream.str();
+
+- Logger::logError(error);
++ Logger::logError(errorstr);
+ }
+ }
+ }
+diff --git a/http/HttpConnectionManager.cpp b/http/HttpConnectionManager.cpp
+index 0ae72ae..9b1066c 100644
+--- a/http/HttpConnectionManager.cpp
++++ b/http/HttpConnectionManager.cpp
+@@ -53,7 +53,7 @@ HttpConnectionManager::HttpConnectionManager(io_service& io_service, int port,
+ }
+
+ void HttpConnectionManager::acceptIncomingConnection() {
+- boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor_.io_service()));
++ boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor_.get_io_service()));
+
+ acceptor_.async_accept(*socket, boost::bind(&HttpConnectionManager::handleClientConnection,
+ this, socket, placeholders::error));
+@@ -63,7 +63,7 @@ void HttpConnectionManager::acceptIncomingConnection() {
+ void HttpConnectionManager::bridgeHttpRequest(boost::shared_ptr<ip::tcp::socket> socket,
+ ip::tcp::endpoint destination)
+ {
+- Bridge::ptr bridge = HttpBridge::create(socket, acceptor_.io_service(),
++ Bridge::ptr bridge = HttpBridge::create(socket, acceptor_.get_io_service(),
+ FingerprintManager::getInstance());
+
+ bridge->getServerSocket().