Coder Social home page Coder Social logo

stevegrubb / distro-elf-inspector Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 248 KB

This project provides a set of utilities to scan an rpm based Linux distribution to collect artifacts in the ELF files. This information is collected up in a pivottable for easy inspection.

License: GNU General Public License v3.0

Shell 93.63% Makefile 1.81% C 4.56%
data-science elf-binaries linux pivot-tables security

distro-elf-inspector's People

Contributors

rh-steve-grubb avatar stevegrubb avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

pombredanne

distro-elf-inspector's Issues

The bin/distro-features/aslr tests artificial parameters, not what the distro does

The https://github.com/stevegrubb/distro-elf-inspector/blob/main/bin/distro-features/aslr/Makefile defines a bunch of PIE-related compiler parameters. However, if this is focused on the distro functionality, checking the behaviour with the compiler parameters defined by the distros might be more relevant.

I'm thinking about something like

diff --git a/bin/distro-features/aslr/Makefile b/bin/distro-features/aslr/Makefile
index ddd68e0..588c0cd 100644
--- a/bin/distro-features/aslr/Makefile
+++ b/bin/distro-features/aslr/Makefile
@@ -3,6 +3,7 @@ LIBS=
 CC=gcc
 
 all:
+	rpm -q redhat-rpm-config
 	$(CC) $(CFLAGS) exec.c -o exec $(LIBS)
 	$(CC) $(CFLAGS) heap.c -o heap $(LIBS)
 	$(CC) $(CFLAGS) mmap.c -o mmap $(LIBS)
@@ -14,6 +15,11 @@ all:
 	$(CC) $(CFLAGS) -DPIE -fPIE heap.c -o pie-heap -pie $(LIBS)
 	$(CC) $(CFLAGS) -DPIE -fPIE stack.c -o pie-stack $(LIBS)
 	$(CC) $(CFLAGS) -DPIE -fPIE mmap.c -o pie-mmap $(LIBS)
+	$(CC) $$( rpm -E %build_cflags -E %build_ldflags ) exec.c -o distro-exec -pie $(LIBS)
+	$(CC) $$( rpm -E %build_cflags -E %build_ldflags ) so.c -o distro-so -pie $(LIBS)
+	$(CC) $$( rpm -E %build_cflags -E %build_ldflags ) heap.c -o distro-heap -pie $(LIBS)
+	$(CC) $$( rpm -E %build_cflags -E %build_ldflags ) stack.c -o distro-stack $(LIBS)
+	$(CC) $$( rpm -E %build_cflags -E %build_ldflags ) mmap.c -o distro-mmap $(LIBS)
 
 	$(CC) $(CFLAGS) bits.c -o bits $(LIBS)
 
diff --git a/bin/distro-features/aslr/tests.conf b/bin/distro-features/aslr/tests.conf
index ed475bc..0d486fd 100644
--- a/bin/distro-features/aslr/tests.conf
+++ b/bin/distro-features/aslr/tests.conf
@@ -1,2 +1,2 @@
-TESTS="heap exec mmap so stack pie-exec pie-heap pie-so pie-mmap pie-stack"
+TESTS="heap exec mmap so stack pie-exec pie-heap pie-so pie-mmap pie-stack distro-exec distro-heap distro-so distro-mmap distro-stack"
 PASSES=1024

but I'd like to hear about other potential ways of using the values configured via redhat-rpm-config.

Typo test-sytem

The README says

2) run ./test-system (install dependencies if missing)

but that fails with

# ./test-system
-bash: ./test-system: No such file or directory

The file test-sytem likely needs to be renamed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.