Posts Tagged ‘sec’

Raspberry Pi #antisec LED Alert Script

Just a little Python script I wrote to make an LED blink on a Raspberry Pi and to print a message to the screen when there’s a #antisec tweet:

# Jason D. Miller
# github.com/hack-r

from twython import TwythonStreamer
import RPi.GPIO as GPIO
import time

C_KEY =  ""
C_SECRET = ""
A_TOKEN = "-"
A_SECRET = ""

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)

def blink():
    GPIO.output(18, GPIO.HIGH)
    time.sleep(1)
    GPIO.output(18, GPIO.LOW)

class MyStreamer(TwythonStreamer):
     def on_success(self, data):
         if 'text' in data:
              blink()
              print("Antisec Tweet detected. Call the FBI.")

stream = MyStreamer(C_KEY, C_SECRET, A_TOKEN, A_SECRET)

stream.statuses.filter(track="#antisec")

Useable Sec: 3 Principals of Good Interface Design

  1. Easy to recover from errors
  2. Minimal training needed for a person to use the system
  3. Relies on common interaction techniques for familiarity

Usable Sec: Low-Fi Prototypes

Advantages of low-fidelity prototypes
  • They can be created quickly and cheaply
  • Any team member can create one, regardless of programming skills

Useable Sec: Good interface design (3 Rules)

Good interface design is…
  1. Easy to recover from errors
  2. Minimal training needed for a person to use the system
  3. Relies on common interaction techniques for familiarity

Usable Sec: System Centered Design

Questions Asked in a System Centered Design Approach….

  • What can be built easily on this platform?
  • What can I create from the available tools?
  • What do I as a programmer find interesting to work on?

If you’re concerned with usability, then avoid this approach!

Usable Sec: User Centered Design

  •  User Centered Design is based upon a user’s
    • Abilities and real needs
    • Context
    • Work
    • Tasks
Golden rule of interface design: “Know The User”
Note: This and other “Usable Sec” notes are indirectly or directly from my U. Maryland “Usable Security” Coursera course

Encryption in my 2nd MS Thesis

Placeholder

Quick Tip: Shred a Directory in 1 Line

find directory -type f | xargs shred –remove
normal (recursive) directory removal:
rm -rf directory

Quick Tip: IPTables port forwarding in 1 Line

iptables -A PREROUTING -t nat -p tcp -i eth0 –dport 88 -j DNAT –to 192.168.1.2:22

Quick Tip: Erase a drive (insecurely) in 1 Line

sudo dd if=/dev/zero of=/dev/sdx bs=512 count=1
where sdx is the drive you want to zero (this is an INsecure wipe)