To Export the Unexportable Key

March 1, 2017 at 5:04 pm

Every now and then, you have to export a certificate in Windows, and someone forgot to check that little box to let you be able to do it… What is an enterprising SysAdmin to do? Enter Mimikatz (source), a tool that lets you patch the Windows crypto api and do several cool (and frightening) things. The process is very simple.

To Export an Unexportable Private Key:

  1. Create a temp directory
  2. Download the latest version of Mimikatz
  3. Extract the appropriate version (32 or 64 bit) to the temp directory
  4. Open an admin command prompt
  5. Change to the temp directory
  6. Run mimikatz
  7. Type crypto::capi
  8. And finally type crypto::certificates /export

You’ll see all of the certificates in the MY store exported into the temp directory in pfx format. The default password is mimikatz. Want another cert store? Perhaps, the computer store? Simply run crypto::certificates /export /systemstore:LOCAL_MACHINE. Check out the github wiki for documentation on this and other cool features of this powerful tool.

What to do with an old Christmas tree farm?

October 21, 2015 at 4:29 pm
It's dark in there...

It’s dark in there…

As the missus and I sit and talk about our new homestead and the directions that we are thinking about taking it, one problem keeps coming up: the old Christmas tree stand. You see, dear reader, our homestead used to be a Christmas tree farm back in the 80s. Unfortunatly, the previous owners decided not to keep the farm going and let the trees grow up. On the surface this may not appear to be an issue, that is, until you consider planting densities.

Normal pine tree stands are planted at about 400-500 trees per acre. This allows for them to grow straight and healthy. Stands like that can be used for lumber and wood pulp and can net a good amount of money when they mature. However, Christmas tree farms are planted at 1,000 – 1,500 trees per acre. This is no problem if trees are kept small and regularly trimmed… Unfortunatly, that’s no the case here. Our stand is dense. It’s dark in there. This level of density leads to really unhealthy trees, and from the research I’ve been doing, it appears that there is not much that can be done.

It seems that our options are limited to the following:

  • Leave it be – The trees will keep growing, and will start dying off. This will likely result in a bad situation for both domestic and wild animals, not to mention the lack of productivity of that patch of the homestead.
  • Selective thinning – This would involve either getting a lumber/pulp company in to selectively harvest every other row of trees. This may not be an option because of the density. You can’t really get equipment in there. That means it might just be me with a chainsaw.
  • Harvest the whole thing – This is the option that I really don’t like, but seems to be the best all around. It would net some cash from the sale of the wood and would allow us to plant a new, healthy, forest and silvopasture using permaculture principles. The main problem here would be handling the stumps and the time it would take for a new forest to establish itself.

In case anyone is interested, I’ve also compiled a few links on the topic.

And here is a are some additional photos:

Searching for Superfish using PowerShell

February 19, 2015 at 1:31 pm

Lenovo installed a piece of software that could arguably be called malware or spyware. Superfish, as this article indicates, installs a self-signed root certificate that is authoritative for everything. I wanted to be sure that this issue wasn’t present on any of our Lenovo systems, so I turned to PowerShell to help.

I found a copy of the certificate on Robert David Graham’s github here. I pulled the thumbprint from the cert which appears to be: ‎c864484869d41d2b0d32319c5a62f9315aaf2cbd

Now, some simple PowerShell code will let you run through your local certificate store and see if you have it installed.

Get-ChildItem -Recurse cert:\LocalMachine\ |where {$_.Thumbprint -eq "c864484869d41d2b0d32319c5a62f9315aaf2cbd"}

You could just as easily replace the get-childitem with “Remove-Item -Path cert:\LocalMachine\root\c864484869d41d2b0d32319c5a62f9315aaf2cbd”, but I wanted to make sure the key wasn’t installed somewhere else.

Now, to take it a step further, I use the AD commandlets and some more simple PowerShell to search all my systems for it.

Import-Module ActiveDirectory
$Cred = Get-Credential
$Computers = Get-ADComputer -Filter {enabled -eq $true} | select Name
foreach ($Computer in $Computers) {
 if(test-connection -Count 1 -ComputerName $Computer.Name){
 write-output (invoke-command -ComputerName $Computer.Name -Credential $Cred -ScriptBlock {Get-ChildItem -Recurse cert:\LocalMachine\ |where {$_.Thumbprint -eq "‎c864484869d41d2b0d32319c5a62f9315aaf2cbd"}})
 Write-Error ("There was an issue connecting to computer $Computer : " + $_.Exception)

Is it perfect? No. But it gets the job done in relatively short order.

PermaEthos PDC

May 23, 2014 at 3:39 pm

PermaEthos LogoJack Spirko, of The Survival Podcast fame, is a visionary in many ways. His most recent endeavor is a little project called PermaEthos, which aims to create a worldwide network of farms based on Permaculture Principles and Libertarian Ideals. As part of this effort, Jack and his team will be putting on an online PDC at the first PermaEthos farm. Needless to say, the wife and I are taking a PDC!

For more information on the PermaEthos model, and how it came to be, listen to Episode 1335 The PermaEthos Model 3.0.

As part of this, I created a profile over at Permaculture Global to help track what I’ve done. If you’re on that network, feel free to connect with me!
Direct Link to Profile on Permaculture Global

Good Gear!

February 7, 2014 at 3:38 pm

Whether it’s camping gear, construction gear, kitchen gear or computer gear, I’ve always loved gear. From cheap doodads to expensive precision thing-a-ma-bobs, I’ve used a lot of gear over the years. Some of it has worked really well for me, and a lot of it has failed miserably. Strangely enough, price isn’t always a determining factor, either. In this blog series, I’m going to review some of the gear that I’ve used and tell you why I love or hate it. Stay tuned for the first post in the Good Gear series: Pots and Pans!

Learning to Cook

November 18, 2013 at 2:52 pm

A friend asked me at lunch today: “How do I learn to cook?” Since this question seems to come up a lot in my life, I figured I would write a post on the topic so I could easily answer the next person.

I am passionate about cooking. I learned to cook from my mother at a very young age. She would always encourage me to help cut the vegetables, or stir the soup. Some of my earliest memories are of helping out in the kitchen (the others are of taking things, usually expensive, apart). For me, cooking developed naturally as I absorbed what my mother taught me. When I hit college, I started collecting cookbooks trying to improve on my skills in earnest. However, I quickly became disappointed in what the average cookbook had to teach.

You see, the problem with most cookbooks is that they are just recipe collections. Sure, some good ones will give you a  few brief pointers on how to knead bread, or broil a steak, but most are just a list of recipes that throw terms at the reader that they might not be familiar with. “Saute one cup of chicken, diced into one inch cubes”. What’s a saute? What’s a dice? What temperature? What pan? Do I cover it?

Most folks think that they know the vocab, and throw the recipe together in a way that makes sense to them. This usually results in an edible meal that roughly approximates the recipe, so most people leave it at that. Presto! We’re cooking now! Never mind the fact that our ragu is now more of a vegetable stew and our bread is completely crumbly without any of that nice chewy texture we were looking for… Cooking not only throws an entirely new vocabulary at you, it also throws you a new grammar and syntax, which most books don’t even touch on. By following the average cookbook, we are merely parroting back what we are reading and failing to understand why we’re doing any of it. This isn’t how you learn.

So how would I recommend you learn to cook? Learn the vocab, learn the grammar, and learn the syntax.

The vocab is basic, and fairly easy. It’s not like you are becoming a doctor and need to learn latin. To take our earlier example, sauteing involves cooking meat in a pan with oil while braising uses some other water based liquid. Most folks at home braise meats unintentionally when they cover their frying pans. The Professional Chef and Jacques Pépin’s Complete Techniques do a great job of going over the vocabulary of cooking, while illustrating it with both recipes and pictures.

Grammar is a bit more tricky. The rules are hinted at, and even discussed in a high level, in The Professional Chef. However, pick up a copy of Ratio: The Simple Codes Behind the Craft of Everyday Cooking and you will really get a feeling for the power of culinary grammar. For a full review of Ratio, see this article I wrote a while back. To summarize it, though, imagine knowing the base ratio for a cake and then being able to make any cake you can imagine. Then imagine changing the ratio of the exact same ingredients and coming out with a scone instead. This is the power of culinary ratios. They free you from recipes and let your imagination take flight.

Finally come syntax, and this is one of the harder things to learn. Syntax, in the cooking world, is the fingerprint of a particular cuisine. More accurately, it is the flavorprint of a particular cuisine. What makes American BBQ unique when compared to, say, Vietnamese BBQ? If you look at the recipes, you will notice that it is all in the specific ingredients and flavoring agents that are available to each culture. Unfortunately though, no-one, to my knowledge, has written a good book on the flavor prints of the world. The only way to learn syntax is by reviewing recipe collections on specific cuisines, looking at the ingredients in ethnic markets, and analysing the flavors when you eat out at a restaurant that specializes in that type of cuisine. It may not be easy to learn syntax, but it can be fun and filling!

Since this is an article on learning to cook, I want to share my favorite cooking show as well. Good Eats is a fantastic show by the mad scientist of the culinary world, Alton Brown. It gives great examples of all of the above material and does so in a fascinating, highly entertaining way. Truth be told, Good Eats was one of the reasons I started looking in to the whys and wherefores of the cooking world. You can pick up the DVDs of the show on Amazon, and I’m sure you can find episodes streaming online if you look on the search engine of your choice.

Was this article helpful? Did you find it interesting or disagree with it? Please post in the comments below!

Edited to add: Turns out there are a few cheatsheets floating around on flavor profiles. Have a look.


August 13, 2013 at 11:51 am

When you look at dishonesty as a social disease, things get very interesting. I always believed that “The true test of a man’s character is what he does when no one is watching” (John Wooden), but perhaps there’s more to it than that. Character is also standing up for what you believe in the face of social pressure. Tricky double-edged sword, that is. However, it is worth careful consideration. This article gives some great food for thought along these lines.

PageSpeed score of 96/100!

June 12, 2013 at 5:21 pm

PageSpeed Insights ScreenshotAfter configuring W3 Total Cache and playing around with google’s free PageSpeed Insights tool, I was able to increase The End of the Tunnel’s score from 49 to 96! This is impressive to me because this site currently runs on the basic DreamHost shared environment plan. No dedicated servers, no fancy configurations, just good cache management. Fantastic!

New Site Live

June 10, 2013 at 5:45 pm

Welcome to the new The End of the Tunnel. This site is currently under construction. Stay tuned as I populate the site with back data, articles, and interesting links.

Of Floors and Friends

June 5, 2012 at 10:20 pm

This past week, several of my friends and I went to the cabin to do some much needed renovations. I will be documenting these renovations over the next few posts and will link them here when finished.

Four of the five key players in this tale of triumph.

  • Putting up a Storage Shed
  • Living Room Demolition
  • Jacking up the Cabin
  • Foundation Work
  • New Living Room floor