Skip to content

Commit b34c3cb

Browse files
author
Mike M
committed
first commit
1 parent e10c7ed commit b34c3cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+863
-22
lines changed

_config.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ theme: jekyll-theme-chirpy
99
lang: en
1010

1111
# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker
12-
timezone:
12+
timezone: America/Los_Angeles
1313

1414
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
1515
# ↓ --------------------------
1616

17-
title: Chirpy # the main title
17+
title: Mike's Lab # the main title
1818

19-
tagline: A text-focused Jekyll theme # it will display as the sub-title
19+
tagline: Projects, Networking, Science! # it will display as the sub-title
2020

2121
description: >- # used by seo meta and the atom feed
2222
A minimal, responsive and feature-rich Jekyll theme for technical writing.
2323
2424
# Fill in the protocol & hostname for your site.
2525
# e.g. 'https://username.github.io', note that it does not end with a '/'.
26-
url: ""
26+
url: "https://mikemjm.github.io"
2727

2828
github:
29-
username: github_username # change to your github username
29+
username: mikemjm # change to your github username
3030

3131
twitter:
3232
username: twitter_username # change to your twitter username
@@ -38,8 +38,8 @@ social:
3838
email: [email protected] # change to your email address
3939
links:
4040
# The first element serves as the copyright owner's link
41-
- https://twitter.com/username # change to your twitter homepage
42-
- https://github.com/username # change to your github homepage
41+
# - https://twitter.com/username # change to your twitter homepage
42+
- https://github.com/mikemjm # change to your github homepage
4343
# Uncomment below to add more social links
4444
# - https://www.facebook.com/username
4545
# - https://www.linkedin.com/in/username
@@ -76,7 +76,7 @@ theme_mode: # [light | dark]
7676
img_cdn:
7777

7878
# the avatar on sidebar, support local or CORS resources
79-
avatar:
79+
avatar: avatar.png
8080

8181
# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
8282
# It can be overridden by a customized `page.image` in front matter.

_data/contact.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
- type: github
44
icon: "fab fa-github"
55

6-
- type: twitter
7-
icon: "fa-brands fa-x-twitter"
6+
# - type: twitter
7+
# icon: "fa-brands fa-x-twitter"
88

9-
- type: email
10-
icon: "fas fa-envelope"
11-
noblank: true # open link in current tab
9+
# - type: email
10+
# icon: "fas fa-envelope"
11+
# noblank: true # open link in current tab
1212

13-
- type: rss
14-
icon: "fas fa-rss"
15-
noblank: true
13+
# - type: rss
14+
# icon: "fas fa-rss"
15+
# noblank: true
1616
# Uncomment and complete the url below to enable more contact options
1717
#
1818
# - type: mastodon
1919
# icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/>
2020
# url: '' # Fill with your Mastodon account page, rel="me" will be applied for verification
2121
#
22-
# - type: linkedin
23-
# icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
24-
# url: '' # Fill with your Linkedin homepage
22+
- type: linkedin
23+
icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
24+
url: 'https://linkedin.com/in/mike-maetta-50790123b' # Fill with your Linkedin homepage
2525
#
2626
# - type: stack-overflow
2727
# icon: 'fab fa-stack-overflow'

_posts/2022-01-03-security.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Securing My Detached Garage
3+
date: 2022-01-03 12:00:00 -500
4+
categories: [security,networking]
5+
tags: [security,networking,raspberry_pi]
6+
---
7+
8+
![featured_image](/assets/security/featured_image_garage_network.png)
9+
10+
### Adding security to my garage by using an access point, router, a Raspberry Pi, and camera.
11+
12+
The new apartment complex I recently moved into provided me with a detached garage, however it was quite the distance away from my actual apartment, and I would be uneasy storing anything inside without some kind of monitoring system. So I set upon the task of extending my network into the garage so I could monitor the interior and receive alerts if anything were to happen inside.
13+
14+
#### Hardware for this project:
15+
16+
* Raspberry Pi
17+
* PIR motion sensor
18+
* Exterior WiFi AP
19+
* Router
20+
* IP camera
21+
22+
According to the measuring tool in Google Maps, the distance between the apartment and garage is about 160ft. The garage is also not in direct line of sight as the WiFi signal will need to traverse through some trees and the corner of a building.
23+
24+
![WindowAP](/assets/security/WindowAP.png)
25+
26+
Inside the garage will be another router which will be mounted as close to the exterior wall as possible. An important thing to note is that all of these devices will be operating at 2.4GHz. Choosing 2.4GHz over 5GHz is better in this scenario because of the distance and obstructions involved.
27+
28+
![garage_equip](/assets/security/GarageEquip.png)
29+
30+
#### Setting Up The Wireless Devices
31+
32+
Now that the hardware is mounted and powered up, it’s time to do some configuration. The exterior AP has already been configured as a basic WiFi AP for the devices inside my apartment. All we have to do at this point is setup the garage router and have it connect to the outdoor AP.
33+
34+
The garage router can operate in three different modes:
35+
36+
* Station – Router connects to the remote AP and provides connectivity through its 4 ethernet ports.
37+
* Access Point – Router acts like a standard access point, providing WiFi/ethernet for a home/office environment.
38+
* AP-Repeater – The router connects to a remote AP, provides connectivity through its ethernet ports, and also extends the ESSID, extending the wireless range of a network.
39+
40+
![station_settings](/assets/security/station_setting.png)
41+
42+
After selecting the operating mode we can now click on the “select” button as seen above. This will bring up a list of nearby access points. Just find that one that you want to connect to and then click “Lock to AP”, and then enter the required credentials.
43+
44+
![lock_to_ap](/assets/security/lock_to_ap.png)
45+
46+
After entering the credentials the connection came up a few moments later with better signal strength than anticipated!
47+
48+
![stats](/assets/security/GarageRouterStats.png)
49+
50+
Success, I now have network connectivity!

_posts/2022-01-16-paspir.md

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Detecting Motion with a Raspberry Pi
3+
date: 2022-01-16 12:00:00 -500
4+
categories: [security,networking]
5+
tags: [security,networking,raspberry_pi]
6+
---
7+
8+
![featured_image](/assets/paspir/PIR-Alert.webp)
9+
10+
### Receive alerts from your Raspberry Pi when motion is detected.
11+
12+
Setting up a motion sensor on your Raspberry Pi is a fun and easy project, and can be used for many different applications. You can push alerts to your phone, activate lights, or even set off a siren when motion is detected. Here I will show you how I setup a simple PIR motion sensor in my garage which will push alerts to my phone if motion were to be detected.
13+
14+
#### Tools for this project:
15+
16+
* Raspberry Pi (I used an old Raspberry Pi Model B)
17+
* PIR motion sensor
18+
* Breadboard (optional, but makes setup and testing easier)
19+
* Jumper wires (I love these for interfacing with the GPIO pins)
20+
* Basic Linux command line/text editor knowledge
21+
22+
### Wiring Schematic
23+
24+
![wiring_schematic](/assets/paspir/schematic.png)
25+
26+
For this project I would like alerts to be sent to my phone. There are several ways to do this, such as email, text, or pushing notifications through a third party app like Pushbullet or Pushover.
27+
28+
To get started you’ll need a Raspberry Pi running RaspiOS which comes with Python and all the required modules. You will also need to create an account with whatever third party app you wish to use, I will be using Pushover.
29+
30+
### Pushover Configuration
31+
32+
#### Step 1:
33+
34+
After creating an account you will be given a “User Key” as shown blurred out in the top right of the picture below. The Pushover application on your mobile device will ask you for this key once you sign in.
35+
36+
![pushover_setup](/assets/paspir/pushover_user_key.png)
37+
38+
#### Step 2:
39+
40+
Register the device that will be running the API (the Raspberry Pi). Scroll to the bottom of your dashboard and click “Create an Application/API Token”.
41+
42+
![pushover_token](/assets/paspir/pushover_create_token.png)
43+
44+
#### Step 3:
45+
46+
Enter your preferred details, and then click “Create Application”.
47+
48+
![create_token](/assets/paspir/pushover_create_token_2.png)
49+
50+
#### Step 4:
51+
52+
After creation you will be presented with a token for your API.
53+
54+
![test_token](/assets/paspir/pushover_create_token_3.png)
55+
56+
#### Step 5:
57+
58+
Implement your user and API tokens into a Python script which will react based on the input on the Raspberry Pi’s GPIO pins. Create a new text document and view/copy the example below.
59+
60+
```python
61+
#!/usr/bin/python
62+
import RPi.GPIO as GPIO
63+
import time
64+
import http.client, urllib
65+
GPIO.setwarnings(False)
66+
GPIO.setmode(GPIO.BCM) # Note - using the BCM naming method
67+
GPIO.setup(4, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # GPIO 4 on the board is the PIR input
68+
var=1
69+
while var==1 :
70+
#IF THE PIR IS ACTIVATED
71+
if GPIO.input(4):
72+
#PUSHOVER API BELOW
73+
conn = http.client.HTTPSConnection("api.pushover.net:443")
74+
conn.request("POST", "/1/messages.json",
75+
urllib.parse.urlencode({
76+
"token": "YOUR PI API TOKEN HERE",
77+
"user": "YOUR PUSHOVER USER TOKEN HERE",
78+
"priority": "1",
79+
"message": "MOTION DETECTED!",
80+
}), { "Content-type": "application/x-www-form-urlencoded" })
81+
conn.getresponse()
82+
#PAUSE SENDING NOTIFICATIONS FOR 10 SECONDS
83+
```
84+
85+
Make your new script executable by running “chmod u+x filename” and then run it “python3 filename” Your script is now running, time to trigger the motion the sensor.
86+
87+
![alert](/assets/paspir/alert_pic.png)
88+
89+
Everything looks to be working! I recommend running the script as a service that way if your Pi loses power it will re-start the script while booting.

_posts/2022-02-06-windowsprivacy.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Windows Phoning Home?
3+
date: 2022-02-06 12:00:00 -500
4+
categories: [security,networking,privacy]
5+
tags: [security,networking,privacy]
6+
---
7+
8+
![featured_image](/assets/windowsprivacy/pssst.png)
9+
10+
### How often does Windows actually call home, and what can we do about it?
11+
12+
Unless you’ve been living as a hermit, you know about how privacy is now one of the main concerns people have with their internet connected devices. Our phones, computers, and other household smart devices are continuously phoning home, providing usage statistics, diagnostic information, etc. Some of us expect this, most of us are oblivious, and some are paranoid and lock their devices down. You can call me paranoid.
13+
14+
Microsoft has been the focus recently about how intrusive Windows 10 can be. It comes pre-packaged with apps that many don’t want, it forces unexpected updates, and it captures everything you type or say. They even admitted it!
15+
16+
***“When you interact with your Windows device by speaking, [handwriting], or typing, Microsoft collects speech, inking, and typing information – including information about your Calendar and People [contacts]…”***
17+
18+
![installation_face](/assets/windowsprivacy/10_installation_face.png)
19+
20+
#### The Experiment:
21+
22+
Wanting to see for myself how often Windows 10 phones home, I decided to conduct an experiment. I downloaded the latest installer from Microsoft and installed it inside a virtual machine. I setup the network adapter to send DNS requests to my Raspberry Pi’s DNS server to be captured.
23+
24+
![dns_settings](/assets/windowsprivacy/dns_settings.png)
25+
26+
Next I cleared the DNS logs on my Raspberry Pi and let the virtual machine sit idle for 30 minutes. Below is a fraction of the captured requests.
27+
28+
![windows_dns](/assets/windowsprivacy/windows_dns.png)
29+
30+
I did this same test again, this time with my main PC which is running Arch Linux loaded with hundreds of applications. The only requests being made were to check whether or not my PC had an internet connection.
31+
32+
![linux_dns](/assets/windowsprivacy/linux_dns.png)
33+
34+
It’s clear to me that Windows is a lot more chatty than my Linux PC. So what can Windows users do to help minimize unnecessary communication? There are a few tools available that automatically remove applications and tweak settings to limit the amount of data collection. This particular tool seems to be the most popular, O&O ShutUp10++. However, this tool is free and closed source. Be wary of programs like these, because “free” usually means you are the product. The creators make money by collecting information from you, such as usage statistics, and host device information. They then sell this information to 3rd party advertising agencies.

_posts/2022-03-23-policescanner.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Raspberry Pi Police Scanner
3+
date: 2022-03-23 12:00:00 -500
4+
categories: [scanner,raspberry_pi,audio]
5+
tags: [scanner,raspberry_pi,audio,audacity]
6+
---
7+
8+
### Record police and EMS activity in your community for later review!
9+
10+
Many large cities like Los Angeles or Phoenix have web based police scanners that enable the public to listen to local law enforcement activities with ease. However, if you live in a small city like me, those types of services usually don’t exist and you’ll need to have your own scanner. But then who has the time to sit around and listen to a scanner all day long waiting for something exciting to happen? Well I sure don’t, but at the same time I still wanted to know what goes on in my community.
11+
12+
To combat this problem I decided to take an old hand held scanner I had laying around and interface it with a Raspberry Pi. Before getting started I needed some supplies, see below.
13+
14+
* Raspberry Pi + Raspberry Pi OS /w Desktop
15+
* External USB sound card with ‘line’ or ‘mic’ inputs
16+
* Scanner that has an audio jack, preferably 3.5mm
17+
* Audacity (a powerful open source audio application)
18+
19+
#### Raspberry Pi with Required Accessories
20+
21+
![component_wiring](/assets/policescanner/components_wiring.jpg)
22+
23+
The scanner came with it’s own 5VDC power supply, which I had plugged into a power outlet. Powering it this way introduced an annoying 60Hz hum into the audio recordings. This was unacceptable, so I fabricated a USB/barrel cable to power the scanner from the Pi’s USB port. USB operates at 5V with a max output of about 1A depending on whether its USB2.0/3.0. This is fine because the scanner only needs 5V at about 250mA.
24+
25+
![usb_connector](/assets/policescanner/usb_barrel_connector.jpg)
26+
27+
#### Setting Up the Pi
28+
29+
For this to work I needed to be able to use Audacity’s GUI to manage recordings. To make it even easier I could even manage the recordings remotely via VNC. This meant I needed to install the version of Raspbian that came with a desktop. You can find it on the official Raspberry Pi OS download page. After booting up the Pi there are some settings we need to make. VNC access is not active by default and needs to be enabled via the ‘raspi-config’. It would also be a good idea to enable SSH at the same time to make remote management even easier. You can connect to the Pi using the RealVNC application which is available on mobile, Windows, or Linux.
30+
31+
![vnc_config](/assets/policescanner/raspberry_pi_vnc.png)
32+
33+
#### Using Audacity
34+
35+
After powering up the scanner and setting the volume to about half way and adjusting the squelch, open up Audacity. Click on the “Click to Start Monitoring” window and you’ll see the VU meter fluctuate based on the noise received from the scanner. Take note of how high the noise peaks so you can set the recording threshold appropriately.
36+
37+
The random noise picked up from my setup peaked at around -36dB. Now I must set the the recording threshold slightly above that, say about -30. After that, save the settings and hit record! You’ll notice it’ll record for a second at first and then stop. Once traffic is received on the scanner recording will start and stop as needed.
38+
39+
[![audacity_threshold](/assets/policescanner/audacity_threshold.png)](https://youtu.be/qP2elv4o63A)
40+
41+
Sit back relax, and await your first traffic capture.
42+
43+
[![audacity_threshold](/assets/policescanner/audacity_recording.png)](https://youtu.be/t_lmk9pd5rk)
44+
45+
I left the setup running for about 9 hours overnight and it captured about 24 minutes of traffic.
46+
47+
On average, I capture about 1.5 hours of traffic a day. Audacity makes it easy to comb through the recordings and pick out stuff that looks interesting, such as a longer than usual transmission which typically indicates that something interesting has happened. After some time you’ll be able to identify traffic patterns which in turn makes it easier to pick out the interesting stuff.
48+
49+
It would be nice at some point to correlate recordings with time stamps, but I have not figured out how to incorporate it yet. When I do, I’ll update this post.

0 commit comments

Comments
 (0)