From 9a04a3d23ed0aa2f421947f9fef08b551abb34cd Mon Sep 17 00:00:00 2001 From: Freemor Date: Wed, 20 Jun 2012 13:19:22 -0300 Subject: [PATCH] Push initial Security works login - a simple login script verify - text file to hold password owner - text file to hold contact info to be displayed Update README with appropriate info. --- ben-security/README | 15 +++++++++++++++ ben-security/etc/owner | 5 +++++ ben-security/etc/verify | 2 ++ ben-security/sbin/login | 21 +++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 ben-security/etc/owner create mode 100644 ben-security/etc/verify create mode 100755 ben-security/sbin/login diff --git a/ben-security/README b/ben-security/README index 18a70dd..dd7ec59 100644 --- a/ben-security/README +++ b/ben-security/README @@ -1,3 +1,18 @@ This Directory will contain projects about Securing the Ben Nananote. +Things so far: + +/sbin/login - A login script with the option to print user/contact info +/etc/verify - A text file containing the password in plain text (will definitely get onto hashing it). + If this file doesn't exist login aborts and the system/shell/etc comes up +/etc/owner - A text file containing contact information printed above the password prompt. + If /etc/owner doesn't exist only the prompt is shown. + +Planned features: + +Hashed passwords or reading root password if possible. +Nicer look (Graphic login screen or something) +Failure limit - Stop/limit bruteforcing +?? Nuker ?? - possible option to erase user data if too many failures +prevent it showing up after each gmenu2x program diff --git a/ben-security/etc/owner b/ben-security/etc/owner new file mode 100644 index 0000000..39e7f14 --- /dev/null +++ b/ben-security/etc/owner @@ -0,0 +1,5 @@ +Retrun to: +Somebody +54 Someplace lane +Some Country + diff --git a/ben-security/etc/verify b/ben-security/etc/verify new file mode 100644 index 0000000..1a1c753 --- /dev/null +++ b/ben-security/etc/verify @@ -0,0 +1,2 @@ +BNN + diff --git a/ben-security/sbin/login b/ben-security/sbin/login new file mode 100755 index 0000000..d121111 --- /dev/null +++ b/ben-security/sbin/login @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Login script to secure the nanonote +reset + +if [ -f /etc/owner ]; then + cat /etc/owner +fi + +echo -n "Password: " + +stty -echo +read password +stty echo + +echo "" + +correct="$(cat /etc/verify)" +if [ $password = $correct ] ; then + exec $1 +fi