Level 0

Vortex
in
Level Goal:
Your goal is to connect to port 5842 on vortex.labs.pulltheplug.org and read in 4 unsigned integers.
Add these integers together and send back the results to get a username and password for level 1.

Note: that vortex is on an x86 machine (meaning, a little endian architecture)

Helpful Reading Material
C Programming Introduction
Network Programming Tutorial

A little question...

The 4 integers, that the server sends to me, are gotten using only one recv (If this then I need to divide the buffer string in 4 parts ...) or I need to use recv 4 times?

I hate asking questions like this, but this time I really need help ...

EDIT:

I'm an idiot, I decide how much bytes I need everytime I do a recv() ...

Im Sorry ... :-D

Shell? What are you talking

Shell? What are you talking about?
There is no shell to get - you just have to read in 4 unsigned ints.
No shell whatsoever.
I recommend watching the video. Evereything is well explained there.

Best regards
darkelf

sorry

i was actually on level 1 when i wrote that comment and i wrote in the wrong place i guess

Frustrating

i understand what to do i get the freaking shell but it exits can somebody help me please

Confused

This is awful that im stuck on level 0, but I connect to the host on 5842, and get 96 bytes (just to be sure) of data. I end up with a stream of giberish, is it at all encoded?

96? That's a bit much.

96? That's a bit much. Consider that you're only expected to read 4 unsigned integers. How many bytes is one integer?

And no, the numbers aren't encoded, but if it's not as easy as print them to screen, read off the values, add them up with a calculator.

If you're really stuck, look for the video. Site search is in the top right.

What video?

What kinda video are You talking about?
I've got the user and pass, but where should I use them?

One Little Question for Help

(EDIT: I figured it out.)
I'm relatively new to this but i've been reading and learning as much as a possibly can about all this the past few days. I've written a script for getting past this level 0 but there is just one problem I keep having. I watched the video tutorial posted for this level to help me get started and built off of that, but the one problem I have is that I cannot tell what single character it says after "struct sockaddr_in". I know that there is a semi-colon right after it, but I cannot see what it is. I thought it was an "s" but that causes an error to come up when I compile saying that "the storage size of 's' is unknown". If anyone has some insight to my problem it would be greatly appreciated. Thanks.

EDIT: Nevermind, took me a while, but I found my error fixed it all and I'm good now.

VB6 is not a good language

VB6 is not a good language to try to make this with, although I made one in vb6 using thundervb. Unless you have a function, it is hard to work with unsigned int (to my understanding). Took me a hour or less to get this.

IM COMPLETELY NEW TO THIS

IM COMPLETELY NEW TO THIS WORLD AND DONT HAVE ANY CLUE ABOUT WHAT IM DOING. PLEASE HELP ME.

SPIDA_MAN

First, read everything you

First, read everything you see on this web page. After you get familiar, ask your questions.

So long, and thanks for all the fish!

So many Questions

1) If you have a question get on the irc
irc.overthewire.org #vortex
2)Most questions you can answer yourself or with google ....look first.
3)Use C these challenges are intended for C and you will find most are most easily written in C.

Connection Closing

I really hate being the dumb new guy. But I am. I can connect ok, but accourding to our friend Beej (of the tutorial) the vortex server is closing the connection before it sends me any info. to quote Beej:

"Wait! recv() can return 0. This can mean only one thing: the remote side has closed the connection on you! A return value of 0 is recv()'s way of letting you know this has occurred"

Am I just dumb or is there a problem? thats all i really need to know.

Thanks

EDIT: Answer: dumb.

the description of the task is somewhat unclear (imho)

Hi there,

today I joined this beautiful place and immediately started the challenge.
OK, so far I was able to connect to port 5842 on vortex.labs.pulltheplug.org and read those 4 bytes.
This is where the confusion starts. There are many ways to add 4 bytes (as ints) together.
See an example:

This is what the server sent me (it differs each try):

[69.55.233.89] ^�u)
94 (first char as int)
178 (second...)
117 (...)
41 (...)

Now, I can add them like this: 94+178+117+41 = 430
and send this as a string.

I can also add it together as '9417811741'

Anyways, if I send it back as ordinary string, I get the 'bzzzt, wrong'-message.
If I convert it to host-byte-order, I can send whatever I want without getting the wrong-message,
but some random stuff instead.
So, I'm pretty stuck at the zero-level and would be very thankful, if someone can shed some light on this.

Thanks a lot in advance
darkelf

edit: aaaarrrgh, forget about it - I was just dumb. Got it now!

the description of the task is absolutely clear

There is nothing said about "4 bytes". It is said about "4 integers", that is 16 bytes

So long, and thanks for all the fish!

True, it is

Yes, you are absolutely right!

That's why I wrote, that I was just dump. There is really nothing unclear.
Thinking befor writing would be a good advice for myself.

Best regards and thanks for this beautiful tasks.

darkelf

Converting datas

hi ,

i made a small programm in pyhton in order to receive the datas from vortex.labs.pulltheplug.org , until here no problem : this is my datas for example : §å¼9 . i want to know if i need to convert them , i would like to transform them in integers : but for the moment i don't know how to convert string in integer , besides this characters are specials .

Converting datas

You just read your 4 bytes, interpret them as little endian UInt32 and use. The string you copied here in your message can mean anything depending on encoding, so it is useless.

So long, and thanks for all the fish!

You're definitely going the

You're definitely going the right way, they do need to be integers. But (I'm a noob to, so I may be wrong) the only way I found to get the integers was to recv() them as integers instead of recv()ing them as characters. Took me a while to get the arguments for recv() correct, but after that the rest of the challenge was simple.
Post again if I wasn't clear enough, or you need more help.
**Groupies Required**

Can you email me about that?

I am kinda brute forcing it right now. I can recv(), but that grabs them as a string. No prob, right? I split it up into bytes. Then, I strip out the "\\x". NOw I still can't convert them to integers.

darkha7 at gm ail

wouldn't mind figuring out what I have going wrong here.

What do you mean by saying:

What do you mean by saying: "I strip out the "\\x""?
What language you are coding with?
If you use C, just reveive the goods as uInt, if you are using Perl or Python or Ruby unpack what you received and pack the result before you send it. There is really no need to convert anything. If you have any question on "how", just ask.

darkelf

Well, for starters I am using python

I connect to the port using x.recv(1024). That comes in as a string 4 characters long. So, I separate it into 4 separate strings, so I can integerize each one and add them up. The int() hates them.

I tried the unpack option from struct: struct.unpack('I', data) but that uses the entire 4 character string, so that can't be right. If I break up and unpack it with B (unsigned char) then I can use int() on it and add it up. not sure if that is right though.

Then I send it back and get more gobledygook back. But no, bzzt wrong. Should the response be plain english?

You are doing something wrong ;-)

In the task there it says:

read in 4 unsigned integers.

Nobody told you to read a string( not to say a 1024 long one ) - does this ring a bell?
Don't give yourself such a hard time with splitting and stuff. You may consider something like that:

sometinyvariable = unpack('I',s.recv(numberofbytesyouwanttoreceiveatatime))

Now it must ring a really huge bell. Hint: the placeholder numberofbytesyouwanttoreceiveatatime does not stand for 1024.
By the way, the final answer you'll get from the server is indeed plain english.
If you still don't get the penny, give me an email where I can reach you.

darkelf

edit: just saw your email above. If you need more help, let me know.

I followed your example

and I think that the problem I was having resolved around the send. See, the send() function would only handle a string. Ooops. Everything else worked.

Anyway, I watched the video, and figured out the mistake. Thanks guys.

It seems strange that ppl

It seems strange that ppl have problems with level 0, at least by 2 reasons:
1. There is very good article attached to the task description (I used example provided, edited just a bit and it worked)
2. There is level0 solution video here on the site :)

So long, and thanks for all the fish!

needing help

Okay, i alread consider myself a noob so no need to tell me again ;-p

Anyway... i started on this today and got to connect to the server and recv()'ed what the servers got to say...

Now when i output it to the screen its just 4 bytes of random characters so im thinking either the i have to convert it from network to host long or convert the char * to a int for it to be added.

I have tried to do both of those but its leading me nowhere..

Could somebody please tell me if im on the right track or be able to point me in the right direction...

Thanks in advanced
TransaeriS//

confused newbie

Okay, let me try to ask this without giving anything away.
I'm pretty sure I've done this properly.
I'm not getting the 'bzzzt, wrong answer' reply.
However, I cannot read the answer I get.
Also, if I could read the reply I was getting and determine the username and password, where do i USE the username and password as I can access the Vortex Level 1 problem without a username and password??

Answer not working

The username and password i received don't seem to work...

sending issues...

whenever i send the data, gdb tells me i received SIGPIPE... is this an issue on my end or vortex???

Am a beginner in this... i

Am a beginner in this... i connect to the vortex.labs.pulltheplug.org on port 5842 using telnet on DOS but all i get is some weird characters... wat shuld i do...or wat shuld i use...am new at this need help..plz.!

you have to program a simple

you have to program a simple app to connect to the server then get the intergers(those characters you see) and add then then send them back to the server and it will show you the password and username

huh?

what type of program will i use?

Heya

What do you mean what type of program will I use?
You need to write a small app in whatever programming language you know (If you know none start with C, read the links above) Personally I used Pelles C (running on my windows computer)
If you're running Linux I hear that Gcc is the way to go (haven't tested it, ubuntu is still installing on my other computer) but for Windows I suggest Pelles C. Not that I've tried any other compilers...
I have a feeling I didn't help at all...
**Groupies Required**

Why not use nc?

Is there a reason that won't work?

hmmm

I'm assuming that since the data changes every connection, you can't break the connection. That makes nc tough to use.