User:Pepsi Lite

My English-language Wikimedia user accounts:
 * Commons
 * Wiktionary

Defence Signals Directorate (DSD) Solution
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.

Step 1
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=

Step 2
Decode the Base64 encoded string: openssl base64 -d -in DSD-3line.txt -out DSD-3line.bin

Step 3
Run the code. Initially I tried to link in the code using, 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): 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; }
 * 1) include 
 * 2) include 
 * 3) include 

Step 4
Execute what is in DSD-3line.bin: ./cyber DSD-3line.bin

Step 5
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.

sr:Корисник:Pepsi Lite