Loading AI tools
From Wikipedia, the free encyclopedia
My English-language Wikimedia user accounts:
Wikipedia:Babel | ||||
---|---|---|---|---|
| ||||
Search user languages |
DSD ad The last year I've noticed an ad from Australia's DSD keep appearing in the tech sites I've visited. I've decided to solve it after reading about the GCHQ challenge. I've posted it here since I don't have my own blog.
Write out the string provided and save it to a file (DSD-3line.txt). I initially had trouble with this by confusing 'l' (lowercase L) for 'I' (uppercase I):
6AAAAABbi8uDwx4zwDPSigOKETLCiAM 8AHQrg8EBg8MB6+wz/7/z+TEct0SlpGf5 dRyl53USYQEE56Ri7Kdkj8IAABkcOsw=
Decode the Base64 encoded string:
openssl base64 -d -in DSD-3line.txt -out DSD-3line.bin
Run the code. Initially I tried to link in the code using ld -r -b binary -o DSD-3line.o DSD-3line.bin
, but had some trouble. After reading about the GCHQ challenge I've reused the technique explained in the solution.
Compile program that will run the resulting code above (cyber.c):
#include <fcntl.h> #include <stdio.h> #include <sys/mman.h> int main(int argc, char**argv) { int fd; if (argv[1] == NULL) { fprintf(stderr, "%s: Argument required\n", argv[0]); return 1; } fd = open(argv[1], O_RDWR); if (fd < 0) { perror(argv[1]); return 1; } void *block = mmap(NULL, 4096, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_SHARED|MAP_32BIT, fd, 0); if (block == MAP_FAILED) { perror("mmap"); return 1; } __asm__ ( "call %%eax;" : : "a" (block) ); return 0; }
Execute what is in DSD-3line.bin:
./cyber DSD-3line.bin
Find the result:
strings DSD-3line.bin
I didn't apply for the position even though I live near Canberra, but it might help somebody who's interested.
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.