diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..64e8636 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +VERSION := $(shell cat version) + +install: install-vm + +install-vm: + bash ./install + bash ./configure-sudo-prompt --force diff --git a/README.md b/README.md index 9b3f1ec..fdc37af 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,11 @@ Leverage Qubes template non-persistence to fend off malware at VM startup: Lock- ### Installing -1. In a template VM, install the service files +1. In a template VM, install and configure ``` cd Qubes-VM-hardening sudo bash install + sudo bash configure-sudo-prompt ``` 2. Activate by specifying one of the following Qubes services for your VM(s)... diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..0f42418 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +qubes-vm-hardening (0.9.3-1) unstable; urgency=medium + + * Initial release + + -- Christopher Laprise Mon, 2 Sep 2018 08:01:15 -0400 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5db6eea --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: Qubes-VM-hardening +Section: admin +Priority: optional +Maintainer: Christopher Laprise +Build-Depends: debhelper (>= 10) +Standards-Version: 4.1.2 +Homepage: https://www.qubes-os.org + +Package: qubes-vm-hardening +Architecture: all +Depends: ${misc:Depends} qubes-core-agent +Description: Prevent malware persistence in Qubes virtual machines. + Reconfigures Qubes VM templates to block casual sudo access, + protects user startup scripts, and includes a service that can + quarantine, whitelist and check file hashes at startup before + the /rw volume comes online. + + See https://www.github.com/tasket/Qubes-VM-hardening for more info. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..2aac0ca --- /dev/null +++ b/debian/copyright @@ -0,0 +1,18 @@ +Files: debian/* +Copyright: 2018-2019 Christopher Laprise +License: GPL-3 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/debian/install @@ -0,0 +1 @@ + diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..8d04b00 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,48 @@ +#!/bin/sh +# postinst script for qubes-tunnel +# +# see: dh_installdeb(1) + + + +### TODO: +### Fix postinst and install files in 'debian' folder. + + + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + systemctl daemon-reload + systemctl enable vm-boot-protect.service + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e1c367c --- /dev/null +++ b/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/install b/install index 632c0f4..5503a3b 100644 --- a/install +++ b/install @@ -41,6 +41,6 @@ awk '($1~"^/rw/" || $2~"^/rw$") && ($4!~"nosuid" || $4!~"nodev") {$4=$4",nosuid, echo -e "\nvm-boot-protect installed!\n" -bash ./configure-sudo-prompt +#bash ./configure-sudo-prompt exit 0