This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<!--So long and thanks for all the fish--> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Pocket Export</title> | |
</head> | |
<body> | |
<h1>Unread</h1> | |
<ul> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tab_depth = 0 | |
def log(s=None, **kwargs): | |
global tab_depth | |
msg = s if s is not None else ", ".join(["{} == {}".format(k, v) for k, v in kwargs.items()]) | |
print("\t" * tab_depth + msg) | |
def perms(n, l): | |
global tab_depth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void randop() { | |
munmap((void*)0x0F000000, MAPLEN); | |
void *buf = mmap((void*)0x0F000000, MAPLEN, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, 0, 0); | |
unsigned seed; | |
if(read(0, &seed, 4) != 4) return; | |
srand(seed); | |
for(int i = 0; i < MAPLEN - 4; i+=3) { | |
*(int *)&((char*)buf)[i] = rand(); | |
if(i%66 == 0) ((char*)buf)[i] = 0xc3; | |
} |
- Format string
Given that this challenge was 600 points, I expected to be challenged with this one. But with 91 solves I think the people at SDSLabs kinda messed up on the points for this one lol.
Checking out what type of file we were dealing with here:
[~/Documents/CTFs/backdoor]$ file team
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(lambda s=__import__("socket").socket():s.bind(('',9237))==s.listen(5)==map(lambda c,d:c.send(c.recv(99)),(s.accept()[0]for _ in iter(int,1))))() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// challenge_6.c | |
// Matasano Crypto Challenge | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
char* HEX_LOOKUP = "0123456789abcdef"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int overflow() | |
{ | |
char buf[136]; | |
return read(0, &buf, 256u); | |
} | |
int main() | |
{ | |
overflow(); | |
return write(1, "WIN\n", 4u); |