Wednesday, September 16, 2020

Escaping A Prison Camp - 2

I wonder how far they took me from home,” Priscilla thought out loud. “I imagine if I got out there I would be able to find my way back. Do you know this area well?”

Hardly at all,” the gardener replied. “I travel a lot.”

So, you told me you’ve been here 5 months?” Priscilla stated while studying the guard’s tall watch towers on either corner of the outdoor area. “Why do you think they put us in here? I haven’t broken any laws or hurt anyone, personally.”

I think just for the challenge of it,” the gardener replied. “They capture whoever they can find and drag them here.”

If you’ve known how to escape, why haven’t you?” Priscilla inquired.

It’s not all bad here,” the gardener replied. “There’s a lot to do. I sorta enjoy tending the plants.”

I’m not letting them give me a job,” Priscilla said defiantly. “This is ridiculous. They have no right to keep me here.”

It’s interesting, the prison is so self-governing that the guards don’t even act much like guards most of the time,” the gardener said rising from his seat.

Where are you going?” Priscilla asked.

It’s almost 8,” he replied. “Want a piggy back ride?”

"You have to be trolling me," she rolled her eyes.

"Not trolling," he said, getting down on his knees in front of her. "Come'on, get on my back. We're getting close on time."

"You better get me out of here," she said, climbing on top of him.

He rose and she flung her arms around his neck to keep from falling backwards. He pulled on her arms to keep from choking. It was a topsy-turvy struggle but they eventually found the balance. He stopped walking suddenly and stood in a certain place.

"Okay, that's all," he said letting go of her legs. She slid down his back and bent her legs as her feet hit the ground.

He walked away but realized that she wasn't following him. She was still looking at the ground where she had landed. He grinned slightly.

"Do these silver squares on the ground mean anything?" she asked.

"They are the tops of iron rods which drive down into the prison's foundation," he answered.

"Every time we've done whatever it is we're doing every 15 minutes we've been standing on one," she realized aloud. "I've been noticing them all over the camp the last couple of days."

"Follow me inside," he answered. "That's where the next one is."

"The next what is?" she asked.

"The next silver square in the sequence," he replied opening the door for her.

They took a table in the prison cafe and she sat thoughtfully for a while trying to crack his game.

"You're really going to make me figure it out for myself aren't you?" she said.

"I'll answer your questions," he replied.

"It must have something to do with the auto locking at the end of the night,” she guessed. “Do you know how the auto locking works?"

"There is a server in the closed off hallways that runs a program at 7am to unlock all the cells and another at 11pm to lock all the cells."

"Do you think it's possible to disrupt the computer somehow and prevent it from locking the cells?" she asked.

"No need to disrupt the computer when there's a vulnerability intentionally programed right into it," he replied.

"Why would they intentionally leave a vulnerability?" she asked.

"Prisons in this area are only allowed to kidnap and imprison people without reason as long as they leave some means of escape," the gardener explained. "This is enforced by a powerful 3rd party. You can build a prison however you want as long as you leave some means of escape for those who are carefully looking for a way out. The man who designed this prison has long moved on to other things, but he was very clever when considering how to work in this prison's means of escape. I think the most interesting vulnerability is the one he left in the auto locking system. At least I think he did."

"What are you basing all this on?" she asked him.

He pulled a book out of his bag and set it on the table. "You've seen this?" he asked her.

"Yeah I have one in my cell," she replied.

"It's a manual of the prison," he stated flipping to a page, "Here is the program. It's written in blex, a computer programming language."














"Okay, so where's the vulnerability?" she asked.

He turned to another page, "Well, this page says the server has a string buffer that is dumped into the program at the end of the day. In theory, you could type code into the buffer and the computer will dump it into the program at line 93 of the auto locking script."

"What would that do?" she asked.

"Well, you could write a line of code that would unlock your cell," he said starting to write on a napkin.

"There is a global array called cell_lock which contains a boolean for each prison cell," he explained. "In other words, it's a list of true and false values that correspond to the cells. At 7am and 11pm an event fires that updates the physical locks of all the cells according to the boolean array which by default contains all false or all true values for unlocking or locking the cells. This means that if you can write code into the string buffer to set the boolean value for your cell to false, then when the event fires it would tell your cell to unlock rather than lock leaving your cell door wide open for you to walk out and escape the prison at night when the guards don't watch the grounds as diligently."

"Okay, I'm a little confused but maybe it makes sense," she replied. "How would you write code?" she asked.

"It's not clear in the manual," he replied. "But I think it's linked to the rods."

What rods?” she asked.

The rods that I was telling you about,” he replied. “The squares you see all over the camp are the tops of the rods.”

He flipped the book to another page and slid it to her. It was open to a page with a map of the prison overlaid with a grid. In each cell on the grid was a character, number, or symbol.


"The layout of the prison is pretty boxy isn't it?" he said.

"I guess," she replied.

"I think that might be because the prison is a giant keyboard," he whispered. "It's built on an 8 by 16 grid of squares, each square representing a character from the ascii table of characters. The silver squares you noticed are the exact center of each square. Deferring from the first page I showed you, it seems that to press a key on this giant keyboard you must apply at least 280 of weight as close to the silver square as possible. The system wakes up every 15 minutes and receives any key that is pressed. Wait, you're not less than 100 pounds are you?" he asked suddenly.

She gave him a look, "How do you know that no one else will press keys unintentionally while you are trying to type?" she asked.

"You don't," he replied. "You just have to hope. But I think the odds are on our side. I haven't seen anyone over 280 around here lately. People have their personal space. Two people standing that close together on the perfect spot at the perfect moment is certainly possible but hopefully unlikely enough that getting the entire line of code entered correctly into the buffer is feasible. And if someone scoots an extremely heavy filing cabinet or something on one it won't register that because the keys are ignored after more than a minute of sustained force."

"What happens if the code isn't entered correctly?" she asked.

"Line 193 is in a try-catch block, meaning if there is an error in the code the exception would be caught and the system wouldn't halt," he explained. "That means the program would finish normally and you could just try again the next day. How about another selfie?" he said. "We need an open parentheses next."

She followed him to a silver square close by their table in the bustling cafe. They crowded their feet around the little square and took a fake picture as the clock rolled past 8:15.

"Wait a minute, open parentheses?" she said as she sat back down at the table. "Aren't we trying to type this?" she asked pointing to the napkin he wrote on. "There's no open parentheses in this, right?"

"Well that is line that I think other prisoners have typed to escape in the past," he replied. "But I was going for something else," he said taking the napkin back. "This is what we are typing." He slid it back to her and she read:


"What does it do?" she asked.

"It's a for loop," he replied.

"K, that means nothing to me," she retorted.

"Well, you didn't let me finish," he said. "You use a for loop to iterate over an array. In this case, the for loop goes through all the booleans in the array and sets them all to false."

She stared at the napkin for a moment. "So, every single cell will unlock?” she whispered.

"If it works," he shrugged. "With the first option we could only get one of us out. Why not get us both out and everyone in the prison for that matter!"

"This code is a lot longer than the first one," she said.

"It will barely fit," he said. "The server wakes up and receives keys 64 times a day and the code is 56 characters and only if you condense it like this:"

"Here's the schedule of characters we need to input," he said showing her a piece of paper he had written on. "I also made a copy of the map and wrote in the times when each character needs to be hit. A few of these will be a challenge to get to."



"So the next one will be a lowercase i which will be back out on the lawn?" she asked.

"Right," he replied.

No comments:

Post a Comment