Original tooling from the Camhak research project (camera teardown of a
rebranded UBIA / Javiscam IP camera). PyQt6 GUI on top of a curses TUI on
top of a service controller; per-service start/stop, intruder detection,
protocol fingerprinting, OAM HMAC signing, CVE verifiers, OTA bucket
probe, firmware fetcher, fuzzer, packet injection.
Tabs: Dashboard, Live Log, Intruders, Cloud API, Fuzzer, Inject, CVEs,
Config, Help. Real-time per-packet protocol detection, conntrack-based
original-destination lookup, log rotation at 1 GiB.
See SECURITY_PAPER.md for the full writeup, site/index.html for the
public report, README.md for usage. Run with:
sudo /usr/bin/python3 gui.py
Co-authored by Setec Labs.
55 lines
1.6 KiB
Bash
Executable File
55 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build TUTK IOTC shared library from static libs
|
|
cd "$(dirname "$0")"
|
|
|
|
OUTPUT="lib/libIOTCAPIs_ALL.so"
|
|
|
|
# Try each compatible ARM lib directory until one works
|
|
LIBDIRS=(
|
|
"Arm11_CLFSX_4.4.1"
|
|
"Armv7a_Hi8107_4.4.6"
|
|
"Arm11_BCM2835_4.5.1"
|
|
"Arm9_EPN7530X_4.5.2"
|
|
"Arm9_trident_4.5.2"
|
|
"Arm_IMAPx15_4.7.3"
|
|
"Arm_X41_4.8.2"
|
|
)
|
|
|
|
BASE="lib/tutk/TUTK_IOTC_Platform_14W36/Lib/Linux"
|
|
|
|
for dir in "${LIBDIRS[@]}"; do
|
|
LIBDIR="$BASE/$dir"
|
|
if [ ! -f "$LIBDIR/libIOTCAPIs.a" ]; then
|
|
continue
|
|
fi
|
|
echo "Trying $dir..."
|
|
arm-linux-gnueabihf-gcc -shared -fpic -Wl,--whole-archive "$LIBDIR/libIOTCAPIs.a" "$LIBDIR/libAVAPIs.a" "$LIBDIR/libRDTAPIs.a" -Wl,--no-whole-archive -lpthread -o "$OUTPUT" 2>/dev/null
|
|
if [ $? -eq 0 ]; then
|
|
echo "Success with $dir!"
|
|
break
|
|
fi
|
|
echo " Failed, trying next..."
|
|
done
|
|
|
|
# If all hard-float attempts fail, try with arm-linux-gnueabi (soft-float) toolchain
|
|
if [ ! -f "$OUTPUT" ]; then
|
|
echo ""
|
|
echo "All hard-float attempts failed."
|
|
echo "Install soft-float toolchain: sudo apt install gcc-arm-linux-gnueabi -y"
|
|
echo "Then re-run this script."
|
|
|
|
if command -v arm-linux-gnueabi-gcc &>/dev/null; then
|
|
LIBDIR="$BASE/Arm11_BCM2835_4.8.3"
|
|
echo "Trying soft-float toolchain with $LIBDIR..."
|
|
arm-linux-gnueabi-gcc -shared -fpic -Wl,--whole-archive "$LIBDIR/libIOTCAPIs.a" "$LIBDIR/libAVAPIs.a" "$LIBDIR/libRDTAPIs.a" -Wl,--no-whole-archive -lpthread -o "$OUTPUT"
|
|
fi
|
|
fi
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "Success: $(file $OUTPUT)"
|
|
echo "Size: $(ls -lh $OUTPUT | awk '{print $5}')"
|
|
else
|
|
echo "Build failed"
|
|
exit 1
|
|
fi
|