Netcat in the Hat – The Answers Come Back

Active Image
Active Image

Discuss in Forums {mos_smf_discuss:Sept 06 – Netcat in the Hat}

Hello, challenge fans! For this past challenge, Tom Liston's rhyming scenario has garnered some amazing attention and justified compliments. This one was not only a lot of fun to read, but the some of the participants returned the favor by submitting rhyming answers! So not to be outdone, Tom stepped it up yet another notch by offering his answers in a way that would make the good doctor proud. Tom and myself will autograph and send copies of our book, Counter Hack Reloaded, to each of the winners listed below. Hope you had fun with Netcat in the Hat, and stay tuned for additional Skillz scenarios as we head towards the end of the year, where I will personally offer up a holiday themed challenge. 

Ed Skoudis, Intelguardians

… And The Winners Are…

Skillz Sponsored by Core Security Technologies

Netcat in the Hat – The Answers Come Back

The data was moved and
TPS Reports flew
From the bottom-most
Tray of our LaserJet II

The boss was so happy,
That he chuckled with glee,
And he hugged
(Yes, he HUGGED!)
Both Manish and… well… me.

“Boys,” said the boss,
“I’m amazed you came through!
Tell me! Please tell me!
What did you do?!?”

“Well, I thought very quickly”
Said Manish looking sly,
“And I hooked through our neighbor’s
Unprotected WiFi!”

“You did WHAT!?!” the boss countered,
“Stealing WiFi is bad!”
He turned to Manish and said, “Listen lad…
You’re not an employee,
You’re just an intern,
I’ll take you under my wing,
You’ve got so much to learn,
Let’s discuss this ‘mistake,’
Let’s chat later on AIM
Do you have a screen name?”


Active Image

Active Image

And later the evening,
Manish would, no doubt
Learn all the strange things
That the boss dreamed about…

In the present, however,
The boss wanted to know,
How we’d moved that huge file,
Over a link that was slow.
“That WiFi connection
Is Slow
Of course,” said the boss,
I’ve only HEARD that it’s so…”

“Like if you wanted to download,
A large graphic file,
On a connection like that,
It could take quite a while…
The TPS data is 4.1 GIG!
Compared to a photo
That’s really quite BIG!”

“When our prospects were dark,
‘Cause the network was dead,
Someone showed up and helped us,
And taught us”, I said.
“He taught us some tricks,
They were good tricks to know,
And when he was through,
Away he did go.
He taught us good tricks and he left just like that,
And he told us his name was Netcat in the Hat.”

“The file was here when the network went dead,
Or at least MOST of it was…” is what I then said.
“We needed a trick,
Something different to do
So Netcat showed us two things
Thing One and Thing Two.”

“Thing One is a tool” I explained with some glee,
“A Unix command by the name of dd.
Thing Two has some issues,
With naming you see,
Sometimes it is netcat, sometimes just nc”

“On the machine with the data
The trick is, you see,
The parameters given to our friend, dd:
‘if’ is set to the file, TPSDATA dot zip
And eight million and some
Is the amount that we ‘skip’
We then pipe all that through
To our buddy Thing Two”

[dd skip=8227126 | nc -l -p 54321]

“If Thing Two will just listen,
Our problems are less,
‘Cause we won’t need to learn
Our connection’s address

“We tell netcat to go,
And connect to that end
And dump out the data
With a simple append.”

[nc 54321 >>]

“The real tricky trick, is” I said with a nod,
“If the data we have, has a length that is odd.
dd grabs data blocks of configurable size
But the problem is what if the data size lies
On a number that is inconveniently mean
Like the same number before but now plus thirteen!”


Active Image



Active Image


“Then set dd’s block size to something that works”
Said the boss, who was beginning to act like a jerk,
“Set ‘bs’ to one, there’s no problem you see,
I could’ve told you both that if you’d just come to me.”

“Such an inelegant hack,” were the words that I thought,
But I actually said, “Perhaps, sir, there ought,
To be a better way, perhaps, let me see…
A better way to fix it that might use ‘Thing Three’”

“Thing Three?” asked the boss, with a quite furrowed brow,
“You would use a Thing Three?
Please explain to me how,
A Thing Three would be better than what I have done
By setting the block size of dd to one”

“Well, sir, I’m not sure if my way is the best,
But it makes sense to me, more so than the rest,
Because we’ve a cat and all cats without fail
Have to,
 Simply have to…
  They MUST have a tail”

[dd skip=8227126 | tail –c +13 – | nc -l -p 54321]

“So you can see sir, Netcat taught us some tricks,
That came in quite handy in our ‘netless’ fix,
And when facing odd file sizes he still has our thanks,
‘Cause Netcat ain’t one of those cats called a Manx!


Our Technical Winner is…

Aaron HertzClick HERE for the Technical Winning Entry

Our Creative Winner is…

Steve EskewClick HERE for the Creative Winning Entry

Note: This was the toughest category to judge. While many readers submitted their answers in rhyme, Steve’s was the truest to the good Dr. Suess.

Our Random Winner is…

Brandon Greenwood

Each winner will be contacted using the email address from their submission and gets a free copy of Counter Hack Reloaded autographed by Ed Skoudis and Tom Liston congratulating you on your victory and amazing abilities!

Copyright ©2021 Caendra, Inc.

Contact Us

Thoughts, suggestions, issues? Send us an email, and we'll get back to you.


Sign in with Caendra

Forgot password?Sign up

Forgot your details?