Sinisterly
Subprocess Exploitation - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: C, C++, & Obj-C (https://sinister.ly/Forum-C-C-Obj-C)
+--- Thread: Subprocess Exploitation (/Thread-Subprocess-Exploitation)



Subprocess Exploitation - DoXeD - 10-01-2023

This code uses the system function to execute two commands in the terminal. The first command, "ls -lra /etc", lists the contents of the /etc directory in a long format, including hidden files. The second command, "set", displays the environment variables set in the current terminal session. After executing the commands, the program returns 0, indicating successful execution.

Code:
#include <stdio.h>
#include <stdlib.h>

int main() {
    system("ls -lra /etc; set");

    return 0;
}



RE: Subprocess Exploitation - Mr.Kurd - 10-01-2023

But that is a normal C or C++ coding bro.. Where is the exploit lol


RE: Subprocess Exploitation - DoXeD - 10-02-2023

(10-01-2023, 08:47 AM)Mr.Kurd Wrote: But that is a normal C or C++ coding bro.. Where is the exploit lol
Run it on w3schools ide compiler