From d518efbf8227aac76f0e4b9d367e24ddfc3ddac4 Mon Sep 17 00:00:00 2001 From: Cedric DOURLENT Date: Mon, 5 Feb 2024 09:10:48 +0100 Subject: [PATCH] tools: add checksec.sh mitigation scanner Checksec is a bash script to check the properties of executables (like PIE, RELRO, Canaries, ASLR, Fortify Source). We're going to use it for reports later. Upstream-Status: Submitted [https://github.com/openwrt/openwrt/pull/14569] Signed-off-by: Cedric DOURLENT --- tools/checksec.sh/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tools/checksec.sh/Makefile diff --git a/tools/checksec.sh/Makefile b/tools/checksec.sh/Makefile new file mode 100644 index 0000000000..e8f104231c --- /dev/null +++ b/tools/checksec.sh/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) 2008-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=checksec.sh +PKG_SOURCE_VERSION:=36a67b388193d26289773f4153cb3b9f5bf5c9ec + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/slimm609/checksec.sh.git +PKG_MIRROR_HASH:=b1b881f68c413a69e58b79590b6a6149e6ed5b2f98ddb5bc16184fa15e8b4e77 + + +include $(INCLUDE_DIR)/host-build.mk + +define Host/Compile +endef + +define Host/Install + $(CP) $(HOST_BUILD_DIR)/checksec $(STAGING_DIR_HOST)/bin/ +endef + + +$(eval $(call HostBuild))