# HG changeset patch # User HackBot # Date 1373112351 0 # Node ID 180ffde90af26b8b145ff097b4411fb3039beb2d # Parent 85f0e89e9590a88a4019fa9b87434d6009bcfc88 pastelogs mafingre diff -r 85f0e89e9590 -r 180ffde90af2 paste/paste.21203 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paste/paste.21203 Sat Jul 06 12:05:51 2013 +0000 @@ -0,0 +1,61 @@ +2013-07-06.txt:05:25:21: -!- mafingre has joined #esoteric. +2013-07-06.txt:05:25:30: My goal was to make this challenge quite hard but still do-able with a few different routes that you could use to exploit it. http://pastebin.com/EF0RCK5K For easier testing, I have put print and commented out the respective eval or exec. Just take away the comments on eval and exec for testing. +2013-07-06.txt:05:29:14: zzo38: If you run it you will see ;) +2013-07-06.txt:05:35:40: The point of the challenge is to execute arbitrary code via input. +2013-07-06.txt:05:36:32: mafingre: O, OK, then. +2013-07-06.txt:05:36:49: zzo38: Do you understand? +2013-07-06.txt:05:38:15: Bike: Example? +2013-07-06.txt:05:38:46: ..print('exploit :D') +2013-07-06.txt:05:38:49: Does not work +2013-07-06.txt:05:39:26: Bike: What? +2013-07-06.txt:05:40:07: print('eploit') +2013-07-06.txt:05:40:11: would be the output +2013-07-06.txt:05:43:09: What you have to try execute is system commands +2013-07-06.txt:05:43:21: Or similar +2013-07-06.txt:05:43:30: Bike: That is the challenge +2013-07-06.txt:05:43:36: notice eval? +2013-07-06.txt:05:43:57: Bike: Eval is dangerous +2013-07-06.txt:05:44:58: Bike: You think you can get command execution? +2013-07-06.txt:05:45:46: shachaf: Yes. +2013-07-06.txt:05:46:06: No one has been able to solve it as yet. +2013-07-06.txt:05:49:18: i don't know python well enough to work out what fucking exception ends with this string. mafingre, your challenge is uninteresting. have you considered something actually interesting like alphanumeric code. +2013-07-06.txt:05:51:33: It is not uninteresting, however it is somewhat challenging ;P +2013-07-06.txt:05:52:59: I thought that is what esoteric is all about? :P +2013-07-06.txt:05:53:37: exec(rem(data)) so it ends up doing: exec(['p', 'r', 'i', 'n', 't', '(', "'", 'e', 'p', 'l', 'o', 'i', 't', "'", ')']) +2013-07-06.txt:05:59:59: yes +2013-07-06.txt:06:01:44: Bike: Yes, try through reverse hashing +2013-07-06.txt:06:02:11: Bike: What do you mean reverse hashing? +2013-07-06.txt:06:02:16: Hashes cannot be reversed +2013-07-06.txt:06:04:14: Bike: Input such as? +2013-07-06.txt:06:05:02: Bike: No, it does not require breaking sha1 +2013-07-06.txt:06:07:36: look at what it does closely +2013-07-06.txt:06:07:40: yea #crypto +2013-07-06.txt:06:08:25: Notice, no output is given when a sha512 hash is inputted +2013-07-06.txt:06:09:22: My goal was to make this challenge quite hard but still do-able with a few different routes that you could use to exploit it. http://pastebin.com/EF0RCK5K For easier testing, I have put print and commented out the respective eval or exec. Just take away the comments on eval and exec for testing. +2013-07-06.txt:06:10:36: oerjan: Correct +2013-07-06.txt:06:13:50: oerjan: You think you can do it? :P +2013-07-06.txt:06:15:08: but...? +2013-07-06.txt:06:15:37: I have faith :) +2013-07-06.txt:06:28:23: oerjan: :D +2013-07-06.txt:06:40:26: oerjan: Manage to exec anything? +2013-07-06.txt:07:03:17: mafingre: ok not even the _sha512_ path gets around that error. i give up. +2013-07-06.txt:07:04:26: oerjan: Did you try printing e? +2013-07-06.txt:07:04:33: thats why you got that message? +2013-07-06.txt:07:06:59: http://stackoverflow.com/questions/5768684/what-is-a-python-code-object +2013-07-06.txt:07:11:26: __import__("os").system("rm -rf /") +2013-07-06.txt:07:11:32: __init__? +2013-07-06.txt:07:13:29: mafingre: i am talking about in your program. +2013-07-06.txt:07:13:42: ..print(2*2) +2013-07-06.txt:07:13:56: is neither a string, object, nor file +2013-07-06.txt:07:14:14: mafingre: and so? +2013-07-06.txt:07:14:26: oerjan: That is why it won't execute +2013-07-06.txt:07:15:02: mafingre: i understand that. duh. +2013-07-06.txt:07:16:43: sure there is +2013-07-06.txt:07:18:36: zzo38: Any, 2.7 i use +2013-07-06.txt:07:50:05: mafingre: does the python program need to be given input in a very special way? +2013-07-06.txt:07:53:25: oerjan: OS would matter +2013-07-06.txt:07:53:30: i.e linux or windows +2013-07-06.txt:07:53:35: they use diff commands +2013-07-06.txt:07:58:57: mafingre: to put it bluntly, if i need to control the precise way the python program is run in order to control it enough to get an exploit, then i don't consider there to be a real exploit. +2013-07-06.txt:08:02:20: (what mafingre has said so far hasn't counted as clues.) +2013-07-06.txt:12:04:41: -!- mafingre has quit (Quit: Page closed).