LetsEncrypt working with OpenVPN data-share

I have a fairly specific use case, and this is too help those that may need to automate renewals if you have

  • OpenVPN on tcp/443, with port-share enabled
  • NGINX as your webserver

First to configure port-share on OpenVPN add the following to your server.conf

port 443
port-share 127.0.0.1 8443

On your NGINX CONF your port config should look like

listen 8443;

Basically you are now using built-in detection of OpenVPN to detect SSLVPN or HTTPS traffic coming in on port 443/tcp, and if it detects HTTPS traffic forwards it on to your NGINX daemon on port tcp/8443

To get you certificates to renew when you are using NGINX is a bit of a pain, especially if you are using port-share but it is doable with a small amount of downtime. I use a script by Acetylator from the LetsEncrypt community forums. How-to: completely automating certificate renewals on Debian

At the top I added

service openvpn stop

and at the bottom

service openvpn stop

There is probably a more elegant way to do this, but I am not a *nix guy .

For the script to work correctly you need a copy of cli.ini in your /etc/letsencrypt folder. Mine looks like below:

# This is an example of the kind of things you can do in a configuration file.
# All flags used by the client can be configured here. Run Let’s Encrypt with
# “–help” to learn more about the available options.
# Use a 4096 bit RSA key instead of 2048
rsa-key-size = 4096
# Uncomment and update to register with the specified e-mail address
email = [email protected]
# Uncomment and update to generate certificates for the specified
# domains.
domains = www.domain.tld domain.tld
# Uncomment to use a text interface instead of ncurses
text = True
# Uncomment to use the standalone authenticator on port 443
# authenticator = standalone
# standalone-supported-challenges = tls-sni-01
# Uncomment to use the webroot authenticator. Replace webroot-path with the
# path to the public_html / webroot folder being served by your web server.
# authenticator = webroot
# webroot-path = /usr/share/nginx/html

I have a cron job that runs once a week calling this script and so far with 1 renewal that has happened it all worked as expected, such a rare occurrence.

Upgrade to WordPress 2.7

Just finished upgrading to the latest and at least this time the theme stayed in tact, well done to the WordPress devs for their hard work and Keith Dsouza for his WordPress Automatic Upgrade.

p.s. Love the new admin Dashboard, things are so much easier to access

Another how to keep yourself safe on the internet post :-P

With the latest phishing scam going around, in South Africa at least, I have written up this post to get my opinion on keeping yourself safe from the scammer. The title of the phishing mail that prompted this is “CNN.com Daily Top 10” from “Daily Top 10”. It caught me at first until I relised this was received on the wrong account as I have a sub to a similar service. All the links in the mail go to a fake CNN site that says you need to download their video player, this video player contains a key logger than will send all keystrokes you make to another party that will probably use it for their own gain. I must say that every time I have tried the site linked it appeared to have been taken down.

There are a few important rules to using the internet, and they apply to many other forms of communication: There are a few important rules to using the internet:

  1. If it seems too good to be true, then it is most likely is!
  2. If you receive email asking for personal or financial information, delete it! They already have your information, and if they really need your information they will probably do it through more personal contact.
  3. Never give out your personal information to anyone, they can and possibly will use it to impersonate you. Continue reading “Another how to keep yourself safe on the internet post :-P”

TrueCrypt Benchmark reloaded

Okay, I stand corrected. Doing the benchmarks in a VM was a bad idea, but TwoFish encryption does impact disk use to an extent.

Disk Benchmark Result

Click to see full size

System Benchmark results

Click to see full size

Benchmark PGP versus Truecrypt Full Disk Encryption

I noticed something rather important missing in the realm of Full Disk Encryption, and that was benchmark data. The methodology I followed may be a bit unorthodox but would provide me with a consistant platform to test with.

I installed Windows XP SP2 on VMWare Fusion and applied all the patches available from our WSUS server. After installing the Benchmark application I created a SnapShot so that I could revert to the original install everytime with no deviations in installation, i.e. I was lazy.

I only encountered one major problem with running the Disk benchmark on PC Mark 04 when using TwoFish/RIPEMD160 encryption in TrueCrypt the entire benchmark would come up with the useless Windows Has Encountered a Problem message.

Continue reading “Benchmark PGP versus Truecrypt Full Disk Encryption”

Change the default search in the Flock Browser

I really enjoy using the Flock browser, but for one HUGE annoyance. Why oh Why did they have to use Yahoo as the default search engine and then making it stupid to change. You would assume that changing the default under Search preferences that it would change it when using the URL bar to search, but no. I found instructions by aRugus Chang not using Yahoo of course but Google. To do it takes 5 steps

  1. Open a new tab and type “about:config” in the URL bar
  2. Type browser.search.def
  3. Double click the entry and change to “Google”
  4. Type keyword.url
  5. Double click the entry and enter “http://www.google.co.za/search?lr=&ie=UTF-8&oe=UTF-8&q=”

This will change searches to use www.google.co.za as this is the url for South Africa, but you could use co.uk for Google UK or what ever the tld is for your Google search. You can also change this to Live search, if you really want seeing is it is better than Yahoo. To do this use “Live” in step 3 and “http://search.live.com/results.aspx?q=”

Disk encryption may not be secure enough, new research finds – CNET News.com

Disk encryption may not be secure enough, new research finds | The Iconoclast – politics, law, and technology – CNET News.com

Excerpt:
Computer scientists have discovered a novel way to bypass the encryption used in programs like Microsoft’s BitLocker and Apple’s FileVault and then view the contents of supposedly secure files.

In a paper (PDF) published Thursday that could prompt a rethinking of how to protect sensitive data, the researchers describe how they can extract the contents of a computer’s memory and discover the secret encryption key used to scramble files.

“There seems to be no easy remedy for these vulnerabilities,” the researchers say. “Simple software changes are likely to be ineffective; hardware changes are possible but will require time and expense; and today’s Trusted Computing technologies appear to be of little help because they cannot protect keys that are already in memory. The risk seems highest for laptops, which are often taken out in public in states that are vulnerable to our attacks. These risks imply that disk encryption on laptops may do less good than widely believed.”

Scary stuff, what frightens me even more is they figures out how to remove the RAM from a machine without it loosing it’s state

Excerpt:
Well, not so fast. Another interesting technique that Thursday’s paper describes is how to supercool the RAM chips with a can of compressed air held upside-down. Then the cooled memory can be physically extracted and inserted in another computer owned by the attacker. (If the memory is permanently affixed to the motherboard, there are still other methods [PDF] that can be used.)

The paper states:

Contrary to the expectation that DRAM loses its state quickly if it is not regularly refreshed, we found that most DRAM modules retained much of their state without refresh, and even without power, for periods lasting thousands of refresh intervals. At normal operating temperatures, we generally saw a low rate of bit corruption for several seconds, followed by a period of rapid decay. We obtained surface temperatures of approximately ?50 degrees C with a simple cooling technique: discharging inverted cans of “canned air” duster spray directly onto the chips. At these temperatures, we typically found that fewer than 1% of bits decayed even after 10 minutes without power. To test the limits of this effect, we submerged DRAM modules in liquid nitrogen (ca. ?196 degrees C) and saw decay of only 0.17% after 60 minutes out of the computer.

Gutmann, the New Zealand computer scientist, previewed this kind of attack in a 1996 paper that said: “To extend the life of stored bits with the power removed, the temperature should be dropped below -60 degrees C. Such cooling should lead to weeks, instead of hours or days, of data retention.”

Holy crap. Wish I had the time to actually try this, would be involving a good amount of hackery.

Translation: If you use an encrypted file-system and want privacy and security when you’re not using your computer, you need to shut down your computer and wait a few minutes for the RAM contents to vanish. Another option for sensitive files is to use an encrypted volume like a PGP disk and unmount it as soon as you’re done.

Something very important to take away from this is Sleep/Hibernate is very BAD. This makes me laugh at all those Apple fanboys that keep on saying I never turn of my machine, just put my Mac to sleep and when I need open it again. I will says thanks to Microsoft for the unreliabilty of their sleep technology I never (well almost never) use the sleep function if I am in motion. The only time I use sleep is when at home with my Macbook close by, not out of sight

I will be looking for some tools that can assist with wiping memory to prevent these “exploits” from actually working.

Me being clever: I doubt whether “Use Secure Virtual Memory” will help as that only works for the “Virtual Memory”, not RAM. What is needed is something that can encrypt the RAM before going to sleep and then put the machine in Deep Sleep with its suspend file encrypted. To wake up in this case should require dual authentication like biometric, smart card, usb dongle and a user/password maybe.

Eastern Cape Government website hacked?

Found this out a while ago, just never posted. Hackers with a sense of humour 🙂

PAGE NOT FOUND

Sorry….but the page you are looking for cannot be found This could happen for several reasons:

1. The page may have been reached in error.

2. The page may have moved.

3. The page may no longer exist.

4. The page is on holiday and will be out of the office until next week or when it feels like coming back.

5. The page was considered redundant and was given a raise so it now works even less.

6. The page performed an illegal operation and was promoted to vice-president.

7. The page was on strike. We are busy negotiating with the unions now for better wages so it can come online.

8. The page is running late. This could be because the taxi’s need to collect at least another 404 passengers.

9. The page is sleeping . After all, this is African time we are talking about.

Was a great lol