From 48508121e5a260e53d9cecc52c5e4da584591aa3 Mon Sep 17 00:00:00 2001 From: "Adam A.G. Shamblin" Date: Tue, 22 Oct 2019 14:56:05 -0600 Subject: [PATCH] Drafts --- content/kali-pi-usb-gadget.md | 111 +++++++++++++++++++++++++++++++++ content/malgrandan-temojn.md | 20 ++++++ content/notes-about-october.md | 58 +++++++++++++++++ pelicanconf.py | 2 +- 4 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 content/kali-pi-usb-gadget.md create mode 100644 content/malgrandan-temojn.md create mode 100644 content/notes-about-october.md diff --git a/content/kali-pi-usb-gadget.md b/content/kali-pi-usb-gadget.md new file mode 100644 index 0000000..07ba701 --- /dev/null +++ b/content/kali-pi-usb-gadget.md @@ -0,0 +1,111 @@ +Title: Kismet / Kali Linux Pi Zero WiFi Attack Sidecar +Date: 2019-09-29 +Category: Security +Tags: hacking, linux, security, kismet, kali, linux +Status: draft + + +It's a breezy autumn Sunday. It is warm, the sky is clear and after this past +week the trees are certainly showing the season. Nights have been cool and the +forecast says the days will soon be as well. A favorite soup recipe is on the +menu for tonight's dinner and I'd hoped to make baguettes to go with it, but +I'll be damned if I can get dough to agree with me today. After two botched +attempts, looks like I'll be running to the bakery before dinner. + +Baking foibles aside, I have had some luck lately making a [Raspberry Pi +Zero](https://www.raspberrypi.org/products/raspberry-pi-zero-w/) into a [USB +Ethernet Gadget](https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget) +While I was able to do most of what I wanted following Lady Ada's instructions, +I did encounter a few gotchas, plus I wanted to do the same thing but running +[Kali Linux](https://www.kali.org) instead. + +## Why do I want this? + +Typically I do most of my work on my now-aging MacBook Pro, running Kali Linux +on a virtual machine. This is a typical setup and generally works just fine. +Where it falls down is when I'm playing with my +[RTL-SDR](https://www.rtl-sdr.com/) software defined radio, or my Great Scott's +[YARD Stick One](https://greatscottgadgets.com/yardstickone/). For some reason I +just can't get the devices to behave or to stay online, a problem I haven't had +running Linux on the metal. I've also had occasional trouble running wifi +attacks on external hardware. While I do intend to move back to a Linux laptop +in the foreseeable future, it would be nice to have a small, easy-to-use Kali +machine in my pocket when the need arises. The Pi Zero also lends itself to some +naughty use cases, what with it's super-small form factor. + +So, I'm going to document here exactly how I get my Pi setup and configured, up +to and including getting [Kismet](https://www.kismetwireless.net/)set up for +portable WiFi mischief. For the remainder of this write-up, I'm assuming you are +running on an up-to-date version of MacOS. Linux should be similar up to a +point, but you Window$ users are on your own. + +## Download and flash MicroSD + +First off, download the latest [Kali ARM +image](https://www.offensive-security.com/kali-linux-arm-images/) for the +Raspberry Pi Zero/Zero W. Before you transfer the image to your SD card, verify +it's hash against the one presented next to the image's torrent link. + +```shell +$ shasum sha256sum ~/Downloads/kali-linux-2019-3-rpi0w-nexmon-img-xz/kali-linux-2019.3-rpi0w-nexmon.img.xz +0c06f7220f585552e57bcd62a683d4ef6a6409cfd6ea3d63ce96c39792acd918 /Users/adam/Downloads/kali-linux-2019-3-rpi0w-nexmon-img-xz/kali-linux-2019.3-rpi0w-nexmon.img.xz +``` + +While you can use `dd` to write the image to your SD card, I've found +[balenaEtcher](https://www.balena.io/etcher/) to be easier and much faster doing +basically the same thing. They must know exactly which switches to flip. In any +case, select your verified image and target SD card and click "Flash!" + +## Configure USB gadget + +Flashing your card will take a bit, I think it took about 15 minutes to flash +and validate on my machine, your mileage may vary. Once that's done, eject and +re-insert the SD card. The next couple of steps will be done directly to files +on the root of the card's filesystem. These steps are basically verbatim from +Lady Ada's tutorial referenced above and below. + +### Edit config.txt & cmdline.txt + +My SD card mounted at `/Volumes/NO\ NAME/`. + +First add `dtoverlay=dwc2` to the last line of `config.txt`. + +```shell +echo "dtoverlay=dwc2" >> /Volumes/NO\NAME/config.txt +``` + +Next open up cmdline.txt and at the end of the first line, after `rootwait` add +`modules-load=dwc2,g_ether`. + +```shell +dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 +rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether +``` + +### Enable SSH + +Super easy, enable SSH into the Pi be dropping an empty file called `ssh` at the +root of the SD card: + +```shell +touch /Volumes/NO\ NAME/ssh +``` + +Now we should be able to boot up and ssh into our Pi. Eject your SD card from +your host computer, insert it into your Pi, and plug a USB cable from your +computer to the Pi. Be sure to use the port labeled "USB" and not the one +labeled "PWR". + +## Enable networking + +## Update Kali + +## Install Kismet + +## Configure wireless device + +## References + +* [Turning your Raspberry PI Zero into a USB Gadget](https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget) +* [Share an Internet Connection with a Raspberry Pi Zero over USB](https://stevegrunwell.com/blog/raspberry-pi-zero-share-internet/) +* [Official Kismet Packages](https://www.kismetwireless.net/docs/readme/packages/) diff --git a/content/malgrandan-temojn.md b/content/malgrandan-temojn.md new file mode 100644 index 0000000..56f78ac --- /dev/null +++ b/content/malgrandan-temojn.md @@ -0,0 +1,20 @@ +Title: Malgranda Temoj ke Elĉerpas Mian Atenton +Date: 2019-09-19 +Category: misc +Tags: esperanto, fountain pens, books +Status: draft + + +Hieraŭ mi ricevis libron en la poŝto, [Ne Ekzistas Verdaj +Steloj](http://www.esperanto.net/literaturo/novel/novlibr/neverdstel.html) per +Liven Dek. Mi aĉetis la libron antaŭe mi vidas ĝin antaŭ tri aŭ kvar monatoj ĉe +esperanta renkontiĝo. Mi ŝatas la mallongan aranĝon de le libro ĉar ĝi estas pli +facile ol longaj libroj, kiam mi lernas. Dum mi legas kaj skribas sufiĉe bone, +mi bezonas multe pli praktiko. La libro havas sesdek rakantojn, kiuj havas nur +unu aŭ du paĝojn. + +Ĉar mi ne havas komunomo kun kiu praktiki paroladon, estas malfacila daŭrigi +mian esperanton. Iun tagon, mi ricevis mesaĝon sur Amikumu de iu en la areo, ke +li kaj iuj uloj renkontiĝis en proksima parko. Mi iris kaj trovis du junoj +knaboj, eble dudek jaroj. Ni parolis por cirkaŭ hora kaj mi strebis plej bone +paroli. Mi ne pensas ili plu vokos, sed ĝi estis amuze. diff --git a/content/notes-about-october.md b/content/notes-about-october.md new file mode 100644 index 0000000..c989cdf --- /dev/null +++ b/content/notes-about-october.md @@ -0,0 +1,58 @@ +Title: Mid-October Rambles +Date: 2019-10-14 +Category: misc +Tags: hacking, events +Status: draft + + +## I've let a month go by... + +It's not that I haven't been writing, but I have had trouble finishing things +lately. It's been easy to get caught up in the day-to-day, and maybe that's a +good thing. I don't know if I should get caught in the industrial mindset trap +of measuring my self worth by my productivity. + +I do have a couple more write-ups in the works, with a couple of minor snags +I'll need to work out before I publish them here, perhaps in an abbreviated +form. I tend to write down a lot of what I work on while I'm working, and +sometimes things don't work out the way I'd intended. + + +## Kali Linux Pi Zero Wifi Attack Sidecar + +For example, I'd been working on a Kali Linux based, Raspberry Pi Zero W USB +Ethernet Gadget. You may have read about [turning a Pi Zero into a USB +Gadget](https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget) +as written by Lady Ada. This works very well on stock, light Raspbian, but I'm +afraid that on a Kali image, even with the [re4son +kernel](https://whitedome.com.au/re4son/download/re4son-kernel-current/), +doesn't seem to have everything you need to do the same. This means that I +haven't been able to connect privately via ssh over USB, which I felt made for a +really cool, portable gadget. I also found that the Pi Zero had trouble +delivering enough power to my external ALFA wifi adapter, which I believe is the +cause for some pretty predictable freezes of the system any time I try to +interact with, or even list, that device. When I can, I'll try to summarize what +I encountered and put it up here. + + +## Ĉu vi legas la Esperanton? + +I've started one article a translation of another into Esperanto. My study of +the language tends to ebb and flow, and I'm ebbing right now for sure. +Translating technical articles into Esperanto proves to be an interesting +challenge, even with the help of [Komputeko](https://komputeko.net/). It's a fun +process, but time consuming. I've also enjoyed trying to get my thoughts out as +an Esperanto-first exercise. Again, put it on the to-do list. Or the drafts +folder. Whatever. + + +## Toys! + +I haven't been totally unproductive! Lately I've been refreshing some old +hardware and giving existing systems some much needed updates. + +For the last couple of years I've been running my own, home built gateway and +firewall based on OpenBSD and pf. It's been a pretty bare-metal setup with no +additional packages after the initial install. I learned to configure `pf` +myself, as well as to set up unbound as my local, caching, forwarding DNS +server that sent requests via DNS over HTTPS to 9.9.9.9 and 1.1.1.1. diff --git a/pelicanconf.py b/pelicanconf.py index 4ce9dc8..62c7da8 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -41,7 +41,7 @@ SOCIAL = (('GitHub', 'https://github.com/coyote240'), ('LinkedIn', 'https://www.linkedin.com/in/adam-shamblin/'), ('Webring', 'https://webring.xxiivv.com/#random')) -DEFAULT_PAGINATION = 10 +DEFAULT_PAGINATION = 5 # Uncomment following line if you want document-relative URLs when developing RELATIVE_URLS = True -- 2.39.5