Security of Information, Threat Intelligence, Hacking, Offensive Security, Pentest, Open Source, Hackers Tools, Leaks, Pr1v8, Premium Courses Free, etc

  • Penetration Testing Distribution - BackBox

    BackBox is a penetration test and security assessment oriented Ubuntu-based Linux distribution providing a network and informatic systems analysis toolkit. It includes a complete set of tools required for ethical hacking and security testing...
  • Pentest Distro Linux - Weakerth4n

    Weakerth4n is a penetration testing distribution which is built from Debian Squeeze.For the desktop environment it uses Fluxbox...
  • The Amnesic Incognito Live System - Tails

    Tails is a live system that aims to preserve your privacy and anonymity. It helps you to use the Internet anonymously and circumvent censorship...
  • Penetration Testing Distribution - BlackArch

    BlackArch is a penetration testing distribution based on Arch Linux that provides a large amount of cyber security tools. It is an open-source distro created specially for penetration testers and security researchers...
  • The Best Penetration Testing Distribution - Kali Linux

    Kali Linux is a Debian-based distribution for digital forensics and penetration testing, developed and maintained by Offensive Security. Mati Aharoni and Devon Kearns rewrote BackTrack...
  • Friendly OS designed for Pentesting - ParrotOS

    Parrot Security OS is a cloud friendly operating system designed for Pentesting, Computer Forensic, Reverse engineering, Hacking, Cloud pentesting...
Showing posts with label Anti-System. Show all posts
Showing posts with label Anti-System. Show all posts

Sunday, December 4, 2016

#Three Seconds


...





By OffSec 
Share:

Tuesday, November 1, 2016

Modern mass media manipulation methods are types of distraction - Media Manipulation






Media manipulation is a series of related techniques in which partisans create an image or argument that favours their particular interests. Such tactics may include the use of logical fallacies and propaganda techniques, and often involve the suppression of information or points of view by crowding them out, by inducing other people or groups of people to stop listening to certain arguments, or by simply diverting attention elsewhere. In Propaganda: The Formation of Men's Attitudes, Jacques Ellul writes that public opinion can only express itself through channels which are provided by the mass media of communication – without which there could be no propaganda. It is used within public relations, propaganda, marketing, etc. While the objective for each context is quite different, the broad techniques are often similar.

watch the video





By OffSec
Share:

Sunday, October 16, 2016

A bash script for anonymizing the public IP managing the connection to TOR and different VPNs providers - 4nonimizer


What is 4nonimizer?
It is a bash script for anonymizing the public IP used to browsing Internet, managing the connection to TOR network and to different VPNs providers (OpenVPN), whether free or paid. By default, it includes several pre-configured VPN connections to different peers (.ovpn files) and download the credentials. Also, it records each used IP that we use every 300 seconds in log files.
This script is enabled as a service in systemd systems and uses a default vpn (VPNBook) at system startup.

Installation
Download the repo using git, execute the command ./4nonimizer install in the directory, and follow the screen instructions, 4nonimizer will move to the directory /opt/ and installed as a service.
This script has full compatibility with Kali Linux, although it has been properly tested and should also work on other distributions like Debian, Ubuntu and Arch (Manjaro). However there could be some bugs, or unexpected performances (please comments if you find any!).

Options
Once installed 4nonymizer, enter the command 4nonimizer help to get the help, which shows all the available parameters:

Available VPNs
Currently it supports the following VPN providers:
- HideMyAss https://www.hidemyass.com/
- TorGuard https://torguard.net/
- VPNBook (by default) http://www.vpnbook.com/
- VPNGate http://www.vpngate.net/en/
- VPNMe https://www.vpnme.me/
- VPNKeys https://www.vpnkeys.com/

Install a new VPN
To install an additional vpn we have to use the following structure in order to the 4nonimizer be able to integrate and perform operations with it.
First, we have to create the following dir structure /vpn/ within 4nonimizer path:


In our example we create the folder /vpntest/ and within it placed all .ovpn files we have. If the files ovpn not have the certificate within each of them we put in the same folder as shown in the example certificate.crt .
In addition, we must place a file named pass.txt containing 2 lines: the first one with the username and the second one with the password, as shown below:


If we have correctly performed all steps when we execute the command 4nonimizer change_provider the menu will show our vpn:


As you can see in the picture, option [7] it is the vpn we've created.

Getting credencials and ovpn files automatically
If the VPN provider allows automation of credential and/or .ovpn files getting, 4nonimizer has standardized the following scripts names and locations:
- /opt/4nonimizer/vpn/provider/ vpn-get-pass.sh


- /opt/4nonimizer/vpn/provider/ vpn-get-ovpn.sh



4nonimizer automatically detect the presence of both scripts and indicate (Auto-pass Login) or (Auto-get OVPN) if applicable.



Extras
- Execute 'source 4nonimizer' to activate autocompletation of parameters.
- Copy .conkyrc in your home directory to load a 4nonimizer template and execute conky.

References
- http://www.hackplayers.com/2016/08/tuto-enmascarar-ip-linux-vpn-tor.html
- http://www.hackplayers.com/2016/10/4nonimizer-un-script-para-anonimizar-ip.html

Versions
- 1.0-beta codename .bye-world! 5/10/2016


Share:

Sunday, October 9, 2016

Transparent Proxy through TOR, I2P, Privoxy, Polipo and modify DNS - anonym8



Transparent Proxy through TOR, I2P, Privoxy, Polipo and modify DNS, for a simple and better privacy and security; Include Anonymizing Relay Monitor (arm), macchanger, hostname and wipe (Cleans ram/cache & swap-space) features. Tested on Debian, Kali, Parrot to use the graphical interface, you'll need to install separately GTKdialog and libvte.so.9 and i2p

Script requirements are:
  • Tor        
  • macchanger 
  • resolvconf 
  • dnsmasq    
  • polipo     
  • privoxy           
  • arm        
  • libnotify  
  • curl
  • bleachbit

they'll be automatically installed.
Open a root terminal and type:
cd anonym8_directory I.Ex: cd /home/toto/Desktop/anonym8-master
chmod +x INSTALL.sh
bash INSTALL.sh

you're done!

For more security, use Firefox!
here's some useful Firefox add on:
profil manager => https://ftp.mozilla.org/pub/utilities/profilemanager/1.0/
random agent spoofer => https://addons.mozilla.org/en-US/firefox/addon/random-agent-spoofer/  
no script => https://addons.mozilla.org/en-US/firefox/addon/noscript/
ublock origin => https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
HTTPS everywhere => https://addons.mozilla.org/fr/firefox/addon/https-everywhere/  

Reboot your system and enjoy!

@HiroshimanRise
#anonym8 (Privacy Friend)

Share:

Monday, September 19, 2016

Secure Anonymous File Sharing - OnionShare





OnionShare lets you securely and anonymously share files of any size. It works by starting a web server, making it accessible as a Tor onion service, and generating an unguessable URL to access and download the files. It doesn’t require setting up a server on the internet somewhere or using a third party filesharing service. You host the file on your own computer and use a Tor onion service to make it temporarily accessible over the internet. The other user just needs to use Tor Browser to download the file from you.

Features:
  • A user-friendly drag-and-drop graphical user interface that works in Windows, Mac OS X, and Linux
  • Ability to share multiple files and folders at once
  • Support for multiple people downloading files at once
  • Automatically copies the unguessable URL to your clipboard
  • Shows you the progress of file transfers
  • When file is done transferring, automatically closes OnionShare to reduce the attack surface
  • Localized into several languages, and supports international unicode filenames

When users want to send files, the program creates a password-protected, temporary website hosted on the Tor network—what’s known as a Tor Hidden Service—that runs on their computer. They provide the recipient with the URL and password for that site, preferably via a message encrypted with a tool like PGP or Off-The-Record encrypted instant messaging. The recipient visits that URL in a Tor Browser and downloads the file from that temporary, untraceable website, without needing to have a copy of Onionshare.

As soon as the person has downloaded the file, you can just cancel the web server and the file is no longer accessible to anyone.

"It’s basically 100 percent darknet."



How to Use

Before you can share files, you need to open Tor Browser in the background. This will provide the Tor service that OnionShare uses to start the onion service.

Open OnionShare and drag and drop files and folders you wish to share, and click Start Sharing. It will show you a .onion URL such as http://asxmi4q6i7pajg2b.onion/egg-cain and copy it to your clipboard. This is the secret URL that can be used to download the file you’re sharing. If you’d like multiple people to be able to download this file, uncheck the “close automatically” checkbox.

Send this URL to the person you’re trying to send the files to. If the files you’re sending aren’t secret, you can use normal means of sending the URL: emailing it, posting it to Facebook or Twitter, etc. If you’re trying to send secret files then it’s important to send this URL securely.

The person who is receiving the files doesn’t need OnionShare. All they need is to open the URL you send them in Tor Browser to be able to download the file.

Using the command line version

In Linux: Just run  onionshare from the terminal.
In Windows: Add C:\Program Files (x86)\OnionShare to your PATH. Now you can run onionshare.exe in a command prompt.
In Mac OS X: Run ln -s /Applications/OnionShare.app/Contents/MacOS/onionshare /usr/local/bin. Now you can run onionshare from the terminal.


Onionshare can be particularly useful when someone sending a file wants to remain anonymous even to the recipient. If whistleblowers can securely send an Onionshare URL and password to a journalist, they potentially could use it to leak secrets anonymously without being exposed. That flips the model of how Tor enables leaks: Sites like WikiLeaks and news organizations using the anonymous leak software SecureDrop host their own Tor Hidden Services. Onionshare could put more power in whistleblowers’ hands, helping them send secrets to journalists who don’t have that sort of anonymous submission system in place.

What it protects against

  • Third parties don’t have access to files being shared. The files are hosted directly on the sender’s computer and don’t get uploaded to any server. Instead, the sender’s computer becomes the server. Traditional ways of sending files, like in an email or using a cloud hosting service, require trusting the service with access to the files being shared.
  • Network eavesdroppers can’t spy on files in transit. Because connections between Tor onion services and Tor Browser are end-to-end encrypted, no network attackers can eavesdrop on the shared files while the recipient is downloading them. If the eavesdropper is positioned on the sender’s end, the recipient’s end, or is a malicious Tor node, they will only see Tor traffic. If the eavesdropper is a malicious rendezvous node used to connect the recipient’s Tor client with the sender’s onion service, the traffic will be encrypted using the onion service key.
  • Anonymity of sender and recipient are protected by Tor. OnionShare and Tor Browser protect the anonymity of the users. As long as the sender anonymously communicates the OnionShare URL with the recipient, the recipient and eavesdroppers can’t learn the identity of the sender.
  • If an attacker enumerates the onion service, the shared files remain safe. There have been attacks against the Tor network that can enumerate onion services. If someone discovers the .onion address of an OnionShare onion service, they still cannot download the shared files without knowing the slug. The slug is generated by choosing two random words from a list of 6800 words, meaning there are 6800^2, or about 46 million possible slugs. But they can only make 20 wrong guesses before OnionShare stops the server, preventing brute force attacks against the slug. The OnionShare server also checks request URIs using a constant time string comparison function, so timing attacks can’t be used to help guess the slug.

What it doesn’t protect against

  • Communicating the OnionShare URL might not be secure. The sender is responsible for securely communicating the OnionShare URL with the recipient. If they send it insecurely (such as through an email message, and their email is being monitored by an attacker), the eavesdropper will learn that they’re sending files with OnionShare. If the attacker loads the URL in Tor Browser before the legitimate recipient gets to it, they can download the files being shared. If this risk fits the sender’s threat model, they must find a more secure way to communicate the URL, such as in an encrypted email, chat, or voice call. This isn’t necessary in cases where the files being shared aren’t secret.
  • Communicating the OnionShare URL might not be anonymous. While OnionShare and Tor Browser allow for anonymously sending files, if the sender wishes to remain anonymous they must take extra steps to ensure this while communicating the OnionShare URL. For example, they might need to use Tor to create a new anonymous email or chat account, and only access it over Tor, to use for sharing the URL. This isn’t necessary in cases where there’s no need to protect anonymity, such as coworkers who know each other sharing work documents.

Building OnionShare

Start by getting a copy of the source code:
git clone https://github.com/micahflee/onionshare.git
cd onionshare
For .deb-based distros (like Debian, Ubuntu, Linux Mint):
Then install the needed dependencies:
sudo apt-get install -y python3-flask python3-stem python3-pyqt5 python-nautilus
After that you can try both the CLI and the GUI version of OnionShare:
./install/scripts/onionshare
./install/scripts/onionshare-gui
A script to build a .deb package and install OnionShare easily is also provided for your convenience:
sudo apt-get install -y build-essential fakeroot python3-all python3-stdeb dh-python python-nautilus
./install/build_deb.sh
sudo dpkg -i deb_dist/onionshare_*.deb
Note that OnionShare uses stdeb to generate Debian packages, and python3-stdeb is not available in Ubuntu 14.04 (Trusty). Because of this, you can’t use the build_install.sh script to build the .deb file in versions of Ubuntu 14.04 and earlier. However, .deb files you build in later versions of Ubuntu will install and work fine in 14.04.
For .rpm-based distros (Red Hat, Fedora, CentOS):
sudo sudo dnf install -y rpm-build python3-flask python3-stem python3-qt5 nautilus-python
./install/build_rpm.sh
sudo yum install -y dist/onionshare-*.rpm
Depending on your distribution, you may need to use yum instead of dnf.
For ArchLinux:
There is a PKBUILD available here that can be used to install OnionShare.



Share:

Friday, July 8, 2016

Anonymous Operating System - Whonix 13



Whonix is a desktop operating system designed for advanced security and privacy. It realistically addresses attacks while maintaining usability. It makes online anonymity possible via fail-safe, automatic, and desktop-wide use of the Tor network. A heavily reconfigured Debian base is run inside multiple virtual machines, providing a substantial layer of protection from malware and IP leaks. Pre-installed applications, pre-configured with safe defaults are ready for use. Additionally, installing custom applications or personalizing the desktop will in no way jeopardize the user. Whonix is the only actively developed OS designed to be run inside a VM and paired with Tor.

Whonix consists of two parts: One solely runs Tor and acts as a gateway, which we call Whonix-Gateway. The other, which we call Whonix-Workstation, is on a completely isolated network. Only connections through Tor are possible. With Whonix, you can use applications and run servers anonymously over the internet. DNS leaks are impossible, and not even malware with root privileges can find out the user's real IP.



 Whonix benefits anyone who does sensitive work on their desktop or online. This includes:
  • Investigators and whistleblowers whose work threatens the powerful.
    • Within an isolated environment, research and evidence can be gathered without accidental exposure.
  • Researchers, government officials, or businesspeople who may be targets of espionage.
    • Anti-malware and anti-exploit modifications lower the threat of trojans and backdoors.
  • Journalists who endanger themselves and their families by reporting on organized crime.
    • Compartmentalized, anonymous internet use prevents identity correlation between social media (and other) logins.
  • Political activists under targeted surveillance and attack.
    • The usefulness of threatening the ISP in order to analyze a target's internet use will be severely limited. The cost of targeting a Whonix user is greatly increased.
  • Average computer users in a repressive or censored environment.
    • Easy Tor setup (and options for advanced setups) gives users in repressive countries full internet access desktop-wide, not just in their browser.
  • Average computer users who simply don’t want all or some aspect of their private lives uploaded, saved, and analyzed.
    • Whonix does not silently upload identifying information in the background.

Qubes-Whonix:
Either start with fresh templates. I.e. uninstall qubes-template-whonix-gw and qubes-template-whonix-ws. Then, to install, run in dom0:
sudo qubes-dom0-update --enablerepo=qubes-tempates-community qubes-template-whonix-gw qubes-template-whonix-ws

Or you can also upgrade from Whonix’s repository. Please refer to the following instructions:
https://www.whonix.org/wiki/Upgrading_Whonix_12_to_Whonix_13


Non-Qubes-Whonix:

https://www.whonix.org/wiki/Download

Or you can also upgrade from Whonix’s repository. Please refer to the following instructions:
https://www.whonix.org/wiki/Upgrading_Whonix_12_to_Whonix_13

Whonix 12 -> 13 changes:
https://phabricator.whonix.org/maniphest/query/TfpGK0Sq8w1j/#R
Share:

Monday, June 27, 2016

The Amnesic Incognito Live System - Tails 2.4




Tails is a live system that aims to preserve your privacy and anonymity. It helps you to use the Internet anonymously and circumvent censorship almost anywhere you go and on any computer but leaving no trace unless you ask it to explicitly.

It is a complete operating system designed to be used from a DVD, USB stick, or SD card independently of the computer's original operating system. It is Free Software and based on Debian GNU/Linux.

Tails comes with several built-in applications pre-configured with security in mind: web browser, instant messaging client, email client, office suite, image and sound editor, etc.


New features

  • We enabled the automatic account configuration of Icedove which discovers the correct parameters to connect to your email provider based on your email address. We improved it to rely only on secure protocol and we are working on sharing these improvements with Mozilla so that users of Thunderbird outside Tails can benefit from them as well.

Upgrades and changes

  • Update Tor Browser to 6.0.1, based on Firefox 45.
  • Remove the preconfigured #tails IRC channel. Join us on XMPP instead!
  • Always display minimize and maximize buttons in titlebars. (#11270)
  • Remove GNOME Tweak Tool and hledger. You can add them back using the Additional software packages persistence feature.
  • Use secure HKPS OpenPGP key server in Enigmail.
  • Harden our firewall by rejecting RELATED packets and restricting Tor to only send NEW TCP syn packets. (#11391)
  • Harden our kernel by:
    • Setting various security-related kernel options: slab_nomerge slub_debug=FZ mce=0 vsyscall=none. (#11143)
    • Removing the .map files of the kernel. (#10951)

Fixed problems

  • Update the DRM and Mesa graphical libraries. This should fix recent problems with starting Tails on some hardware. (#11303)
  • Some printers that stopped working in Tails 2.0 should work again. (#10965)
  • Enable Packetization Layer Path MTU Discovery for IPv4. This should make the connections to obfs4 Tor bridges more reliable. (#9268)
  • Fix the translations of Tails Upgrader. (#10221)
  • Fix displaying the details of a circuit in Onion Circuits when using Tor bridges. (#11195)
For more details, read our changelog.

Known issues

  • The automatic account configuration of Icedove freezes when connecting to some email providers. (#11486)
  • In some cases sending an email with Icedove results in the error: "The message could not be sent using Outgoing server (SMTP) mail.riseup.net for an unknown reason." When this happens, simply click "Ok" and try again and it should work. (#10933)
  • The update of the Mesa graphical library introduce new problems at least on AMD HD 7770 and nVidia GT 930M.


See the list of long-standing issues.




Share:

Sunday, June 26, 2016

Everything you Need to Safely Browse the Internet - Tor Browser 6.0




The Tor software protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, it prevents the sites you visit from learning your physical location, and it lets you access sites which are blocked.

The Tor Browser lets you use Tor on Windows, Mac OS X, or Linux without needing to install any software. It can run off a USB flash drive, comes with a pre-configured web browser to protect your anonymity, and is self-contained.

The Tor Browser Team is proud to announce the first stable release in the 6.0 series. This release is available from the Tor Browser Project page and also from our distribution directory.

This release brings us up to date with Firefox 45-ESR, which should mean a better support for HTML5 video on Youtube, as well as a host of other improvements.

Beginning with the 6.0 series code-signing for OS X systems is introduced. This should help our users who had trouble with getting Tor Browser to work on their Mac due to Gatekeeper interference. There were bundle layout changes necessary to adhere to code signing requirements but the transition to the new Tor Browser layout on disk should go smoothly.

The release also features new privacy enhancements and disables features where we either did not have the time to write a proper fix or where we decided they are rather potentially harmful in a Tor Browser context.


On the security side this release makes sure that SHA1 certificate support is disabled and our updater is not only relying on the signature alone but is checking the hash of the downloaded update file as well before applying it. Moreover, we provide a fix for a Windows installer related DLL hijacking vulnerability.

The full changelog since Tor Browser 5.5.5 is

Tor Browser 6.0 
  • All Platforms
    • Update Firefox to 45.1.1esr
    • Update OpenSSL to 1.0.1t
    • Update Torbutton to 1.9.5.4
      • Bug 18466: Make Torbutton compatible with Firefox ESR 45
      • Bug 18743: Pref to hide 'Sign in to Sync' button in hamburger menu
      • Bug 18905: Hide unusable items from help menu
      • Bug 16017: Allow users to more easily set a non-tor SSH proxy
      • Bug 17599: Provide shortcuts for New Identity and New Circuit
      • Translation updates
      • Code clean-up
    • Update Tor Launcher to 0.2.9.3
      • Bug 13252: Do not store data in the application bundle
      • Bug 18947: Tor Browser is not starting on OS X if put into /Applications
      • Bug 11773: Setup wizard UI flow improvements
      • Translation updates
    • Update HTTPS-Everywhere to 5.1.9
    • Update meek to 0.22 (tag 0.22-18371-3)
      • Bug 18371: Symlinks are incompatible with Gatekeeper signing
      • Bug 18904: Mac OS: meek-http-helper profile not updated
    • Bug 15197 and child tickets: Rebase Tor Browser patches to ESR 45
    • Bug 18900: Fix broken updater on Linux
    • Bug 19121: The update.xml hash should get checked during update
    • Bug 18042: Disable SHA1 certificate support
    • Bug 18821: Disable libmdns support for desktop and mobile
    • Bug 18848: Disable additional welcome URL shown on first start
    • Bug 14970: Exempt our extensions from signing requirement
    • Bug 16328: Disable MediaDevices.enumerateDevices
    • Bug 16673: Disable HTTP Alternative-Services
    • Bug 17167: Disable Mozilla's tracking protection
    • Bug 18603: Disable performance-based WebGL fingerprinting option
    • Bug 18738: Disable Selfsupport and Unified Telemetry
    • Bug 18799: Disable Network Tickler
    • Bug 18800: Remove DNS lookup in lockfile code
    • Bug 18801: Disable dom.push preferences
    • Bug 18802: Remove the JS-based Flash VM (Shumway)
    • Bug 18863: Disable MozTCPSocket explicitly
    • Bug 15640: Place Canvas MediaStream behind site permission
    • Bug 16326: Verify cache isolation for Request and Fetch APIs
    • Bug 18741: Fix OCSP and favicon isolation for ESR 45
    • Bug 16998: Disable <link rel="preconnect"> for now
    • Bug 18898: Exempt the meek extension from the signing requirement as well
    • Bug 18899: Don't copy Torbutton, TorLauncher, etc. into meek profile
    • Bug 18890: Test importScripts() for cache and network isolation
    • Bug 18886: Hide pocket menu items when Pocket is disabled
    • Bug 18703: Fix circuit isolation issues on Page Info dialog
    • Bug 19115: Tor Browser should not fall back to Bing as its search engine
    • Bug 18915+19065: Use our search plugins in localized builds
    • Bug 19176: Zip our language packs deterministically
    • Bug 18811: Fix first-party isolation for blobs URLs in Workers
    • Bug 18950: Disable or audit Reader View
    • Bug 18886: Remove Pocket
    • Bug 18619: Tor Browser reports "InvalidStateError" in browser console
    • Bug 18945: Disable monitoring the connected state of Tor Browser users
    • Bug 18855: Don't show error after add-on directory clean-up
    • Bug 18885: Disable the option of logging TLS/SSL key material
    • Bug 18770: SVGs should not show up on Page Info dialog when disabled
    • Bug 18958: Spoof screen.orientation values
    • Bug 19047: Disable Heartbeat prompts
    • Bug 18914: Use English-only label in <isindex/> tags
    • Bug 18996: Investigate server logging in esr45-based Tor Browser
    • Bug 17790: Add unit tests for keyboard fingerprinting defenses
    • Bug 18995: Regression test to ensure CacheStorage is disabled
    • Bug 18912: Add automated tests for updater cert pinning
    • Bug 16728: Add test cases for favicon isolation
    • Bug 18976: Remove some FTE bridges
  • Windows
  • OS X
    • Bug 6540: Support OS X Gatekeeper
    • Bug 13252: Tor Browser should not store data in the application bundle
    • Bug 18951: HTTPS-E is missing after update
    • Bug 18904: meek-http-helper profile not updated
    • Bug 18928: Upgrade is not smooth (requires another restart)
  • Build System
    • All Platforms
      • Bug 18127: Add LXC support for building with Debian guest VMs
      • Bug 16224: Don't use BUILD_HOSTNAME anymore in Firefox builds
      • Bug 18919: Remove unused keys and unused dependencies
    • Windows
      • Bug 17895: Use NSIS 2.51 for installer to avoid DLL hijacking
      • Bug 18290: Bump mingw-w64 commit we use
    • OS X
      • Bug 18331: Update toolchain for Firefox 45 ESR
      • Bug 18690: Switch to Debian Wheezy guest VMs
    • Linux
      • Bug 18699: Stripping fails due to obsolete Browser/components directory
      • Bug 18698: Include libgconf2-dev for our Linux builds
      • Bug 15578: Switch to Debian Wheezy guest VMs (10.04 LTS is EOL)

Share:

Sunday, June 5, 2016

Encrypted DNS With - DNSCrypt





A protocol for securing communications between a client and a DNS resolver.

Disclaimer

dnscrypt-proxy verifies that responses you get from a DNS provider have been actually sent by that provider, and haven't been tampered with.

This is not a VPN. It doesn't mask your IP address, and if you are using it with a public DNS service, be aware that it will (and has to) decrypt your queries.

If you are using it for privacy, it might do the opposite of what you are trying to achieve. If you are using it to prevent VPN "leaks", this isn't the right tool either: the proper way to prevent VPN "leaks" is to avoid sending data to yet another third party: use a VPN service that operates its own DNS resolvers.

Description

dnscrypt-proxy provides local service which can be used directly as your local resolver or as a DNS forwarder, authenticating requests using the DNSCrypt protocol and passing them to an upstream server.

The DNSCrypt protocol uses high-speed high-security elliptic-curve cryptography and is very similar to DNSCurve, but focuses on securing communications between a client and its first-level resolver.

While not providing end-to-end security, it protects the local network, which is often the weakest point of the chain, against man-in-the-middle attacks.

dnscrypt-proxy is only a client-implementation of the protocol. It requires a DNSCrypt server on the other end.

Download and integrity check

dnscrypt-proxy can be downloaded here: dnscrypt-proxy download

Note: dnscrypt.org is now blocked by the Great Firewall of China. But the source code can also be downloaded on Github, in the "releases" section.

After having downloaded a file, compute its SHA256 digest. For example:

$ openssl dgst -sha256 dnscrypt-proxy-1.6.1.tar.bz2

Verify this digest against the expected one, that can be retrieved using a simple DNS query:

$ drill -aD TXT dnscrypt-proxy-1.6.1.tar.bz2.download.dnscrypt.org

or

$ dig +dnssec TXT dnscrypt-proxy-1.6.1.tar.bz2.download.dnscrypt.org

If the content of the TXT record doesn't match the SHA256 digest you computed, please file a bug report on Github as soon as possible and don't go any further.

Signatures can also be verified with the Minisign tool:

$ minisign -VP RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3 -m dnscrypt-proxy-1.6.1.tar.bz2

Installation

The daemon is known to work on recent versions of OSX, OpenBSD, Bitrig, NetBSD, Dragonfly BSD, FreeBSD, Linux, iOS (requires a jailbroken device), Android (requires a rooted device), and Windows (requires MingW).

Install libsodium. On Linux, don't forget to run ldconfig if you installed it from source.

A "minimal" build of libsodium (--enable-minimal) works equally well as a full build with this proxy.

On Fedora, RHEL and CentOS, you may need to add /usr/local/lib to the paths the dynamic linker is going to look at. Before issuing ldconfig, type:

# echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf

Now, download the latest dnscrypt-proxy version and extract it:

$ bunzip2 -cd dnscrypt-proxy-*.tar.bz2 | tar xvf -
$ cd dnscrypt-proxy-*

Compile and install it using the standard procedure:

$ ./configure && make -j2
# make install

Replace -j2 with whatever number of CPU cores you want to use for the compilation process.

The proxy will be installed as /usr/local/sbin/dnscrypt-proxy by default.

Command-line switches are documented in the dnscrypt-proxy(8) man page.

GUIs for dnscrypt-proxy

If you need a simple graphical user interface in order to start/stop the proxy and change your DNS settings, check out the following project:

ºSimple DNSCrypt: an all-in-one, standalone client - using DNSCrypt on Windows has never been so simple.

ºDNSCrypt WinClient: Easily enable/disable DNSCrypt on multiple adapters. Supports different ports and protocols, IPv6, parental controls and the proxy can act as a gateway service. Windows only, written in .NET.

ºDNSCrypt Windows Service Manager: Assists in setting up DNSCrypt as a service, configure it and change network adapter DNS settings to use DNSCrypt. It includes the option to use TCP/UDP protocol, IPV4/IPV6 connectivity, choice of network adapter to configure, as well as configurations for currently available DNSCrypt providers.

ºDNSCrypt OSXClient: Mac OSX application to control the DNSCrypt Proxy.

ºDNSCrypt Tools for Linux: A set of tools for dnscrypt-proxy. Features a start and stop button as well as options to enable or disable from startup. Developed for Porteus Linux.

DNSCrypt-enabled resolvers

To get started, you can use any of the public DNS resolvers supporting DNSCrypt.

This file is constantly updated, and its minisign signature can be verified with the following command:

minisign -VP RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3 -m dnscrypt-resolvers.csv

If you want to add DNSCrypt support to your own public or private resolver, check out DNSCrypt-Wrapper and dnsdist. These are server-side proxies that work with any name resolver.

A DNSCrypt server Docker image is also available to deploy a non-logging, DNSSEC and DNSCrypt-capable resolver without having to manually compile or configure anything.

Usage

Having a dedicated system user, with no privileges and with an empty home directory, is highly recommended. For extra security, DNSCrypt will chroot() to this user's home directory and drop root privileges for this user's uid as soon as possible.

The easiest way to start the daemon is:

# dnscrypt-proxy --daemonize --resolver-name=<resolver name>

Replace <resolver name> with the name of the resolver you want to use (the first column in the list of public resolvers).

The proxy will accept incoming requests on 127.0.0.1, tag them with an authentication code, forward them to the resolver, and validate each answer before passing it to the client.

Given such a setup, in order to actually start using DNSCrypt, you need to update your /etc/resolv.conf file and replace your current set of resolvers with:

nameserver 127.0.0.1

Other common command-line switches include:

º--daemonize in order to run the server as a background process.
º--local-address=<ip>[:port] in order to locally bind a different IP address than 127.0.0.1
º--logfile=<file> in order to write log data to a dedicated file. By default, logs are sent to stdout if the server is running in foreground, and to syslog if it is running in background.
º--loglevel=<level> if you need less verbosity in log files.
º--max-active-requests=<count> to set the maximum number of active requests. The default value is 250.
º--pidfile=<file> in order to store the PID number to a file.
º--user=<user name> in order to chroot()/drop privileges.
º--resolvers-list=<file>: to specity the path to the CSV file containing the list of available resolvers, and the parameters to use them.
º--test in order to check that the server-side proxy is properly configured and that a valid certificate can be used. This is useful for monitoring your own dnscrypt proxy. See the man page for more information.

The --resolver-address=<ip>[:port], --provider-name=<certificate provider FQDN> and --provider-key=<provider public key> switches can be specified in order to use a DNSCrypt-enabled recursive DNS service not listed in the configuration file.

Running dnscrypt-proxy using systemd

On a system using systemd, and when compiled with --with-systemd, the proxy can take advantage of systemd's socket activation instead of creating the sockets itself. The proxy will also notify systemd on successful startup.

Two sockets need to be configured: a UDP socket (ListenStream) and a TCP socket (ListenDatagram) sharing the same port.

The source distribution includes the dnscrypt-proxy.socket and dnscrypt-proxy.service files that can be used as a starting point.

Installation as a service (Windows only)

The proxy can be installed as a Windows service.

See README-WINDOWS.markdown for more information on DNSCrypt on Windows.

Using DNSCrypt in combination with a DNS cache

The DNSCrypt proxy is not a DNS cache. This means that incoming queries will not be cached and every single query will require a round-trip to the upstream resolver.

For optimal performance, the recommended way of running DNSCrypt is to run it as a forwarder for a local DNS cache, such as unbound or powerdns-recursor.

Both can safely run on the same machine as long as they are listening to different IP addresses (preferred) or different ports.

If your DNS cache is unbound, all you need is to edit the unbound.conf file and add the following lines at the end of the server section:

do-not-query-localhost: no

forward-zone:
  name: "."
  forward-addr: 127.0.0.1@40


The first line is not required if you are using different IP addresses instead of different ports.

Then start dnscrypt-proxy, telling it to use a specific port (40, in this example):

# dnscrypt-proxy --local-address=127.0.0.1:40 --daemonize

IPv6 support

IPv6 is fully supported. IPv6 addresses with a port number should be specified as [ip]:port.

# dnscrypt-proxy --local-address='[::1]:40' ...

Queries using nonstandard ports / over TCP

Some routers and firewalls can block outgoing DNS queries or transparently redirect them to their own resolver. This especially happens on public Wifi hotspots, such as coffee shops.

As a workaround, the port number can be changed using the --resolver-port=<port> option.

By default, dnscrypt-proxy sends outgoing queries to UDP port 443.

In addition, the DNSCrypt proxy can force outgoing queries to be sent over TCP. For example, TCP port 443, which is commonly used for communication over HTTPS, may not be filtered.

The --tcp-only command-line switch forces this behavior. When an incoming query is received, the daemon immediately replies with a "response truncated" message, forcing the client to retry over TCP. The daemon then authenticates the query and forwards it over TCP to the resolver.

--tcp-only is slower than UDP because multiple queries over a single TCP connections aren't supported yet, and this workaround should never be used except when bypassing a filter is actually required.

Public-key client authentication

By default, dnscrypt-proxy generates non-deterministic client keys every time it starts, or for every query (when the ephemeral keys feature is turned on).

However, commercial DNS services may want to use DNSCrypt to authenticate the sender of a query using public-key cryptography, i.e. know what customer sent a query without altering the DNS query itself, and without using shared secrets.

Resolvers that should be accessible from any IP address, but that are supposed to be used only by specific users, can also take advantage of DNSCrypt to only respond to queries sent using a given list of public keys.

In order to do so, dnscrypt-proxy 1.6.0 introduced the --client-key (or -K) switch. This loads a secret client key from a file instead of generating random keys:

# dnscrypt-proxy --client-key=/private/client-secret.key

This file has to remain private, and its content doesn't have to be known by the DNS service provider.

Versions 1 and 2 of the DNSCrypt protocol use Curve25519 keys, and the format of this file for Curve25519 keys is a hexadecimal string, with optional :, [space] and - delimiters, decoding to 34 bytes:

01 01 || 32-byte Curve25519 secret key

Server-side, a short TTL for certificates is recommended when using this system.

EDNS payload size

DNS packets sent over UDP have been historically limited to 512 bytes, which is usually fine for queries, but sometimes a bit short for replies.

Most modern authoritative servers, resolvers and stub resolvers support the Extension Mechanism for DNS (EDNS) that, among other things, allows a client to specify how large a reply over UDP can be.

Unfortunately, this feature is disabled by default on a lot of operating systems. It has to be explicitly enabled, for example by adding options edns0 to the /etc/resolv.conf file on most Unix-like operating systems.

dnscrypt-proxy can transparently rewrite outgoing packets before authenticating them, in order to add the EDNS0 mechanism. By default, a conservative payload size of 1252 bytes is advertised.

This size can be made larger by starting the proxy with the --edns-payload-size=<bytes> command-line switch. Values up to 4096 are usually safe, but some routers/firewall/NAT boxes block IP fragments.

If you can resolve test-tcp.dnscrypt.org, increasing the maximum payload size is probably fine. If you can't, or just to stay on the safe side, do not tweak this; stick to the default value.

A value below or equal to 512 will disable this mechanism, unless a client sends a packet with an OPT section providing a payload size.

The hostip utility

The DNSCrypt proxy ships with a simple tool named hostip that resolves a name to IPv4 or IPv6 addresses.

This tool can be useful for starting some services before dnscrypt-proxy.

Queries made by hostip are not authenticated.

Plugins

dnscrypt-proxy can be extended with plugins. A plugin acts as a filter that can locally inspect and modify queries and responses.

The plugin API is documented in the README-PLUGINS.markdown file.

Any number of plugins can be combined (chained) by repeating the --plugin command-line switch.

The default distribution ships with some example plugins:

ºlibdcplugin_example_ldns_aaaa_blocking: Directly return an empty response to AAAA queries

Example usage:

# dnscrypt-proxy ... \
--plugin libdcplugin_example_ldns_aaaa_blocking.la

If IPv6 connectivity is not available on your network, this plugin avoids waiting for responses about IPv6 addresses from upstream resolvers. This can improve your web browsing experience.

ºlibdcplugin_example_ldns_blocking: Block specific domains and IP addresses.
This plugin returns a REFUSED response if the query name is in a list of blacklisted names, or if at least one of the returned IP addresses happens to be in a list of blacklisted IPs.

Recognized switches are:

--domains=<file>
--ips=<file>

A file should list one entry per line.

IPv4 and IPv6 addresses are supported.

For names, leading and trailing wildcards (*) are also supported (e.g. *xxx*, *.example.com, ads.*)

# dnscrypt-proxy ... \
--plugin libdcplugin_example,--ips=/etc/blk-ips,--domains=/etc/blk-names

ºlibdcplugin_example-logging: Log client queries

This plugin logs the client queries to the standard output (default) or to a file.

# dnscrypt-proxy ... \
--plugin libdcplugin_example_logging,/var/log/dns.log

ºExtra plugins

Additional plugins can be found on Github:

ºMasquerade plugin
ºGeoIP plugin.


Share:
Copyright © Offensive Sec Blog | Powered by OffensiveSec
Design by OffSec | Theme by Nasa Records | Distributed By Pirate Edition