Prologue
It’s been a weird and busy year for our industry, and this specific story has been in my backlog for quite some time now. So I am hoping to provide you, readers, with a refreshing and, hopefully, entertaining story. It will not talk about the elephant in the room, at any point. And yes, the stories told really happened.
→ Only the images are generated.
→ The text is written by me.
→ The stories are real; names, places and details have been changed.
→ This story stitches together moments from several missions, but it has a single moral: how joint effort and attention to detail beat insurance and expensive tools every single day.
→ It’s not about money, it’s not about tools, or fancy boxes, and it’s not (only) about skills or even knowledge.
→ It’s a story about how the right person, for the right task, with the right help, can do an outstanding job
Chapter 1: The call
The long months of autumn are generally very busy with requests, as we, Crimson Foes, are often solicited when activity starts anew. Leaves darken and fall while CVEs blossom and rise. Long months of summer holidays have passed, systems need updates, and sometimes, people do too.
I was trimming down my fiery colorful plants, preparing them for overwintering, when I received a pigeon with an important message.
“A.: Yes?” I said, slightly annoyed at being disturbed as I clearly should have been in “Do not disturb” mode.
A deep dark loud voice answered on the other end:
“Allow me to introduce myself, for I am the King of the Legends County” he said with pride, and authority.
“A.: Greetings, my Lord. What is it that made you send this pigeon? If I may ask.”
“King of the Legends County: My castle was attacked, my kingdom is threatened. The invaders were exterminated, but I now need you to verify its security, doors, gates, windows and even my subjects! I trust no one, and nothing. Everything must be trialed as I will not allow it to happen again. Birds have come singing your praises to my ears as of late. So I wonder, are you the man for the job, A.?”
“A.: I’m the man alright. However what you are describing would be a stretch for three knights, let alone one, as I know your castle’s size and its many entrances. An extra pair of helping hands would likely prove essential for this operation to succeed.”
“King of the Legends County: Use as much help as needed. Mission is critical, nobody in my court can know who you are, and why you are here. I repeat: I trust no one.”
“A.: Gotcha.”
“King of the Legends County: One last thing before this pigeon transmission comes to an end: I need you to take a very close look at our latrines. I suspect they may have played a part during the last intrusion.”
Shit, I thought to myself.
“A.: Perfect” I said, “I know exactly who to call.”
Chapter 2: The cover
We needed the perfect cover, and I just happened to have one. You see, this region is particularly humid and rainy at this time of the year, and quite often, parts of the irrigation and electrical networks are cut off because of floods. It’s therefore not uncommon to see maintenance operators running around the city, wearing yellow jackets and driving white vans, trying to figure out what’s cut off, and where. So there you have it: we were going to be network maintenance operators for a week.
“V.: I’ve seen better ideas but we need to start quickly. What happens when we get caught?”
I would have preferred a conditional “IF we get caught”, and my idea was great. Good thing he was in charge of the latrines. But I was prepared, as we Crimson Foes always are.
“A.: Behold the authorization letter. Should we encounter tougher security than expected, we just need to show them this letter, signed by the King of the Legends County, himself.”
The letter was an exact copy of the original decree, issued by the King himself, so that it would hold up under the heaviest scrutiny.
“V.: Last time you did this, the king didn’t answer the pigeon and we ended up spending 3 days in a dungeon eating rats.”
What an ungrateful wretch.
“A.: No worries to be had, my dear, for this is none other than N.’s pigeon number!”
“N.: Off you go, you damn peasants” she said while imitating the King’s deep voice.
N. was our “Get Out Of Jail” card, quite literally.
Chapter 3: Entering the castle
The first entry is always the hardest. Once in, it’s easy to duplicate keys, leave windows ajar, or even plant a bug for later remote access without needing to be on the premises.
Systems online, we were hot and ready: break entry
“V.: Come on, that’s way too simple.”
“A.: My plan was perfect.”
“V.: You are just incredibly lucky and they obviously don’t give a sh”
“A.: TO THE MEETING ROOMS!”
Entry was successful. The intrusion could begin.
Flat network. Printers, phones, laptops, along with servers. A real piece of cake. At least I thought so.
Before I realized it, hours had passed and we were still but mere pawns in this castle. Then a slight silhouette broke through the doorway, shattering the deafening peace we had surrounded ourselves with.
“C.: knock knock I don’t believe we’ve met?”
Whatever you do during Crimson Missions, stay driven, focused. Nobody likes to interrupt someone who is deep in work.
“A.: Aye, good sir, what is it to you?” I said while keeping my typing rate at a frenetic level. I was doing my best to make it sound like we were the ones supposed to be there, legitimate, as opposed to him, now obviously interrupting.
“C.: I take it you are the gentlemen from the Global Networks Office? We suffered some damage last week due to the recent floods. Are you set up alright? Do you have everything you need?”
“V.: Yeah pretty much; thank you for…”
“A.: As a matter of fact we don’t. You see, my companion here would really like to see your water treatment facility. We think it may have been damaged in the process and the … Global Networks Office… would need to fully assess the damage there too. Can you prepare a ride for him, say, tomorrow?”
“C.: You mean the latrines, right?”
“A.: I do, yes.”
“V.: (whispering) You must be fucking kidding me.”
Chapter 4: Lunch time, clone time
Lunch time came as suddenly as the Black Plague: still no crown jewel was ours. Disappointed yet determined, we headed to the main hallway, and realized we were now mostly alone on the premises.
As we both reigned over the castle’s emptiness, we both spotted the same keyring, probably left there by an unsuspecting court folk. One was very large, intricate, complex, secretive. The other was plain, simple, basic, and likely generic. Regardless, we had found two keys, and thus, likely, our persistence in the building for the rest of the week was assured.
“V.: Aye, companion, I think I know what the small one’s for.”
We both immediately assumed the heavy metal-plated entrance gate was the one requiring the larger key.
I looked at him with curiosity.
“V.: I noticed a pantry on our way in. Fancy a snack?”
V. was a real epicure of a man, and he knew how to treat himself well. His observation skills seemed even sharper than usual, especially when it came to food. If I had to guess I would say hunger was probably a powerful motivator at that stage.
“A.: To the pantry!”
The key clicked, the door clacked. No hatch unlocked, no cylinder pivoted. The key was irremediably the wrong one.
“V.: Does that mean…?”
“A.: Only one way to know for sure, comrade.”
The small key opened the main gate.
“V.: So basically” he stood up, once he was finally able to catch his breath “you are telling me that virtually anybody can enter the castle, but they kept the most expensive locks only to protect their food??”
I agreed, it didn’t make any sense. It was soon confirmed the big one opened the pantry. But at least, we had our way in now. And sandwiches, too.
Chapter 5: The passwords are too damn long
Hours passed, access resisted. No crown was mine.
“V.: Hast thou seized the Sovereign Scepter of sudo yet, comrade?”
“A.: Afraid not, my dear, for this is a much more secure castle than initially expected.”
A local county castle, no trained security guards, no obvious, elaborate, or expensive security mechanism in sight. Everything pointed in the same direction: there had to be holes.
“V.: What about the security folks?”
“A.: Only one and we’ve met him: C. He is not really security either, as he is a cartographer, likely filling two positions at once for lack of staff and means.”
“V.: Aye, yer finally getting too rusty for this job, my dear comrade. Thinking of retiring yet?”
Anger and frustration can’t overwhelm the Crimson Foes, so I kept my cool and tried thinking of new paths.
“A.: What about the pathways to the water treatment systems? Found any? We need to identify whether the castle can be attacked from these.”
“V.: I found some leads alright, I will however need to confirm all of these on site.”
The sun had already set long ago, not a single living soul remained with us in the castle. It was time to drown our sorrows in ale at the nearest pub.
“A.: I suggest we call it a day. After all, we now have the keys. Let’s bounce, pal.”
Chapter 6: The pub
“A.: Evenin’, my lady, two large pottles of ale, please, and fill them to the brim for tonight we drink like Templars.”
“Barmaid: Right this minute, my good sirs.”
She started serving two large pints of local triple blonde beer.
“Barmaid: How are we doing today? I reckon your faces aren’t too familiar. What is it that brings you gentlemen here?”
“V.: We are here to work. Helping with security matters at hand you see.”
“Barmaid: There you go” she said while sliding the two pints across the bar, skillfully sending them straight to the palms of our hands, showing great dexterity.
“Barmaid: Security you said?” she added with a slight frown.
Her tone was hinting at a direction I wasn’t particularly eager to see unfold. Being still in a dreadful sulk over failing to obtain the crown jewels on day one, I decided to bury my nose deep at the bottom of my pint, before I had to answer any tech support request.
“Barmaid: I had an issue of that matter a little while ago on my laptop. Popup on my desktop kept telling me I was injected or something, and that I had to pay. Anyway it looked bad!”
Bingo. This one is for V.
“Barmaid: I’ve been paying for two years now, never had any other issue like that. Guess it’s fixed alright.”
Goddammit.
“V.: Afraid it’s not that simple, ma’am…” he started. Unfortunately we Crimson Foes see that happen all too often. Folks just aren’t armed well enough against the evil of the wild ethernets.
“V.: You probably encountered a piece of malicious software we call Scareware. While it is not too harmful for your system, it tends to be loud, obnoxious, and tries to prevent you from using the system one way or another. Until you pay, that is.”
“Barmaid: So there was no virus?”
“V.: Apart from the one you have been paying for for the last two years, chances are there wasn’t any to begin with, yes.”
“Barmaid: Shit. What should I do then?”
“V.: Well, stop paying; that would be a start. I’d also recommend a fresh install for the computer. Effective immediately.”
I would have nuked the damn thing if it had been up to me but his advice was correct.
“Barmaid: I see. God I have been paying scammers for two years?? And who knows how much longer I would have kept doing that… Good thing you came in tonight. Next round is on me, boys, what’s your poison?”
“V.: Well I haven’t even…”
“A.: I’ll take just the same, please and thank you!”
Chapter 7: The second day
It’s early morning, the mist is slowly rising above the fields, faint distant shy chirps can be heard, doomed to get even more sparse as days go by, until they fall silent for a few months, before spring brings them back.
We are not root yet, but I have a few more tricks up my sleeve. Maybe the traps I have laid in the first hours have yielded some new prey during the night. Let’s run the trapline.
“V.: So you tried relays and other traps?”
“A.: Aye.”
“V.: Some exploits?”
“A.: Got a couple to work, dead ends, my comrade, as every server and laptop reached was indeed in a SILO.”
“V.: What about common passwords, mutations, the name of the county with incremental”
“A.: Oi, takest thou me for a novice?”
He was right to ask; thoroughness is king, especially when it’s hard. We couldn’t afford any blind spot. However it was starting to become suspiciously secure:
- one admin account per server, with a complex and unique password every time
- 15+ chars password policy for users; even more for admins
- no trivial authentication secrets: city name, dates, postal codes, leaked creds
- hardened Linux bastion with encrypted password manager on external storage
Suddenly, we began seeing our cheerful and welcoming cartographer-turned-IT administrator C. under a different light: he was a self-taught infosec defender BEAST.
KNOCK KNOCK
“C.: You guys ready? We need to check those water treatment stations. Chop Chop.”
“A.: Ah… yes yes the water stuff, I guess you can go then, V.?”
“V.: Cool. Yes. Let’s go now…”
“A.: Send me a pigeon when you’re done, I’ll come pick you up. Godspeed.”
If breaking through was proving tough with two brains, it was certainly not going to get any easier with just one. We needed progress, and quickly. To top it off, that’s when I received an incoming pigeon transmission.
“King of the Legends County: ARE YOU ROOT YET?”
Just my luck…
“A.: Salutations, my Lord, afraid I can’t confirm that yet, but we…”
“King of the Legends County: You have until Friday. By sunset, you must have mapped everybody’s access, passwords, and local configurations. I will not tolerate failure!”
“A.: Understood.”
“King of the Legends County: Do they suspect the real reason for your inquiry yet?”
“A.: It appears they don’t, for the time being.”
“King of the Legends County: Excellent. Keep a low profile. And get me my results. Also, have you had the chance to examine the latrines?”
“A.: As we speak, my Lord.”
“King of the Legends County: Good. Transmission is now over.”
A high-pitched tone started coming out of the pigeon transmitter. We had to hurry up.
Just as I started to lose hope, I noticed something on V.’s chair. He had left a leather pouch on his seat, hastily closed and left half open, only to let an artifact of great value hint at me.
It was an artifact of immense rarity, and equal danger. One only we Crimson Foes could be allowed to use, for it could easily be misappropriated for malicious intents. Behold the Forbidden Socket: THE KEYLOGGER
The scenario unfolded instantly in my mind:
- check on V, see if I could borrow it, but more importantly, get the last whereabouts of C.
- walk to his office while checking for security cameras (we already had access to them at this stage, but mapping the route to the IT admin’s office and how secure it was, was crucial for our report too)
- get the keyboard’s USB
- position the keylogger between C.’s keyboard and his main workstation
- get out of there, quickly, without raising suspicions
“V.: What?”
“A.: 2 questions: that’s a keylogger in your pouch? Is C. with you?”
“V.: Yeah, but wh…”
Chapter 8: C.’s office
The castle was relatively large; C.’s office was a couple of minutes’ walk away from our improvised settlement. It was right next to a small coffee machine in the hallway, adjacent to two offices, and one more across the hall. More bad news: one of the adjacent offices had a connecting door leading directly into C.’s office. This meant that whoever worked there could not be inside when I plugged the device in, for it would entirely compromise the operation.
No problematic cameras were encountered on the way, nearby offices were empty, or far enough away not to witness anything.
Mission is simple: find the keyboard’s cable and add the device before plugging it back in.
Simple, right? Just follow the keyboard’s cable until you reach th… footsteps approaching
Shit shit shit
Coin flipped, fingers crossed, let’s get out of here.
Chapter 9: Picking up V.
Back to work, despair and hopelessness started thickening the air again. It was becoming clear: no entry point would allow a compromise of the castle. Perimeter defenses were solid. I was then deep in the middle of coercing authentications when V. contacted me:
“V.: Aye, comrade, sun is going down, I got what I needed. Care to give me a ride back?”
“A.: On my way.”
I felt slightly relieved; the more time I spent looking at my screen, the more failure was closing in on me. I needed fresh air.
“A.: How hath the day treated thee, comrade?”
“V.: We’ve got ways in from the plants. You’ll definitely need to include this in the report.”
“A.: Right. Well we will need all the help we can get. Tomorrow and the day after you will need to check new locations. I’ve arranged with C. for his colleagues to drive you around as needed. Once done, I’ll just pick you up like today.”
“V.: Can we leave this place? It smells like manure.”
“A.: Right on, it seems to impregnate clothes too.”
“V.: What?”
“A.: Oh remind me to pick your keylogger up. It’s in C.’s office now…”
“V.: WHAT”
“A.: Yeah. I might have plugged it into the wrong USB device, someone was coming. I guess we’ll see. I got access to his schedule too, doesn’t look like his office will be empty again before Friday. That’s when we strike. We’ve got until the end of the week to wrap everything up.”
“V.: Lol, imagine plugging it into like, a mouse.”
“A.: hahahaha”
“V.: hehehehe”
Chapter 10: Not hehe
The following days unfolded in a very similar fashion: find some thin lead, exploit, realize it’s a siloed dead end again, rage, get out and pick up V. from the latrines.
Fortunately, on the last one, I got V.’s help to find holes in the castle with me, we needed all our available grey matter on this.
V. and C. were deep in a (fascinating) latrine discussion when my pigeon rang:
“King of the Legends County: Kind reminder to vacate the fucking premises of my castle by 5PM this day.”
Checking my watch: we had just hit 4PM. Still no root in sight. Might have to call that one a defeat.
“V.: Do you have my cool USB drive?” he whispered to me, seeing I was checking my watch.
“A.: Not yet, I’m on it.”
Quick, I needed a diversion. That’s when N. came into play.
“A.: Yes, my dear, what is it that you need?” I said while pretending to answer an incoming pigeon transmission.
“N.: You are calling me what th…”
“A.: Oh I see you are inquiring about tonight. Have you yet found a tavern in which we shall break bread?”
“N.: We are dining with my parents I don’t eve…”
“A.: Perfect yes a table for 6 would be perfect, alright I’ll let you go now, bye bye.”
“N.: Are you using me to run out of a room again?”
beep beep
Nobody in sight, let’s retrieve the device.
“A.: OK if you insist, and make sure to get us the best table” I said while casually walking back to the meeting room.
“N.: Yeah yeah yeah, oh and while I’ve got you, you still need to send me your expense report!”
“C.: Alright, all clear, thanks, V., I need to go back to my office for a few meetings before I call it a day. If I don’t see you guys before you leave, have a good weekend.”
Phew.
We saluted C. on his way out.
“V.: You look way too happy.”
“A.: The forbidden artifact is now back in my possession.”
“V.: Oh really? That was smooth.”
“A.: I know, right?”
“V.: Let’s check what’s on it now. And remind me to tell you I’ve got something for you too. You might like it…”
I felt that was an understatement. He must have found some juicy loot.
I threw the keylogger to V., he looked me in the eye. We both knew what was at stake: the castle keys had to be there.
We were both shaking with excitement.
I watched as he plugged the device into his laptop, and pressed the secret combination to mount the storage, and read its logs.
Mount.
Click.
Scroll.
Shit…
“A.: gasp”
“Lord.exe: Back to work you NINCOMPOOP, you are not root yet as I recall!”
“V.: So you DID plug it into the mouse?”
“A.: Aye, enough of that, comrade, we get the point. You said you had something else. I need some cheering up. Show me some good news.”
“V.: I’ve got access to C.’s computer, through the plants.”
Oh boy.
“A.: Bastion?”
“V.: That’s a negative, the admin one as you know is only connected when he performs admin tasks, but we can get access to his other computer’s desktop. I haven’t checked it yet as I was knee-deep in latrine business.”
“A.: Good enough, let’s see that. Good job, too.”
“A.: I mean, it’s probably encrypted, right?”
“V.: Yeah, I mean, he has encrypted everything so far so why not…”
“A.: OH MY GOD IT’S NOT ENCRYPTED”
“V.: WOHOOOOOO”
Everything was there: servers, laptop, domain administration passwords. All terrifyingly long (45 characters for the domain admin) and using all the complexity flags. It truly was the solid work of a defender. Without this last-minute stroke of luck, we would probably never have made it there.
Then, in the last 30 minutes that separated us from the end of the engagement, we tested all the credentials, and they proved valid. We retrieved everything that was necessary for our report (proof of hardening, configuration dumps, Active Directory data…) and left, swiftly, happily.
Chapter 11: Friend Chicken
We like to finish our missions on a lighter note. It helps with morale and team cohesion. This time we had the chance to craft our legendary homemade fried chicken. Nothing beats it for regenerating the brain cells lost during internal test sessions. The fried poultry is not the only craft we are proud of, as it’s generally accompanied by our homemade fiery chili sauces.
What better moment for V. to narrate this now famous fable: The Forbidden Socket, a tale we will likely tell our grandchildren, and their children after them too.
Resolution
Ultimately C. learned about our ruse, and was mostly disappointed about one thing: the cleartext password export. We felt like it was unfair to him, but so is the cybersecurity game. Attackers would certainly not back off because of unfairness. This was, for its size and the means at play, the most secure system I had seen.
And there came the real plot twist, and reason for it all:
C. had heard about our prowess in nearby castles, and managed to get copies of our previous reports, in order to implement every single recommendation we issued to similar kingdoms and counties.
He had spent months implementing them, thus creating an impenetrable fortress. And this, without:
- any IT training
- any fancy tool
- any team
This is, in itself, the highest honor that can be bestowed upon a pentester: fighting against your own recommendations and losing.
For this, we Crimson Foes congratulate you, C., for you truly were the defenders’ final boss.
Epilogue
This story took a very long time to write, as it compiles many different engagements, romanticized of course, into this text. Hope you enjoy it.
Stay classy netsecurios!
Need a security audit or tailored cybersecurity support?
Explore our services →