How to Exploit Cron Jobs for Privilege Escalation
101 Pentesting Training: https://dgtsec.com/cybersec-pentesting-training/
Python Basics course (coupon applied): http://bit.ly/2Gfx8Qh
Join my SQUAD for free (for more discounts): http://bit.ly/2xhSvM2
Cristi's Youtube: https://www.youtube.com/user/cristivlad25
In this video I'm gonna show you how cron jobs can be exploited for privilege escalation purposes. I'm Chris, I'm a penetration tester and I do a lot of cybersecurity videos.
Video Thread: https://guidedhacking.com/threads/how-to-exploit-cron-jobs-for-privelage-escalation.13301/
Alright, so we are on attackdefense labs, which is a platform for practicing or growing your skills in cybersecurity and penetration testing in a safe and legal manner. And one of the challenges, the one I'm gonna walk you through today is this 'Cron Jobs Gone Wild'.
What we need to do is to get root on the system by exploiting cron jobs.
Connect with me:
Linkedin: https://www.linkedin.com/in/cristivlad/
Twitter: https://twitter.com/CristiVlad25
Facebook page: https://www.facebook.com/CristiVladZ/
Facebook group: https://www.facebook.com/groups/cybersecpros/
Hackthebox: https://www.hackthebox.eu/profile/27034
Tryhackme: https://tryhackme.com/p/cristi
Peerlyst: https://www.peerlyst.com/users/cristi-vlad
Books I recommend for Penetration Testing and Ethical Hacking:
1. TJ O'Connor - Violent Python: https://amzn.to/31vH2GB
2. Dafydd Stuttard - Web App Hacker' s Handbook (2nd Ed): https://amzn.to/2MRcjk3
3. Peter Yaworski - Web Hacking 101: https://amzn.to/2KTvJSy
4. Jon Erickson - Hacking: The Art of Exploitation (2nd Ed):
https://amzn.to/2WHr3BD
5. Peter Kim - The Hacker Playbook 3 (2018): https://amzn.to/2MQiTXK
My free Developing Ethical Hacking Tools with Python course on Cybrary: http://bit.ly/2J5USbC
__________
In this hands-on video I show you how I solved the 'Cron Jobs gone Wrong!' challenge on AttackDefenseLabs platform.
Only perform these types of engagements in safe and legal environments and with the appropriate permissions.
In this Kali Linux privilege escalation information security tutorial we will exploit linux cron jobs to get root credentials on AttackDefense, a platform for penetration testing and practicing offensive security legally. We will exploit cron, the software utility used as a time-based task scheduler for linux operating systems. System administrators use cron to schedule jobs to run periodically at fixed times, dates, or intervals, and these jobs can be exploited during penetration testing or offensive security. We also learn other handy linux tricks and tips like suppressing errors by piping to /dev/null or using the find utility.
We start to hack linux with this cron exploit by observing the cron output log file, monitor.tar.gz. We search for the logged files with find and discover the /var/log/monitor file with proper enumeration. We experiment by adding additional source files to see if they are also compressed by the cron job--when they are, we know the cron job archives via wildcard and a wildcard cron job exploit is viable.
We search defense code for methods to exploit tar arbitrary command execution and find ways to exploit wildcards. We create a shell command that adds user student to the sudoers file, which would enable our shell to execute root commands. We now need to run this script with privileges that enable us to edit the sudoers file. We do this by exploiting the cron job with the defense code wildcard exploit to hijack the tar command by passing a --checkpoint-action command as a file name.
After viewing this AttackDefense tutorial on penetration testing and privilege escalation, we are able to exploit tar commands scheduled in cron jobs by passing filenames as parameters to tar, complete the Cron Jobs Gone Wild challenge, leverage a cron job scheduled by root that creates a tarball, and search defensecode for privilege escalation exploit methods in information security.
https://guidedhacking.com