Posts

Showing posts with the label hacking

K.C.'s 2022 summary of the Information Security field

A few years ago, a friend reached out with a question:  Her daughter was studying cyber-security and software development at a university, and she wanted to know my take on Information Security as a career field.   So I sat down and wrote up the following summary.   I think it's largely still accurate, and I've been asked for it again, so I figured I should just post it somewhere I can link to it. Disclaimer 1 :  This was written in 2022, prior to the AI uprising and the sudden massive contraction of the tech industry.   Disclaimer 2 :  I'm a Security Director / Architect / Engineer.  Below is my view on the industry landscape.  It is by no means complete  and is likely an artifact of my personal journey.  Others' views will be different.  Deal with it.  🕶️ -=-=-  Greetings! Infosec / cyber security is a VAST field.  It's awesome that you're interested in software development as well, though!...

HowTo: GeoIP restrictions for Amazon Linux 2

Image
Background: I have a few Amazon Linux 2 EC2 instances that I run for personal use.  Generally, I restrict "important" / remote access services to my home egress IPs, but for services that I expect to be generally available I cannot do that. Anyone who has hosted a service on the public Internet knows that it's a matter of minutes after the service comes online before it starts being probed by all manner of scanners, exploit scripts, curious hackers, botnets, &etc.  No big deal, just build secure services, right? Naturally.  But "defense in depth" dictates that if you can  filter out a large percentage of these requests, you should.  As doing so not only reduces the load on your service, but also reduces the likelihood of your service being tagged by some unforeseen exploit. Enter:  Maxmind's GeoIP database and the xtables-addons GeoIP filter .  With the geoip module you can easily use iptables to restrict traffic to only those countries you know y...

TOWL - Telemetry over Opportunistic WiFi Links

Image
Premise & Background: Can you build a "LoJack" style asset tracking capability using open WiFi hotspots? The proliferation of cheap, lightweight WiFi embedded ("IoT") devices made me wonder.  The WiFi association stack, DHCP client stack, et al. has to be incredibly lightweight and simple to fit in the firmware on, say, an ESP8266.  If you programmed one to scan, find an AP, associate, get an address, and send a single packet - would it be able to do it fast enough to report its location from a moving vehicle? [Aside: This is actually something I've wondered about for years, but the IoT chips offered a unique and low-cost way to try it.] "But wait," you say, "there really aren't that many open APs these days.  Most of them are captive or paywall portals, or at least make you agree to some goofy ToS." Right, but as has been pointed out multiple times by multiple people all the way back to Dan Kaminsky's DNS tunneling ta...

Installing mitmproxy on a Raspberry Pi / Raspbian Jessie

Image
This post is a quick list of the steps it took to install mitmproxy on a vanilla Raspbian Jessie install on a Raspberry Pi.  The compile steps take quite a while, which made the trial-and-error method of figuring out which libraries were missing to be a painful process.  Hopefully this post will make it easier for anyone else trying to do the same thing. Naturally, do $ sudo apt-get update && sudo apt-get upgrade  first to bring everything up to date. Missing libraries: python-dev libxslt1-dev libxml2-dev libffi-dev libssl-dev Fairly simple, just do: $ sudo apt-get install python-dev libxslt1-dev libxml2-dev libffi-dev libssl-dev  Out-of-date library: mitmproxy requires pyasn library >= 0.1.8.   (As of this writing, the latest in the repo is 0.1.7) Check your installed version: $ dpkg -l | grep pyasn                                   ...

Programming a generic STM32F103C board in Arduino

Image
A while back I purchased some generic STM32F103C8T6 development boards on eBay for about $4 each.  I initially had some limited success programming them using the GCC ARM Embedded (eabi) toolchain and a generic STM32 loader program.  Since then I've discovered a project to get them working with the Arduino 1.5+ toolchain. There's a lot of different information about the various STM32 boards out there.  I'm documenting my notes here mostly for my own sanity since I don't play with these boards often.  Maybe you'll find it useful too. Arduino hardware library for these boards: https://github.com/rogerclarkmelbourne/Arduino_STM32 "Support" forum:  http://www.stm32duino.com/ The USB port The generic boards do not have a meaningful USB bootloader.  The USB port is only useful for power.  (TODO: Flash the "Maple Mini" bootloader onto them for future ease of use?) Arduino Board Selection & options Tools -> Board -> Generic S...

Live Streaming TV for the Dodge Caravan

Image
The 2010 Dodge Caravan SXT I recently acquired has an interesting feature - a built in "Vehicle Entertainment System" complete with two rear screens, two DVD players, two aux video/audio inputs, and multi-channel IR headphones. This is all cool, but who wants to be stuck watching things they happen to be carrying around on DVD?  This is 2013, the age of streaming media!  Immediately, I started pondering how I could bring this system up to date with the current state of ADD-inducing, "always-on" streaming media entertainment! I. Video in Motion First thing's first.  The Chrysler/GM "MyGig" system has a Lawyer-induced feature of disabling any video from the head unit when you put the vehicle in drive.  That's rather annoying!  I don't condone watching a movie while you're supposed to be driving, but I'd rather that I dictate to the technology what to do, not the other way around.  Thankfully, there are a couple of companies that mak...

Digispark and programming a raw ATtiny85 with Arduino

I was a backer of the Digispark last year, and love these little devices.  For those who haven't seen them, the Digispark is a tiny ~ 1 inch square board with an Atmel ATTiny85 microcontroller, male USB pins, and custom bootloader to allow it to be programmed directly from a computer USB port. More succinctly- It's the smallest, cheapest, and easiest way to build a simple Arduino project that doesn't require the larger Atmel microcontrollers. After playing with my initial three Digisparks for a while, I started coming up with uses for the ATtiny85 that made even the Digispark overkill.  For these simple circuits I didn't want (or need) the bootloader or the USB IO.  I just wanted a way to flash my code onto the raw ATtiny85 and move on.   Enter littlewire - a simple Atmel AVR programmer based on the ATtiny85 and it's ability to implement USB in firmware. Littlewire uses the same IO pins as the Digispark, so you can actually just flash the existing littlewir...

Accessing Google Cloud SQL externally from Python

I started playing with Google Cloud SQL recently, hoping to use it to tie together a data collection application I run on a home server with an Google AppEngine interface for querying the data.  The problem came when I realized that the only external interface into Cloud SQL is via a JDBC driver, and my program was written entirely in Python. After some toying around, I successfully got the Google Cloud SQL JDBC driver to work from within Python 2.7 under the Python JayDeBeApi module and jpype. I'm documenting the final steps here in case I need them later.  YMMV Set up a Google Cloud SQL instance and database. This will also require you to register a project in the developer console, and enable billing if you haven't already.  I'm using the temporarily available free trial of Cloud SQL, but you have to have billing associated with the account in case you exceed the free trial quota. On the system you want to connect to Cloud SQL from: Make sure you have a working JV...

Quick & Dirty theory on mcwolles' "Waterfall"

Image
mcwolles made an amazing 3d working representation of M.C. Escher's "Waterfall" : http://www.youtube.com/watch?v=0v2xnl6LwJE It is nothing short of awesome. Below is my quick & dirty guess as to how it works:

Sony, Security, and Consumer's Rights

Many of you saw my recent tweets complaining about the Sony PlayStation 3 firmware update version 3.21 that cripples the second operating system "OtherOS" feature of the PS3. Since then, I've received several questions as to why I thought Sony would remove such a feature, and why I cared so much. The answers to both questions require more than 140 characters. Here, I will try to explain. The PlayStation 3 as a Computing Platform Briefly, the PS3 is an amazing computing platform. It boasts a 7-core 3.2GHz IBM PowerPC cell processor architecture unlike pretty much anything available at even twice the price. It works with USB and Bluetooth Wireless input devices (mouse, keyboard, gamepads, &etc), has HDMI, Composite, and Component video outputs, digital audio output, an internal SATA hard drive, 802.11b/g wireless, and a Blu-ray DVD-ROM drive. Sony has, from the start, marketed the fact that this amazing "game console" also supports the ability to run Linu...

Video of DEFCON 17 talk: 1964 Modem Demo

The video of my DEFCON 17 talk has been uploaded to VIMEO, in case you want to see it: Old Skool Brought Back: A 1964 Modem Demo on Vimeo . Thanks to Jason Scott of Textfiles.com .

Speaking at DEFCON 17

I'll be speaking again at DEFCON this year, this time about the c. 1964 Livermore Data Systems modem that I have. So come out if you want to see it (and me) in person and watch a live demo. I've got some interesting things lined up, including some demos showing the versatility of the ancient Bell 103 modulation system used by the modem. Cheers! - K.C.

Metropolitan Industrial - Aerial Reconnaissance

Duckie and I took the Cessna into town to shoot some aerial photos of the Metropolitan Industrial location for Freeside Atlanta .

Freeside Atlanta - Speculative Spaces

Metropolitan Industrial: The "Metro" is a large warehouse space divided into three main partitioned areas. The first area has an enclosed space occupying roughly 60% of the width of the space. That enclosed area has a couple of single-office sized rooms (one of which is psychadelic painted with glow-in-the-dark stars) and a bathroom with a working shower in it. The second partitioned area has a kitchen built in it, complete with counter space, a kitchen sink, a range, a dishwasher, and an "island" counter with electrical power and storage space. At the back of the second partition is another enclosed space with two small office-style rooms, another closed-sized bathroom, and a weird small unfinished alcove-like room (not photographed). The third partitioned area is open warehouse space, with a small semi-wall dividing it from the two large roll-up garage doors in the back. My photos do not include the front area's enclosed rooms because they had dark...

New Hosting Provider, mysql & Wordpress Unicode Issues

Hi folks! Just a quick note - I've moved to a new hosting provider. If you see anything wonky, broken links, or other such weirdness shoot me an email. When I first migrated the database (a few days ago) I ended up with some spurious Unicode characters scattered throughout the website. (E.g. lots of strange à characters stuck in around words, &etc.) Turns out the problem was mysql. Wordpress was correctly backing up the database as utf8, but when I re-imported it, it was re-encoding it for some reason. The solution was to add "--default_character_set=utf8" on the mysql command line during the database restore/import. E.g.: # mysql --default_character_set=utf8 -u{username} -p{password} {dbname} -h {hostname} Deleting and re-importing the database with the --default_character_set option fixed it right up! (I'm posting this as a reminder to myself as well.) Cheers! - K.C.

1964 Livermore Data Systems Model A modem - followup

Image
Alright, here's some photos of the beast: And, in no particular order, some answers to the questions I've received: 1. This modem uses Bell 103A modulation, in "Originate Mode" only. Unfortunately, that means you probably couldn't have two Livermore Data Systems Model A modems talk to each other. The "Model C" seems to be the first one that also supported "Answer Mode" modulation. 2. This modem is solid state; it uses transistors (albeit early, metal canister ones.) It doesn't have vacuum tubes in it. (Whew!) It functions exactly as I received it twenty years ago - I haven't modified or repaired it in any way. Yes, I am as amazed as you are! :-) 3. The host used in the video, as well as all the accounts, credentials, &etc, were set up in my lab specifically for testing the modem and were taken down the next day. Hence, I didn't have to worry about obscuring my typing or login credentials, &etc. Than...

Circa 1964 Livermore Data Systems Model A Modem

So I was going through some old stuff in my garage and I found this antique modem that I've had since I was a teenager.  Turns out it's a Livermore Data Systems "Model A".   I decided to hook it up and see if it works, and I made a YouTube video in the process: I'll get around to posting some better photos of it this weekend, I promise!

Python script to get SSL Certificate information

Some time ago I needed an automated way to get the certificate DN, signing cert DN, and expiration date from a bunch of SSL web servers. I couldn't find a free tool out there to do that, so I hacked up this script in python. You provide it the IP address and it connects, retrieves the aforementioned information, and spits it out. There isn't any error handling &etc, but I thought someone else might find it helpful. Or use it as a starting point for something more advanced. It requires the M2Crypto library, since the built-in SSL library for python is SORELY LACKING in functionality. EDIT: 2010.01.26 - Fixed broken link caused by new hosting provider! Grab it here: sslprobe.python

DEFCON 16 Slides Available

If you are attending DEFCON this year (or just want to see my slides), the final incarnation of my slides are available here: http://phreakmonkey.com/dc16-ue.zip The slides on the DEFCON CD are out-of-date. Also, thanks to everyone who came out to the EFF party last night! My talk is on Saturday at 3:00pm, track 5. :-) EDIT 2008.08.12: Another year, another DEFCON gone by.  A quick THANK YOU to everyone who makes DEFCON possible (if you attended that includes you!), and thanks to everyone who attended my talk or walked up to me at some point during the con to share your personal Urban Exploration experiences!  It was a lot of fun.  See you next year!

Slackware 12.0 on a Nortel Contivity 1010

Image
My company recently de-installed and discarded dozens of these little Nortel Contivity 1010 VPN devices. I pulled one apart and discovered it's basically a tiny Intel Celeron PC with no keyboard/mouse interface, one serial console port, and two 10/100 Ethernet ports. I decided it would be fun to get Linux to run on one so I could play with it... maybe use it as a small firewall, router, or OpenVPN endpoint. I built a stripped-down install of Slackware-12.0 with Linux kernel 2.6.21.5. The install includes (amongst other things): OpenSSL OpenSSH OpenVPN iptables dnsmask dhcpcd For more information, and the distribution, see my project page at: http://cdn. phreakmonkey.com/projects/Slackware-c1010