Running Calculus On An Arduino

It was Stardate 2267. A mysterious life form known as Redjac possessed the computer system of the USS Enterprise. Being well versed in both computer operations and mathematics, [Spock] instructed the computer to compute pi to the last digit. “…the value of pi is a transcendental figure without resolution” he would say. The task of computing pi presents to the computer an infinite process. The computer would have to work on the task forever, eventually forcing the Redjac out.

Calculus relies on infinite processes. And the Arduino is a (single thread) computer. So the idea of zeno_03running a calculus function on an Arduino presents a seemingly impossible scenario. In this article, we’re going to explore the idea of using derivative like techniques with a microcontroller. Let us be reminded that the derivative provides an instantaneous rate of change. Getting an instantaneous rate of change when the function is known is easy. However, when you’re working with a microcontroller and varying analog data without a known function, it’s not so easy. Our goal will be to get an average rate of change of the data. And since a microcontroller is many orders of magnitude faster than the rate of change of the incoming data, we can calculate the average rate of change over very small time intervals. Our work will be based on the fact that the average rate of change and instantaneous rate of change are the same over short time intervals.

Continue reading “Running Calculus On An Arduino” →

What’s In A Tool? A Case For Made In USA.

A lot of people make the argument that you can’t go wrong buying a tool made in USA, Germany, Japan, Switzerland, etc. They swear that any Chinese tool will be garbage and it’s not worth purchasing them. Now, any discerning mind will say, “Wait a minute, why? China has a huge economy, experienced people, and the ability to use all the scary chemicals that make the best steel. Why would their tools be any better or worse than ours?” It’s a very valid argument. There are lots of Chinese tools that are the best in the world. Most of what we see in our stores are not. So what is the difference. Why does a country who can make the best tools not make the best tools? Surely it isn’t purely cost cutting. Is it cultural? The opinion I wish to put forth is that it’s a matter of design intent communication.

I’ve worked as an engineer in industry. The one common thread between a quality product and a bad product has always been this, ”Is the person who designed the product involved in making the product?” If the person or peoples who imbued the design intent into the original product are actively involved in and working towards the execution of that product, that product has a vastly greater chance of being good. Or in other words: outsourcing doesn’t produce a bad product because the new people making the product don’t care. It makes a bad product because the people who understand the intent behind the product are separated from its execution.

As you can see the export made crescent wrench is not made to the same tolerances as the previous wrench.
As you can see the export made crescent wrench is not made to the same tolerances as the previous wrench.

Let’s take the Crescent wrench as an example. Crescent wrenches used to be made in USA. In the past few years they have begun to make them in China. We can spot many visual differences right away. The new Crescent wrench has a different shape, the logo has changed and the stamping for the logo is dodgy, and worse, the tool just doesn’t operate as well as it used to. The jaws aren’t as hard and they wiggle more. What happened? How could Crescent mess up their flagship so badly. Surely they intended just to cut costs, not to reduce quality. This isn’t shameful in itself

What happened to the Crescent wrench is easily explained by anyone who has seen a product from design to execution before. A factory in the USA set out to make a good adjustable wrench. Hundreds of engineers and employees worked in a building to make a good wrench. When their machines didn’t work, they came up with solutions. When their quality was lacking, they implemented better processes. They had a list of trusted suppliers. They could guarantee that the materials that came in would be imbued with their vision and intent when the product came out. The intent and will of all those people built up in one place over time.

Continue reading “What’s In A Tool? A Case For Made In USA.” →

Emulating And Cloning Smart Cards

A few years ago, we saw a project from a few researchers in Germany who built a device to clone contactless smart cards. These contactless smart cards can be found in everything from subway cards to passports, and a tool to investigate and emulate these cards has exceptionally interesting implications. [David] and [Tino], the researchers behind the first iteration of this hardware have been working on an improved version for a few years, and they’re finally ready to release it. They’re behind a Kickstarter campaign for the ChameleonMini, a device for NFC security analysis that can also clone and emulate contactless cards.

While the original Chameleon smart card emulator could handle many of the contactless smart cards you could throw at it, there at a lot of different contactless protocols. The new card can emulate just about every contactless card that operates on 13.56 MHz.

The board itself is mostly a PCB antenna, with the electronics based on an ATXMega128A4U microcontroller. This micro has AES and DES encryption engines, meaning if your contactless card has encryption and you have the cryptographic key, you can emulate that card with this device. They’re also making a more expensive version that also has a built-in reader that makes the ChameleonMini a one-stop card cloning tool.

Recursive Soldering Iron Hacking

We’ve all done it. You’re walking out the door or maybe you’ve even gotten on the road when the question hits, “Did I leave the [coffee pot | stove | hair curler | soldering iron ] on?” [Daniel Johnson’s] problem was even worse. He couldn’t tell if his Hakko-936 soldering iron was off because the LED indicator wasn’t always on. Instead it flashed. He fixed that problem and along the way hacked his battery powered soldering iron since he was out of batteries. Now that’s perseverance.

Hacked Soldering Iron to Hack Soldering Iron
Soldering Iron Hack Recursion

The Hakko’s LED turned on whenever the power turned on to heat the tip. That was about every 5 seconds once the tip was hot. But just as a watched pot never boils, a watched LED never seems to flash. After determining the LED was driven by a comparator he decide to unsolder it as part of his hack. He wisely decided using the Hakko on itself was not a good idea so reached for the battery-powered portable iron, which was sadly battery-free. Undaunted, he wired the portable to a power supply and when 4.5 volts didn’t melt the solder cranked it up to 6 volts.

Back to the Hakko, he replaced the red LED with a RBG LED but used only the red and green leads. The green was tied to the 24v power supply through a hefty 47k ohm resistor, and the red was tied to the comparator. A little masking tape to hold things in place and provide insulation finished the job. Now when the Hakko is on the green LED is lit and the red LED shows the heating cycle. Quite clever.

Shmoocon 2016: GPUs And FPGAs To Better Detect Malware

One of the big problems in detecting malware is that there are so many different forms of the same malicious code. This problem of polymorphism is what led Rick Wesson to develop icewater, a clustering technique that identifies malware.

Presented at Shmoocon 2016, the icewater project is a new way to process and filter the vast number of samples one finds on the Internet. Processing 300,000 new samples a day to determine if they have polymorphic malware in them is a daunting task. The approach used here is to create a fingerprint from each binary sample by using a space-filling curve. Polymorphism will change a lot of the bits in each sample, but as with human fingerprints, patterns are still present in this binary fingerprints that indicate the sample is a variation on a previously known object.
Continue reading “Shmoocon 2016: GPUs And FPGAs To Better Detect Malware” →

The Smallest Google Street View In Miniatur Wunderland

The world’s largest model railway exhibit — on display in Germany of course — is quite the attraction. The huge Miniatur Wunderland features towns and trains from Germany, Switzerland, Austria, and even a little America. And it’s all on Google Maps.

[Frank] accepted the challenge to build a tiny Google Streetview train, capable of traversing the entire Wunderland. It features a fish-eye camera on both the front and rear car, and is powered by an Arduino — the Wattuino Nanite 85. He upgraded the train to use tiny stepper motors to allow for precise movement along the tracks to get all the shots in perfect Streetview fashion.
Continue reading “The Smallest Google Street View In Miniatur Wunderland” →

Shmoocon 2016: Phishing For The Phishers

After years of ignoring the emails it’s finally time to get into a conversation with that Nigerian prince you keep hearing from. Robbie Gallagher — an Application Security Engineer with Atlassian in Austin, TX — wanted to find out where perpetrators of phishing emails actually live. Of course you can’t count on the headers of the emails they send you. A better way to track them down is to actually draw them into a conversations, and this means making yourself a juicy target.

Robbie gave an excellent talk on his project Honey-Phish at this year’s Shmoocon. Part of what made it stand out is his narrative on each step of exploring the social engineering technique. For instance, there is already a vibrant community that specializes in forming relationships with scammers. Those who frequent 419 Eater have literally made it into a sport called Scambaiting. The ultimate goal is to prove you’ve baited a scammer is to get the person to take a picture of themselves balancing something on their head. Now the image a the top of this post makes sense, right?

Writing personal emails to your scammer is a great system if you have a lot of time and only want to track down one scammer at a time. Robbie wants to catalog geographic locations for as many as possible and this means automation. Amusingly, the solution is to Phish for Phishers. By automating responses to phishing emails, and enticing the people originating those phishing scams to click on a link, you can ascertain their physical location.

Continue reading “Shmoocon 2016: Phishing For The Phishers” →