《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
- In Serial200 Chapters
Book Of The Dead
With one touch of the stone, Tyron receives his Class and his life changes forever. In an instant his bright and promising future as the scion of two powerful Slayers is torn apart and he must make a decision. Will he allow his Class to be purged from his soul, or will he cling to it, abandon all that he knows, and rise to power?
8 208 - In Serial54 Chapters
The Rabbit Knight
Lying on her deathbed, hacker enthusiast Ellowyn was about to breathe her last, but not before receiving a hero summon request to a futuristic world. Having little left to lose, she decided to start anew. To her dismay, her weak heart gave up in the middle of the transfer and only her soul was reincarnated. As Ellowyn regained her memories in the new world, she was surprised to find her new body just as frail as the one she had in her last life. With just a half-broken hero system and self-trained hacking skills, she was quick to find out that not all problems can be solved with logic and code alone.
8 219 - In Serial16 Chapters
Andraste
When the life of the young Archduke of the land of Caldera, is saved in battle by a girl wielding a tremendous power newly gifted upon her, the encounter triggers a sequence of events that will irrevocably change the lives of the people around them, and forever reshape the balance of power across the lands of the Northern Continent, on a world watched over by the technologically advanced, enigmatic, and benevolent Archons.Wandering into the midst of a battle between the lands of Caldera and Kaitain, Fallon encounters Falken Claymore, the Archduke of Caldera, beset by enemies and moments from death. She chooses to save his life by summoning her Warlord, a powerful yet unconventional armor that grants her the power to defeat his opponents, despite her inablity to use it to its full potential.With the battle ending in Caldera's favor, Falken seeks to take responsibility for Fallon, bringing her home with him to the mountain-citadel of Calandor. But his desire to protect and nurture her into a fully fledged Khan -- an officially acknowledged Meister of a Warlord -- places him at odds with the people close to him, and risks his engagement to the daughter of the royal family of a neighboring land.However, it is the arrival of representatives of the Khan Orden, which oversees all individuals gifted with Warlords, that brings matters to a head, and forces Falken into choosing between his heart and his duty to the people of Caldera.Book One of ""The Seals of Arcala"Status: Draft 1.0 Completed but being removed. Draft 2.0 is now being posted.
8 102 - In Serial43 Chapters
A Forgotten Hero
(author: This is gonna be a long synopsis I apologise. This should be a prolouge but as you will see I have a seperate prolouge, please forgive me. This fiction as a warning beforehand is as basic as it comes, prettymuch following all story conventions of both the mecha and school life genres. I am mostly writing this to figure out my writing style before I begin something truly creative and uique. I dont wanna ruin something I worked hard on by being illiterate. Also illustrations are at a minimum because all I have access to is MS paint.) In the year 2028 humanity (accidentally) created the means to travel great distances through space in a short period of time. This has led humanity down the road of great technological advancement and also led to the spread of humanity across their home system and just begiining first steps upon other solar systems planets. In the year 2033 the human colonies in space broke from the chains of their old countries creating hyper advanced societies disregarding nationality and any other defining factor. Two space societies formed the Solar Empire a monarchic society with its capitol on the moon Titan which controeld the entire human home system aside from Earth which still remained divided into seperate contries. The other was the Extra-solar Leauge. A mysterious society outside of easy contact range with any other humans besides themselves. To help with construction and other work outside of sealed and breatheable atmospheres of their cities and ships the Solar Empire and Extra-Solar Leauge created what became known as Advanced Movement Shells(AMS). These machines are best described as huge exoskeletons or "mechs", and they aided greatly in getting things done by increasing strength, durability, and the amount of tools able to be used. They also aided in quelling rebellions among extremist groups forming in these new societies. Finally in the year 2050 the Solar Empire having divinated their emperor, and now beliving themselves to be their religions chosen people, the Solar Empire declared a holy war of conquest against all the nations of Earth in order to conquer it under the idea that all humanity was required to bend to their divine emperors rule. The first month of the war whent badly for earth as the divided nations fell one by one due to the Empires superior weaponry among other technologies which made their forces nearly invincible. The AMS were used to great effect due to their almost "magical" level of technological advancement. Some nations able to put up some kind of defense created their own versions of these technological terrors. From there the war became a brutal stalemate and suddenly was won by the forces of earth. Why this is still hasn't come to the light of the common man, but one thing is for certain it took a heroic effort from one, or many people to win it for humanity...
8 101 - In Serial9 Chapters
Vampire Midas AU
An alternate timeline to my main AU's story.Taking an unintended detour while trying to get back to Fortnite island doesn't end well for Midas and his soon-to-be boyfriend Agent Jones, also known as Jonesy. A confrontation with vampires leaves the mastermind bitten and eventually starting to undergo his decent into vampirism.He struggles to hide it from his family, clashing with the bloodlusting monster deep inside him. Can he resist his hunger and keep it contained? Or will he lose control and let the truth escape?------Happy Halloween y'all. Well, I'm HOPING I can get all these parts done before Halloween is over. I suppose we'll wait and see I guess.But yeah I thought of this last minute and wanted to give y'all somethin' spooky to read for the spooky month. (I dunno if it's spooky but eh)I had a big brain idea for a third Oneshot on vampire Midas, but decided to instead give him an AU of his own. This will not be a long story as I'm hoping it won't have too many chapters, but the chapters themselves will be very long.This is an alternate timeline to my main AU's story. And yes Midas and Jones are still gay for each other in this timeline. That hasn't changed 😂One other thing, this AU is probably gonna be more on the smutty side, so if that ain't your thing maybe don't read this.Anyway enjoy a bloodsucking gold boi and his golden haired boyfriend
8 92 - In Serial32 Chapters
Locking Stars (Stars Series #1)
Ash is an anxious but determined English major who knows what she wants. Derek is a mysterious hockey player who's got a big reputation. Can they learn new things about themselves through each other or will the change bring them apart?*disclaimer* This story isn't fully edited and if things seems inaccurate I apologize!
8 207

