Home Energy Monitoring – Part 1: Babby’s first PCB

I’m a bit of a data nerd and have been gathering metrics from my local machines for sometime now. The ability to see trends is really powerful when diagnosing problems and tuning performance.

I’m using the TIG stack – Telegraf (data collection), InfluxDB (time series database), and Grafana (visuals and alerting).

Grafana dashboard – file server

I wanted to utilize these same tools for monitoring energy usage in my house. I set out a goal to be able to see energy usage in near real time, per circuit, using mostly free software and hardware.

I ran across an excellent post on boredman’s blog that describes the hardware side of a system that very closely matches my goal. I immediately went out and acquired the pieces to play with this for myself. It wasn’t long before I had something working on my bench.

Current transformer and AC-AC voltage inputs into Arduino Due

With a working proof of concept it was time to think about next steps. For me this was form factor, scaling. The Arduino Due supports 12 analog inputs. One will be consumed for Voltage measurements using an AC-AC transformer and the others will be for current measurements from current transformers on each circuit in my house. I have 22 circuits in my electrical panel — I will need two Arduinos or find better way to add analog inputs.

Input board 1.0

Fritzing is software for creating PCBs for newbies. Perfect. I was able to cobble together a board with CT (current transformer) and voltage inputs to a pin header thinking I could run a ribbon cable from the input board to Arduino. It wasn’t too hard to get going in Fritzing but I found it difficult to get something that looked nice and wasn’t even sure it would work. This board only has a burden resistor for each CT input.

Read more about CT burden resistors and home energy monitoring at the excellent Open Energy Monitor project
https://learn.openenergymonitor.org/

Fritzing – Input board 1.0

I was worried that I would be getting a lot of interference since I’m dealing with AC signals and overall felt I could do better. I iterated, this time using Eagle PCB design software. I extended to scope to capture the remaining components for each input and make it be able to plug directly into an Arduino Due.

There simple wasn’t enough room on the Arduino for 11 x 3.5mm TRS (audio jacks) inputs so I had to design the board with some margins to accommodate the inputs.

Version 1.1 was born

I followed this tutorial on Sparkfun for Eagle basics. You start by building your schematic in Eagle. You can pull in libraries of parts from places like Sparkfun which is really convenient. You then connect parts together using nets. Nets are like a virtual wire. Any wire/pin/whatever on Net1 will be connected.

After you’ve connected all your parts to nets, you then can switch to the PCB view. The PCB view will be a mess of parts all over but the important thing is that you can see how they’re connected by a yellow line. This is the virtual wire of the net. Organize your parts and click that ratnest button often. Don’t get too attached to one layout. I wish I had spent more time on one part of the board before moving on to duplicate my layout to the rest (ended up going back and changing all the things multiple times).

Here’s the most important thing I’ve learned when building boards: Take advantage of your copper layers!

I’m sure this is obvious to anyone but a newbie, but each layer of a PCB contains a copper plane. Most simple boards are dual layer, that means you have two planes of copper to work with. You will almost always need to connect many components to ground and power. Use one layer as a ground plane and another as power. Now components that need a ground or power connection get it almost for free, no need to route long traces!

In Eagle you choose the layer you want to work on and draw a polygon then click the ratnest button to connect components to that layer of copper. Note that for top layer components to connect to the bottom copper layer, you will need to use a via.

I submitted the board to OSH Park for fabrication and ordered all the parts off mouser. Excited to test out the board. Next post I will talk about how assembling the board using SMD components go (I have three boards on the way, bound to screw up :)). Fingers crossed.

Posted in arduino, hardware | Tagged , , , | Leave a comment

dc414 June going on now!

Just look for the sign!

-darkwind

Posted in Firsties | 1 Comment

OSINT Links

Belouve did a presentation on OSINT and TraceLabs. Here are some links relevant to that talk, or from the slide deck:

Join TraceLabs (You will likely need to register and join their Slack)

Free PDF on OSINT

Hunchly Tool and Hunchly Training

IntelTechniques Menu (select items over on the left side). Also this site is where you can download Buscador OS

OSINT Dashboard

CherryTree (To take notes, is cross-platform) and Freeplane (mapping out connections)

I (Belouve) will probably keep this list updated as I get more resources dug up.

Posted in hacking, privacy, projects, recaps, social engineering, whitepaper | Leave a comment

December Meeting Recap

Boop.  Under construction for now.

An administrative header:

  1. We are indeed horrible at updating the site.  I pledge to fix this, but I’ve said that before.
  2. Meetings will always happen.  First Friday of the month.  Click that calendar in your taskbar.  Is it the first Friday of the month? Yes? Then we have a meeting at 7 and you should be there, even if you get there late, don’t worry.  Today is not the first Friday? Then get hyped for the next meeting. Also: https://www.meetup.com/dc414group/
  3. I was locked out of my account and had problems resetting it.  The root problem was found to be related to salty meat that comes in a can.  In other words: SPAM.  As you can tell, I’m back in now.
  4. Meetings do have rules, DC414 has rules.  I’m not bothered to define them right now, but I want to establish that we’re not crazy anarchistic and if something bugs you about a meeting, let us know.  We really only say something if it gets to be a problem.  In summary, our rules derive from DEFCON, and are mostly “Don’t be a dick”
  5. The Meeting Recaps are what I’ve seen, or what the other writers have seen.  There is almost always some other cool thing that I didn’t see or write down.  If I missed a cool thing that happened, just give me a writeup on it and I’ll get it out there.
  6. We are really growing.  Seriously, about 20 or more per meeting, lots of fun things.  And we’re glad you showed up even if we didn’t get a chance to tell you that directly.

Okay, so on to a summary of cool things we did this past meeting.  I’ll update with video and images when I can.

Under construction.

Lots of chatter

This meeting was a lot more social.  Less demos, and more talking with each other.  Seems to just be the December motif, and that’s fine if it is more social than demos. Lots of beer swapping, candy, and candy corn beer.

Nothing that a good probing can’t fix

There was discussion over tracking down a possible break in an ethernet cable at someone’s place of business.  Another hacker was kind enough to bring in an amplifier probe, and demo’d how that would track down a break.

   

Safe Dial

Messed around with a safe dial that was mounted on an orange acrylic stand.  We didn’t know the combination, but we figured it out. And then set a new one.

And in a first for DC414, I will include the details of that combination:

We chose to do the square of 414.  414 x 414.  Which is 171396.  So the combination is 17-13-96.  Congrats, you know the combination to a lock on an acrylic stand, that secures nothing.  It is a really janky combination, and talk to one of us and we’ll go over why.

This lock will also probably be tuned and updated.  We’ll practice safe dial manipulation later.

But can you pick it with a fork?

This will be the writeup on the lock that we picked with a plastic fork.  Pictures and video support this, and will be put here in a fun writeup.

So, again, under construction, but I’m getting something out there as soon as I can.

  • Belouve
Posted in meetings, picking, recaps | Leave a comment

November, and future!

So if it’s not apparent, we’re terrible at actually updating the website. November meeting is taking place as scheduled, see you Friday the 2nd!

If you’re reading this and it’s past November, check the meeting link above. 1st Friday of every month!

-darkwind

Posted in Firsties | 1 Comment

May’s meeting days away.

Our next meet is happening on Friday! see https://www.dc414.org/meetings/ for location details.

This meeting I will be doing one of the more interesting demos I did a few years back.
did someone say laser microphones? (note to some of the other members… no 5mw or higher lasers please…)

See you there!

Posted in Firsties | Leave a comment

Welcome to 2018!

dc414’s next meet is tomorrow, 2/02/2018. Will the hacker see his shadow? I hope so, because that means he’s at dc414!

Meetings are always 1st Friday of the month. See Locations for details!

-darkwind

Posted in Firsties, group news, meetings | Leave a comment

October’s meet is days away!

Our next meet is happening on Friday!  see https://www.dc414.org/meetings/  for location details.

See you there!

-darkwind

Posted in Firsties | Leave a comment

1337 badge from the shoot won!

The 1337 BoomBadge has been won by yours truly!  Thanks to BMPTS for the awesome work on this!  See you next year!

 

 

If you are curious what’s on the bottom, and want to know more, check out patents 2,844,902 and 1,288,797.

-darkwind

Posted in Firsties | Leave a comment

January Meeting Recap

Starting the new year off with MOAR RECAPS.  I (Belouve) did not get there at the start, so I will recap what I was told by others.  People can fill in details if they want.

SoftEther VPN

 

We had a demo on SoftEtherVPN (“SoftEther” means “Software Ethernet”). This is a multi-protocol VPN software, that runs on Windows, Linux, Mac, FreeBSD and Solaris.

Also open source, and free.  You can go from Open VPN to SoftEtherVPN smoothly.  Check out the site for other highlighted features I haven’t listed here.

We’re being hacked by Russia, right? …. Right?

Belouve arrived and set up a talk digging into the details of the recent “Russian” hacking.  Pointing to the US-CERT report and the files they sent, only 2 out of the 911 indicators given by US-CERT point to Russia.  The reports on APT28 and APT29 cite some vague ‘evidence’.

One of the best things is that an APT29 report (see page 9) references the use of MiniDuke malware as being Russia.

So Belouve looked up the MiniDuke specifics, binaries, breakdown, etc.

The word ‘Russia” does not appear anywhere in the report.

But…MiniDuke does open up a backdoor…

to Turkey (See page 22)

Discover Recon Script

Belouve demonstrated his slimmed-down version of Discover Scripts, which he has available at https://github.com/belouve/discover

Credit given: the original discover script is made by Lee Baird, as available here. My version has slimmed his down, and I have updated some other steps.

This script is tuned to do as much passive recon on a target as it can, without touching the target and alerting it to its scan.

Uses ARIN, dnsrecon, goofile, goog-mail, goohost, theHarvester, Metasploit, URLCrazy, Whois, PGP Keys, multiple other websites, and then recon-ng.

The recon-ng modules scrape Bing, Google, Hackertarget, Netcraft, Shodan, Threatcrowd, GitHub, Twitter, LinkedIn, Whois, and Censys.io for information.  It parses and pivots the information gathered from other modules and earlier steps.

Take a look over the tool, it is constantly being tweaked.

Vlad’s LED Tree of LED Glory

Vlad did a demo on his multicolored individually-addressable LED tree.  Big tree, and I feel a video would go best here.

DEFCON Groups Update

Message from DEFCON groups.  Yay DC414 for actually responding to and doing the challenge!

Next Meeting

Next meeting is Friday, February 3rd.  Same bat time, same bat channel.

 

Posted in Firsties | Leave a comment