SpoonNet Posted May 14, 2017 Share Posted May 14, 2017 Dear all I'm a newbie with BashBunny trying to figure out how to import a script that works flawless on RubberDucky. (I'm on a Mac Sierra) Most of commands are running ok, but after the "history -c" .... Q STRING "history -c" Q ENTER Q DELAY 1000 Q STRING "kill -9 $$" Q ENTER Q DELAY 1000 Q COMMAND Q Q DELAY 1000 LED G .... I get: neto:Desktop neto$ history -c neto:Desktop neto$ kill -9 350 -bash: kill: (350) - Operation not permitted neto:Desktop neto$ And then an annoying Logout window. On RubberDucky, after the history -c command it works perfectly and close terminal. What I'm doing wrong?? Thanks Quote Link to comment Share on other sites More sharing options...
SpoonNet Posted May 14, 2017 Author Share Posted May 14, 2017 This was the best I could come up with Q STRING history -c Q ENTER Q DELAY 1000 rem Q STRING kill -9 '$$' rem Q ENTER rem Q DELAY 1000 Q STRING kill -9 '$(ps -p $PPID -o ppid=)' Q ENTER Q DELAY 1000 LED G Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted May 14, 2017 Share Posted May 14, 2017 Hi SpoonNet, Because the payloads are bash, you will need to escape the $: Q STRING "kill -9 \$\$" That should work as expected. 1 Quote Link to comment Share on other sites More sharing options...
SpoonNet Posted May 14, 2017 Author Share Posted May 14, 2017 Thank you @sebkinne For those with similar issue: Q STRING COMMAND 'q' will work Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.