Skip to content

Instantly share code, notes, and snippets.

View lattera's full-sized avatar

Shawn Webb lattera

View GitHub Profile
./pid: file format ELF64-x86-64
Disassembly of section .text:
0000000000001300 register_classes:
0000000000001330 main:
1330: 55 pushq %rbp
1331: 48 89 e5 movq %rsp, %rbp
1334: 48 83 ec 20 subq $32, %rsp
#!/usr/local/bin/zsh
find /usr/ports -type f -name Makefile -print | \
xargs egrep '^USE_HARDENING' | \
grep safestack 2>&1 | awk -F ':USE' '{print $1;}' | \
while read port; do
portdir=$(dirname ${port})
echo "* ${portdir}" >&2
(
cd ${portdir}
diff --git a/sys/dev/random/fortuna.c b/sys/dev/random/fortuna.c
index e300c6ffb4ca..98473a1b08ef 100644
--- a/sys/dev/random/fortuna.c
+++ b/sys/dev/random/fortuna.c
@@ -1,4 +1,5 @@
/*-
+ * Copyright (c) 2017 W. Dean Freeman
* Copyright (c) 2013-2015 Mark R V Murray
* All rights reserved.
*
[localrules=10]
[devfs_rules_sdr_jail=20]
add include $devfsrules_jail
add path ugen* unhide
add path usb/* unhide
add path dsp* unhide
[devfs_rules_bhyve_jail=25]
add include $devfsrules_jail
=>> Building audio/suil
build started at Wed Jan 23 09:13:26 EST 2019
port directory: /usr/ports/audio/suil
package name: suil-0.10.2_1
building for: FreeBSD hardenedbsd-12_amd64-local-job-09 12.0--HBSD FreeBSD 12.0--HBSD 1200502 amd64
maintained by: beerml@sigma6audio.de
Makefile ident:
Poudriere version: 3.2.99.20181024
Host OSVERSION: 1300009
Jail OSVERSION: 1200502
@lattera
lattera / gist:a55a44e2d9793a4e2cca55c2a0eb64d1
Created January 27, 2019 23:59
`rpcinfo -p` crashing at a comment?
laptop-dev-03[shawn]:/home/shawn $ lldb /usr/bin/rpcinfo [18:57:43]
(lldb) target create "/usr/bin/rpcinfo"
Current executable set to '/usr/bin/rpcinfo' (x86_64).
(lldb) run -p
Process 51265 launching
Process 51265 launched: '/usr/bin/rpcinfo' (x86_64)
Process 51265 stopped
* thread #1, name = 'rpcinfo', stop reason = signal SIGILL: privileged instruction
frame #0: 0x000001328893a681 rpcinfo`main(argc=<unavailable>, argv=0x000063469daf9d50) at rpcinfo.c:0
1 /* $NetBSD: rpcinfo.c,v 1.15 2000/10/04 20:09:05 mjl Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
while (printf("%d\n", getpid()))
sleep(15);
return (1);
@lattera
lattera / hbsd.md
Last active January 7, 2019 15:17
HardenedBSD blurb for runbsd.info

HardenedBSD

HardenedBSD is a derivative of FreeBSD, officially founded in 2014, that implements exploit mitigations and security hardening technologies. The primary goal of HardenedBSD is to perform a clean-room re-implementation of the grsecurity patchset for Linux to HardenedBSD.

Work on HardenedBSD began in 2013 when Oliver Pinter and Shawn Webb started working on an implementation of Address Space Layout

Script started on Tue Dec 18 14:40:28 2018
Command: cu -s 115200 -l /dev/cuaU0
Connected
Rom...
CRC: len=0xf080, cal=0x27ff5de9, img=0x27ff5de9, match!
Loading from boot device SPI NOR
Header:
000|0x23ffdc0: 01 02 FF FF 4C 46 43 53 00 04 00 00 80 E4 05 00
010|0x23ffdd0: 01 04 FF FF 4C 46 43 53 00 00 06 00 D8 92 00 00
Script started on Tue Dec 18 14:04:20 2018
Command: cu -s 115200 -l /dev/cuaU0
Connected
Rom...
CRC: len=0xf080, cal=0x27ff5de9, img=0x27ff5de9, match!
Loading from boot device SPI NOR
Header:
000|0x23ffdc0: 01 02 FF FF 4C 46 43 53 00 04 00 00 80 E4 05 00
010|0x23ffdd0: 01 04 FF FF 4C 46 43 53 00 00 06 00 D8 92 00 00