Sun, 19 Feb 2017
Hello friends.
While the overall telos of this blog is to, generally speaking, convey code snippets and inspire the personal projects of others, today we’re going to do something a smidgeon different.
This will be a layman’s look at varied dimensions of information security from a comfortable distance. Over the years, I’ve secured servers, operating systems, medical data, networks, communications and I’ve unsecured many of these same things. The topics are too sprawling to be covered in a quick summary — but let’s find a point of entry.
Those of us who are passionate about information security are well aware of how daunting is the situation. For newcomers, it sometimes seems rather impossible. Pick any subject and there are probably well-informed and convincing experts in diametric equidistance from any “happy medium”.
Let’s imagine that (like most of us) you don’t have anything spectacular to protect. However, you dislike the idea of our ever-dissolving privacy. Therefore you want to encrypt communications. Maybe you begin to use Signal. However, there are criticisms that there is a “backdoor” (there is not). Further, there are accusations that open source projects are coded by those who can’t get real jobs. Conversely, open source projects are widely open for peer review. If it worries one enough they are free to review code themselves.
PGP can encrypt content but concerns surround algorithmic selections. Some are worried about metadata crumbs. Of course, there’s nothing preventing the frequent switching of keys and email addresses. You could use BitMessage, any number of chat solutions or drop at paste bins.
Let’s leave those concerns aside for when you’ve figured out what you’re intending to protect. These arguments surround any subject in information security and we’re not going to investigate them on a case by case basis. Least, not in this post.
At the coarsest granularity, the question is analogous to the practicality of locking your doors or sealing your post envelopes. Should I take measures toward privacy?
My opinion is rather predictable: of course you should!
There’s a very pragmatic explanation. If there ever comes a day when you should like to communicate privately, that’s a terrible time to start learning.
Take the easy road and start using some of the myriad tools and services available.
Should you decide to take InfoSec seriously, you’ll need to define a threat model.
That is: What am I protecting? From whom am I protecting? (e.g. what are probable attack vectors?)
That’s where you need to make choices about trusting products, protocols, methods, algorithms, companies, servers, et cet. Those are all exciting subjects to explore but all too often brushing up against them can be exasperating and cause premature burn-out.
That in mind, let’s employ the philosophy that any effort toward security is better than none and take a look at a few points where one might get wetted-toes.
If you have questions or want specific advice, there are several ways below to initiate a secure conversation with me.
Secure your browser:
Privacy Badger: Block tracking
HTTPS Everywhere: Increase your encryptioning
uBlock: Advertisements are for others
Secure communications:
Mailvelope: PGP email encryption for your major webmail provider (e.g., Gmail) | contact | pubkey
Tutanota: Encrypted webmail | Kontakt
Protonmail: Well-established provider of PGP encrypted webmail, featuring 2FA | kontakta
BitMessage: P2P encrypted communications protocol | contact: BM-2D9tDkYEJSTnEkGDKf7xYA5rUj2ihETxVR | Bitmessage channel list
[
Bitmessage in a Docker container ]
BitMessage.ch: BitMessage email gateway | contact
BitMsg.me: Online BitMessage service
Keybase.io: Keybase maps your identity to your public keys, and vice versa
Signal: PGP encrypted TXT messages
Wire: Encrypted chat, video and calls
RIOT: Open-source, IRC-based, Matrix; run your own server
Wickr: Encrypted ephemeral chat
[
n.b. Wickr’s .deb package seeks a unicode library (libicu52) which is not available to a recent Kali (or anything) install; .deb file is based on Ubuntu’s 2014 LTS release. Wickr in a Docker container ]
Explore alternate nets (e.g., Deep Web, Dark Net):
MaidSafe: Promising new alt-web project
Qubes: a reasonably secure operating system
FreeNet: Alt-net based primarily on already knowing with whom you intend to collaborate
Bitmask: VPN solution to anonymize your traffic
TAILS: A live operating system based on the Tor network
TorBrowser: Stand-alone browser for Tor (less secure than TAILS)
Whonix: the most secure (and complex) way to access the Tor network
i2p: an other approach to creating a secure and private alternate web
Morph.is: fun alt-net, aimed at producing The World Brain. Although, it’s future looks a lot less promising since the lead dev was killed.
ZeroNet: one more encrypted anonymous net
Have fun and compute safely!
Tags: 2FA, Bitmask, BitMessage, chat, EFF, encryption, FreeNet, HTTPS Everywhere, i2p, infosec, Kali, Keybase, MaidSafe, Mailvelope, Morph.is, paste bin, PGP, privacy, Privacy Badger, Protonmail, pubkey, Qubes, Signal, snarf.info, TAILS, threat model, TorBrowser, Tutanota, uBlock, Ubuntu, WhisperSystems, Whonix, Wickr, ZeroNet
Permalink: 20170219.privacy.prespective.primer
Tue, 10 Jan 2017
Mucking about with a fresh copy of Kali brings to attention that it’s packaged with an Armitage that doesn’t correctly work.
I know what you’re thinking… Good. Type the commands into Msfconsole like a real man, y’uh lazy good-fer-naught! And, in practice, that was my immediate solution. But I can’t resist a good tinker when things are misbehaving.
I was anticipating that the problem would be thoroughly solved when I ixquicked it. That was partially correct. Surprised, however, when apt-get update && apt-get upgrade
didn’t fix the issue. More surprised at the age of the issue. Most surprised that I could see lots of evidence that users have been plagued by this issue — but no clear work arounds were quickly found.
Guess what we’re doing today?
Okay. The issue is quite minor but just enough to be heartbreaking to the fledgling pentester trying to get a VM off the ground.
In brief, the owner of Armitage’s Github explains:
The MSF Scans feature in Armitage parses output from Metasploit’s portscan/tcp module and uses these results to build a list of targets it should run various Metasploit auxiliary modules against. A recent-ish update to the Metasploit Framework changed the format of the portscan/tcp module output. A patch to fix this issue just needs to account for the new format of the portscan/tcp module.
That is, a colon makes it into the input for the Msfconsole command to define RHOSTS. I.e.: set RHOSTS 172.16.223.150: - 172.16.223.150
An other kind coder tweaked the regex and submitted the patch and pull request, which was successfully incorporated into the project.
Sadly, things have stalled out there. So if this problem is crippling your rig, let’s fix it!
We just want a fresh copy of the project.
root@kali:~/armitage# git clone https://github.com/rsmudge/armitage
Cloning into ‘armitage’…
remote: Counting objects: 7564, done.
remote: Total 7564 (delta 0), reused 0 (delta 0), pack-reused 7564
Receiving objects: 100% (7564/7564), 47.12 MiB | 2.91 MiB/s, done.
Resolving deltas: 100% (5608/5608), done.
Kali is Debian-based and we’re going to need Apache Ant:
root@kali:~/armitage# apt-get install ant
Then, we’ll build our new fella:
root@kali:~/armitage# cd armitage
root@kali:~/armitage# ./package.sh
Buildfile: /root/test/armitage/build.xml
clean:
BUILD SUCCESSFUL
Total time: 0 seconds
Buildfile: /root/test/armitage/build.xml
init:
[mkdir] Created dir: /root/test/armitage/bin
compile:
[javac] Compiling 111 source files to /root/test/armitage/bin
[javac] depend attribute is not supported by the modern compiler
[javac] Note: /root/test/armitage/src/ui/MultiFrame.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
BUILD SUCCESSFUL
Total time: 2 seconds
Buildfile: /root/test/armitage/build.xml
init:
compile:
jar:
[unzip] Expanding: /root/test/armitage/lib/sleep.jar into /root/test/armitage/bin
[unzip] Expanding: /root/test/armitage/lib/jgraphx.jar into /root/test/armitage/bin
[unzip] Expanding: /root/test/armitage/lib/msgpack-0.6.12-devel.jar into /root/test/armitage/bin
[unzip] Expanding: /root/test/armitage/lib/postgresql-9.1-901.jdbc4.jar into /root/test/armitage/bin
[unzip] Expanding: /root/test/armitage/lib/javassist-3.15.0-GA.jar into /root/test/armitage/bin
[copy] Copying 4 files to /root/test/armitage/bin/scripts-cortana
[jar] Building jar: /root/test/armitage/armitage.jar
[jar] Building jar: /root/test/armitage/cortana.jar
BUILD SUCCESSFUL
Total time: 1 second
armitage/
armitage/readme.txt
armitage/teamserver
armitage/cortana.jar
armitage/armitage.jar
armitage/armitage-logo.png
armitage/armitage
armitage/whatsnew.txt
adding: readme.txt (deflated 55%)
adding: armitage.exe (deflated 49%)
adding: cortana.jar (deflated 5%)
adding: armitage.jar (deflated 5%)
adding: whatsnew.txt (deflated 65%)
armitage/
armitage/readme.txt
armitage/teamserver
armitage/cortana.jar
armitage/armitage.jar
armitage/armitage-logo.png
armitage/armitage
armitage/whatsnew.txt
Archive: ../../armitage.zip
inflating: readme.txt
inflating: armitage.exe
inflating: cortana.jar
inflating: armitage.jar
inflating: whatsnew.txt
And here, best I can guess from messages read, is where a lot of people are running into trouble. We have successfully produced our new working copy of armitage. However, it is in our own local directory and will not be run if we just enter the command: armitage
Let’s review how to figure out what we want to do about that.
First, we want to verify what happens when we run the command armitage
.
root@kali:~/armitage# which armitage
/usr/bin/armitage
Good! Let’s check and see what that does!
root@kali:~/armitage# head /usr/bin/armitage
#!/bin/sh
cd /usr/share/armitage/
exec ./armitage “$@”
Almost there! It’s running /usr/share/armitage/armitage
with whatever variables we’ve passed in. We’ll check that out.
root@kali:~/armitage# head /usr/share/armitage/armitage
#!/bin/sh
java -XX:+AggressiveHeap -XX:+UseParallelGC -jar armitage.jar $@
We have enough information to assemble a solution.
I trust that the people behind Kali and Armitage will get this corrected so I don’t want to suggest a solution that would replace the armitage
command and prevent an updated version from running later. So, let’s just make a temporary replacement?
root@kali:~/armitage# echo -e '#!/bin/sh\njava -XX:+AggressiveHeap -XX:+UseParallelGC -jar ~/armitage/armitage.jar $@' > /usr/bin/tmparmitage
Hereafter, we can use the command ‘tmparmitage’ (either CLI or ALT-F2) to run our fresh version until things catch up.
And, of course, to save you the time, weary hacker:
Download here:
armitage_quick_fix.sh
Tags: Ant, Armitage, Debian
, Java, Kali, Metasploit, Msfconsole, regex
Permalink: 20170110.armitage.not.working.in.kali
Tue, 20 Dec 2016
Some time ago I had begun work on my own Pastebin-type project with a few goals. Basically, I wanted to eat all the cakes — and have them too.
Both an online user interface and efficient CLI usage
Messages encrypted immediately such that database access does not provide one with the contents of the messages
Messages capable of self-destructing
Database schema that would allow rebuilding the user/message relationship, provided the same password but would not store those relationships
Also, JavaScript encryption to appeal to users who don’t know much about cryptography but would like to try
The project, honestly, was going swimmingly when derailed by the goings-on of life.
One of the interesting components of the project was, of course, choosing crypto implementations. There are know shortcomings to handling it in JS but that’s still the most convenient for some users. Outside of the browser, server-side, you had all the same questions about which solution was best. Which protocol(s) should be available?
Well, I’ve just learned about a project which I would have loved to have available back then. Project Wycheproof can help you test your crypto solutions against known problems and attacks. Featuring 80 tests probing at 40 known bugs, here’s a snip from the introduction:
Project Wycheproof has tests for the most popular crypto algorithms, including
AES-EAXAES-GCM
AES-GCM
DH
DHIES
DSA
ECDH
ECDSA
ECIES
RSA
The tests detect whether a library is vulnerable to many attacks, including
Invalid curve attacks
Biased nonces in digital signature schemes
Of course, all Bleichenbacher’s attacks
And many more — we have over 80 test cases
Interesting stuff with exciting potential!
Tags: Bazel, Cryptography, Java
Permalink: 20161220.kicking.the.crypto.tires
Thu, 30 May 2013
In this writer’s opinion, it is vitally important that we take reasonable measures now to help insure anonymity, lest we create a situation where privacy no longer exists, and the simple want of, becomes suspicious.
Here’s how to configure your browser to automatically use a search engine that respects your privacy.
Chrome:
- Click Settings.
- Click “Set pages” in the “On startup” section.
- Enter
https://ixquick.com/eng/
in the “Add a new page” text field.
- Click OK.
- Click “Manage search engines…”
- At the bottom of the “Search Engines” dialog, click in the “Add a new search engine” field.
- Enter
ixquick
ixquick.com
https://ixquick.com/do/search?lui=english&language=english&cat=web&query=%s
- Click “Make Default”.
- Click “Done”.
Firefox:
- Click the Tools Menu.
- Click Options.
- Click the General tab.
- In “When Firefox Starts” dropdown, select “Show my home page”.
- Enter
https://ixquick.com/eng/
in the “Home Page” text field.
- Click one of the English options here.
- Check box for “Start using it right away.”
- Click “Add”.
Opera:
- Click “Manage Search Engines
- Click “Add”
- Enter
Name: ixquick
Keyword: x
Address: https://ixquick.com/do/search?lui=english&language=english&cat=web&query=%s
- Check “Use as default search engine”
- Click “OK”
Internet Explorer:
_ ___ _ __ ___ _ _____ ___
| | / _ \| |\ \ / / | | |_ _|__ \
| | | | | | | \ \ /\ / /| | | | | | / /
| |__| |_| | |__\ V V / | |_| | | | |_|
|_____\___/|_____\_/\_/ \___/ |_| (_)
(This is not a good strategy for privacy.)
Congratulations!
\o/
You are now one step closer to not having every motion on the Internet recorded.
This is a relatively small measure, though. You can improve your resistance to prying eyes (e.g., browser fingerprinting) by using the Torbrowser Bundle, or even better, Tails, and routing your web usage through Tor, i2p, or FreeNet.
If you would like more on subjects like anonymyzing, privacy and security then drop me a line via email or Bitmessage me: BM-2D9tDkYEJSTnEkGDKf7xYA5rUj2ihETxVR
Tags: \o/, anonymous, Chrome, Firefox, FreeNet, i2p, ixquick, LOLWUT, Opera, privacy, security, Tails, Tor, TorBrowser, TorBrowser-Bundle
Permalink: 20130530.hey.you.get.offa.my.data