《Grand Simulation》Chapter 13 - Timing Attack
Advertisement
test = echo "Hello, World!"
“Test,” I whispered. A new window opened up.
Hello, World!
I was almost certain that it would work but still sighed in relief. Then I quickly modified the program, coming to the crux of the issue.
test = sudo echo "Hello, World!"
I took a deep breath. Crossed my fingers. Whispering with my eyes closed, “Test”. I opened a single eye and my lips unconsciously curled into a smile.
Password:
‘Hallelujah!’ I celebrated in my mind. There is a superuser!
“So it worked?” Arya asked out of nowhere. I beamed at her blankly for a moment. “You did your evil smirk again,” she clarified.
“Okay, first off, it is a normal smile. And second, yes. I got want I was looking for. As for whether I can use it or not, the jury is still out on that one,” I said.
“So, can you tell me now what the spell is?” she beamed back. She had grown peculiarly interested in programming. ‘Perhaps she wants to make a powerful resurrection spell or something?’
“Okay. In normal computing, there is a concept of a superuser, who can do stuff normal users cannot. Ummm, for example, think of a corporate building. You have your cleaners, workers, security, and so on. Many people with various roles and access to different rooms and tools. Then there is the owner or an administrator of the building. That one has access to all the rooms and all the stuff of the building. A superuser is something like the administrator. I mean, bad example but close enough. In Windows, the user is called an Administrator; on Unixes it is called a ‘root’ user,” I tried to explain.
“Ah, I understand. So, what has your spell got to do with an administrator?” she asked.
Advertisement
“Hmm, well you must know by now that these spells are nothing but programs, right? If I can get superuser rights, then -“
“Then you can access tools and do stuff that you normally couldn’t!” she cut me off and concluded.
“Well, yes,” I replied. ‘She is quick on the uptake.’
“So how do you become an admin?” she continued.
“That is the problem. You need a password,” I said with a bitter smile.
“And how will we get this password?” she prompted unabashed.
‘Brute force? Nah, I don’t have years to spare for it to complete. I don’t have handy dictionary either. Hmm, will it be susceptible to attacks though? Even our Earthly systems are so air-tight for the most part, this is an alien super system we are talking about. Maybe…’
“I’m gonna try something called as timing attack.” I paused, rearranging my thoughts. “It works by checking the time of a system’s response against different inputs. Imagine you entered a fully wrong password, like all characters incorrect. And the system denies entry after processing for a bit. Now, you enter a wrong password again, but half your characters are matching the real password. System will deny you entry again, but the time it takes to process your input will vary.”
“I don’t get it, why will the time be different? And how will it give us the password?” she asked.
“Hmm, perhaps an example will help? Assume the real password is ‘abcd’. And the system checks each letter of your input against the real one when verifying. Now, if you enter ‘wxyz’, the system matches ‘w’ as first input against ‘a’, which is incorrect, so it immediately denies request. Next, you put in ‘axyz’. It will check if letter of input ‘a’ with real pass ‘a’, give okay, move on to next letter ‘x’ and match against ‘b’. It denies again here but the time it took to deny was more that of before because it took more time to process the correct input at the start. Thus, you unravel each letter one by one until your ‘wxyz’ turns into ‘abcd’ and voila - you have the password!”
Advertisement
“Oh wow, that is some neat trick.” She reflected one it for a while. “Hey, my mana is back up, I’m gonna go cast heal. Best of luck with the password.” She went back to her grind. I went back to mine.
¤ ¤ ¤
I was pessimistic. Good thing I had nothing but time on my hands - at least until Arya leveled up. I decided to give some random words a try first, you never know.
Password: password
I added the password with a thought. The window just vanished. No ‘Hello, World!’. I noticed I was down 2 mana. ‘Come on, I’m not even doing anything!’ I wailed.
More determined than ever, I tried several more variations. No dice.
‘I can’t manually keep entering a password. A few more and I’ll forget what I entered previously. Nor would I be able to cover all the characters.’ With that thought, I decided to automate it.
test = while true; do echo "password" | sudo -S echo "password worked"; done;
I cast the spell. One mana point down. I didn’t see the window prompting for the password. Another second down, another mana point gone.
‘What is this? A background job? I see. Since the system is unable to determine how many resources this spell will consume, it is taking it in as it requires,’ I mused. ‘Alright, now that we have a loop, let us get our characters in! First, I need a loop going from 0 to 255 to cover all chars. And I need to stream the output into a file.’
test = i=0; while [ $i -le 255 ]; do; echo "$i" >> password_hack | sudo -S echo; done;
‘Now, instead of taking in numbers, let us feed it characters. Maybe the old printf trick?’
get_char i = printf "\x$(printf %x $i)"
‘Alright, this will take a decimal i and return the corresponding character. Next is… ah right, the “time” function.’
get_time = date +%s%N
‘Right, so this will give us time in nanoseconds. Now to put it all together…’
test = i=0; while [ $i -le 255 ]; do; echo "$(get_char $i) $(get_time)" >> password_hack | sudo -S echo; done; get_char i = printf "\x$(printf %x $i)" get_time = date +%s%N
I ran each function and made sure everything worked. By the time I was done, Arya was looking fixedly at me again. “You were gone for quite a while just now. How’s the password hacking going?” she queried. I was getting used to her being a curious cat by now, so I simply replied: “I’ve got the code down, I think. But I don’t have the mana required to run it to the end right now. Maybe later? Quite a shot in the dark though, I don’t expect much,” I sated her curiosity, “Are you done?” I queried in return. “Yep, I’m level 3 now!” she exclaimed. “Congratulations,” I smiled in return. “Should we wake the others now or do you wanna rest some?” “Nah, let’s get going,” she declared. And so, we woke the others and got going.
Advertisement
Fallout: Vault X
An original novel set in the Fallout universe, written to be accessible to all, featuring unique people and places. Vol.II. out now Fallout: Vault X tells the story of John. A vault dweller, who spent every day of his twenty five years underground. Like his father, and his father before him. Proud to live in the last remaining bastion of humanity, all that survived The Great War of the atomic age. Hidden deep below the surface of the earth, toiling under brutal conditions. Year after year, decade upon decade. All to expand into the natural cave system the Vault occupied, building for the future. However, John knew what his forefathers did not, that everything he’d been taught was a lie. After finishing school at the age of ten, John received his standard issue pipboy. An arm mounted personal computer, worn by everyone in the Vault. Used to coordinate the relentless pace of expansion, needed to work as an apprentice. To learn the craft that would be his life’s work. A noble calling to ensure a future for all that remained of the human race. A quirk of fate saw John equipped not with the crude, clunky, pipboy model his father wore. That almost everyone around him wore. His looked smaller, sleeker, finished in a jet black sheen. And capable of doing far more than its drab counterparts. The world above had been ravaged by atomic flames, yet life clung to its bones. The Red Valley fared better than most in the century since the bombs fell. The clean water and rich soil protected by rolling hills. All spared from direct strikes, for the most part. Life survived here. Trees spawned from charred ground, misshapen, green leaves turned red. Along with simple crops, grown wild at first, then cultivated by the survivors. The scavengers of the old world were inventive, hardy people. All determined to rebuild in the ruins of a world they never knew. In the decades that passed settlements emerged. They grew, spreading along the valley floor. Reclaiming the pre-war remnants of the once industrialised heartland. Salvaging the robotic wonders of a bygone age to build their walls and work their fields. To protect them in the dark of the wasteland. But such things are uncommon in this world, and the rarer something is, the greater its value. And the worth of pre-war technology had not gone unnoticed. The last, real, power in this world rested in the mechanised hands of The Brotherhood of Steel. Forged from the mortally wounded old world military. The Brotherhood used its access to the weapons made for a conflict no one won to strike out into the wastes. Men and women were equipped with advanced armour, aerial transportation, high grade weaponry. Accompanied by the training, strength, and will, to put them to use. They established chapters and set up outputs far and wide. All dedicated to a single purpose. To ensure the technology left abandoned by its long dead creators didn’t fall into the wrong hands. Namely, any hands that were not their own. This is the world John escaped into. A place of horrors brought forth from atomic fire. A place where survival meant battling against the darkness. Fighting a war each day to get to the next. And war...war never changes
8 130Song of the Unborn
Let me tell you a story A story about a beautiful song And those who sing it Alright, time for the real synopsis: Song of the Unborn takes place in a bleak and dark universe. The world is broken and unbalanced. Dark creatures roam the lands and the order that once existed as a beacon of hope has crumbled. Kalosýni is one of people who live in this cursed world, but thanks to the efforts of his father, he led a sheltered life. However, an unexpected cry on a seemingly normal night leads to a journey that will lead Kalos, his father and a pregnant woman on a journey across the kingdom of Faacri. UPDATE FOR BOOK 2 (Warning!!! Spoilers ahead.) Book 2, or Throne of the Lords kicks off right where we left off. A dark figure is claiming to be the dark lord, one prophesied to be the bringer of the apocalypse has appeared. But is there truth to the prophecy and how will Kalos, Raymond and company react to all this? FINAL UPDATE: The book is over... the part about Kalosýni. I just have a few side chapters to dump on you and boom, done. Hehe, it's been one helluva ride. ANNOUNCEMENT FOR POTENTIAL PATRONS: I think I'm ready to take the next step with this story of mine. Anyone interested in supporting my ambitious endeavours should follow the Patreon link. What will I be doing exactly? I really want Song of the Unborn to exist in as many mediums as possible and so, after publishing the novel on Amazon, I'm planning on creating a graphic novel version and we'll finally be able to see Kalosýni in all his glory. Well, that's my goal anyway.
8 98I'm the Trash-Tier Villainess!
Alt Name: Reincarnated as The Villain I Hate The Most! Kasuga Mai lived the most normal and plain life of being a highschool student. Born with "just fine" looks, she never got any special attention but was not bullied either. Yes, average she was. Until she entered the world of 𝗬𝗨𝗡𝗡𝗜𝗘. YUNNIE is a social link where everyone can be readers of popular novels. One of the most trending novels in her era was the Isekai Novel- Death Over You. In the social link called, 𝗬𝗨𝗡𝗡𝗜𝗘, she was known as: Unknown Shoujo-san. She was very popular reader and friend of almost everyone on the community. . Unknown Shoujo-san was known for being the #1 Hater of the Kusanagi Eru- the villainess of the novel Death Over You. In that community, no one hated Eru more than Unknown Shoujo-san. However, no one loathed her for hating Eru. In fact, everyone agreed with Unknown Shoujo-san's fair bashing as it only attacks the character with fair judgement and never the author. But what happens when, "𝗛𝗨𝗛?! 𝗜'𝗩𝗘 𝗕𝗘𝗘𝗡 𝗥𝗘𝗜𝗡𝗖𝗔𝗥𝗡𝗔𝗧𝗘𝗗 𝗔𝗦 𝗘𝗥𝗨?!" Mai, in the body of Eru, screamed unbelieving of her own words. This is the tale of the irony; the girl who's been reincarnated in the world of Death Over You as her most hated Villainess.
8 186FADING SCARS (Avenger/Pjo crossover)COMPLETED
The world felt like it was suffocating him; letting him sink into the darkness until he was no longer willing to search for the light.They were gone.He was alone.Except for his Promise.His eyes; the ones that used to glitter like the sunrise upon the ocean waves, lay sunken deep in their sockets, shattered beyond repair. There was no hope, so he thought.So they all thought. But the boy we all know and love must still be there beneath his facade....right? At least, thats what his uncle, Tony Stark, believes. And he will do anything in his power to help his nephew. HIGHEST RANK #2 in Percy Jackson Avenger crossoversੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱੱ This is an Avenger Pjo crossover!! It is set before civil war with the old Avengers, not the new. I started this way before Apollo Trials came out, so we are going to create a universe where Apollo Trials never existed. I do not own Avengers or Percy Jackson...but I'm guessing that's pretty obvious.
8 127Let Me Love You ✔️
"Talk to him hyung. If he is okay to give me a chance.. then only....then only..... I want him hyung."-----KTH"I don't think I can have a normal relationship. I can't be selfish hyung. He deserve a better person."----- JJK#taekook#agnst#love#fluff#smut#mpreg#toptae#bottomkookStarted : 04/08/2022Ended : 18/10/2022
8 213The World Through Jeweled Eyes (Who Made Me a Princess Fanfic)
(A Who Made Me a Princess fanfic/three shot)This fanfic follows what I want to have happened after the events in the novel that our baby Athanasia read before she got reincarnated as the Athanasia we all know and love today!
8 243