Khalil Shreateh specializes in cybersecurity, particularly as a "white hat" hacker. He focuses on identifying and reporting security vulnerabilities in software and online platforms, with notable expertise in web application security. His most prominent work includes discovering a critical flaw in Facebook's system in 2013. Additionally, he develops free social media tools and browser extensions, contributing to digital security and user accessibility.

Get Rid of Ads!


Subscribe now for only $3 a month and enjoy an ad-free experience.

Contact us at khalil@khalil-shreateh.com

This favorite code for security auditing and memory leak detection This favorite code for security auditing and memory leak detection with Valgrind runs the Valgrind tool and several other tools to check for memory leaks, which can lead to resource buffer overflows and more.



Exploit />

//CODE BY E1.CODERS

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#define CHROME_PATH "/usr/bin/google-chrome"?
#define BUFFER_SIZE 512

int check_chrome_installed() {
? ? if (access(CHROME_PATH, F_OK) != -1) {
? ? ? ? printf("Google Chrome is installed at: %s\n", CHROME_PATH);
? ? ? ? return 1;
? ? } else {
? ? ? ? printf("Google Chrome is not installed.\n");
? ? ? ? return 0;
? ? }
}

void test_aslr() {
? ? printf("Testing ASLR (Address Space Layout Randomization)...\n");
? ? system("cat /proc/sys/kernel/randomize_va_space");?
? ? system("dmesg | grep -i aslr");?
}
void test_dep() {
? ? printf("Testing DEP (Data Execution Prevention)...\n");
? ? system("cat /proc/sys/kernel/exec-shield"); // ????? ????? DEP ?? ????
}
void scan_binary_with_gdb() {
? ? printf("Launching gdb for Google Chrome binary analysis...\n");
? ? system("gdb -q -ex 'file /usr/bin/google-chrome' -ex 'info functions'"); // ???? ???? ????? ?? ??????
}
? ? printf("Running Valgrind for memory analysis...\n");
? ? system("valgrind --leak-check=full --track-origins=yes /usr/bin/google-chrome");
}

void run_fuzzing() {
? ? printf("Running fuzzing test on Google Chrome binary...\n");
? ? system("afl-fuzz -i input_dir -o output_dir /usr/bin/google-chrome"); // ??????? ?? AFL Fuzzer ???? ???? ???? ??????????
}

void test_input_vulnerabilities() {
? ? printf("Testing for input vulnerabilities in Google Chrome...\n");
? ? system("echo -n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' | /usr/bin/google-chrome");
? ??
}

void run_comprehensive_security_test() {
? ? printf("Running comprehensive security tests...\n");

? ??
? ? test_aslr();
? ??
? ?
? ? test_dep();
? ??
? ?
? ? scan_binary_with_gdb();
? ??
? ? run_valgrind();
? ??
? ? ? ?run_fuzzing();
? ??
? ??
? ? test_input_vulnerabilities();
}

int main() {
? ? printf("Checking for Google Chrome installation...\n");

? ? if (check_chrome_installed()) {
? ? ? ?
? ? ? ? run_comprehensive_security_test();
? ? }

? ? printf("Test completed.\n");
? ? return 0;
}
Social Media Share