-
Couldn't load subscription status.
- Fork 746
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Intrroduction
Sysdig is vulnerable to DYLIB Injection through the DYLD_INSERT_LIBRARIES environment variable. When running the sysdig tool it loads the libraries in the DYLD_INSERT_LIBRARIES environment variable automatically and without verifying the signature if it's the same as the tool or no. Which lead to Inject a malicious DYLIB by the tool and act on the behave of it.
Steps to Reproduce
- When running
sysdignormally it will run as should, But if we created aDYLIBand indicat to it using theDYLD_INSERT_LIBRARIESenvironment variable it will load it without any verifying automatically.
Test DYLIB Code
#import <Foundation/Foundation.h>
__attribute__((constructor))
static void testing(int argc, const char **argv) {
NSLog(@"[+] Dynamic library loaded into %s", argv[0]);
}Compile the code using gcc normally:
gcc -framework Foundation -dynamiclib code.m -o test.dylib
Cc: @mhzcyber
therealbobo
