Tell me more ×
Programming Puzzles & Code Golf Stack Exchange is a question and answer site for programming puzzle enthusiasts and code golfers. It's 100% free, no registration required.

A software vendor friend of mine wants to clamp down the development environment by limiting access to the software's source code to only Remote Desktop access, disallowing any digital communication including clipboard, printer, network shares, and internet access from that environment.

The reasoning is that they are contractually obligated to provide a company-standard-issue development environment to an overseas partner and there is a concern of theft.

I want to convince them that this is a futile effort and vain burden on good developers since the otherwise unsupervised access to the source code will provide ample opportunity to steal the data. No matter how many firewall rules and group policies are in place, one channel remains that cannot be removed - the screen.

Assuming the development environment has Visual Studio 2010, data compression software, and other common development environment tools, what is the slickest way to use the Remote Desktop screen to steal the data? Keep in mind any limitations of the screen refresh rate.

Candidate approach: a monochrome bitmap of the screen can hold over 200KB of an archive of such source code. Without error correction, that's just over 500 screenshots of monochrome data for 100MB of compressed source code. The data must be encoded, decoded, and I'm entirely too lazy to save 500 screenshots into paint. Existing free software can be involved, but not installed on the environment.

Other ideas? Implementations?

share|improve this question
2  
100MB of compressed source code?! The mind boggles. – Peter Taylor May 10 '11 at 18:56
Well, it's got images and other crap in there. The point is that the solution should be able to handle large payloads. – uosɐſ May 10 '11 at 18:59
2  
@PeterTaylor: The source code hasn't been golfed yet, obviously. – Lars Haugseth May 10 '11 at 21:13
Why only monochrome? Assuming you can connect in True Color, that's three bytes per pixel, or roughly 5 MiB per screenshot. Error correction isn't needed since you're (hopefully) not taking a camera to do the screenshots – so they come out pixel-perfect anyway. – Joey May 10 '11 at 23:27
2  
Who is the vendor? Please let us know so that we can all avoid all products ever produced by them. Clearly they are clueless about security. – MtnViewMark May 11 '11 at 1:37
show 1 more comment

closed as off topic by rynah, Ventero, SHiNKiROU, Joey, gnibbler May 11 '11 at 2:47

Questions on Programming Puzzles & Code Golf Stack Exchange are expected to relate to programming puzzle or code golf within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

up vote 4 down vote accepted

Use FRAPS to capture video from your local machine. Then you can flash stuff up on the remote desktop at up to the frame rate and it will all get recorded to a local video file.

I don't see a way to sync to exactly to the frame rate, so you'll need some error detection to make sure you're not getting data mid-draw. Here's a simple scheme using text and a python script:

framerate = 30  # fps of viewer
numlines = 24   # lines of text you can see at once
import sys,time,md5,base64
lineno = 0
while 1:
  lines = 'chunk starting at line %d\n' % lineno
  for i in xrange(numlines - 2):
    lines += sys.stdin.readline()
    lineno += 1
  print 'md5:', base64.encodestring(md5.new(lines).digest()),
  print lines
  time.sleep(1.0/framerate)

Run this script in the RemoteDesktop window and pipe in the text you wish to capture. When it is done, OCR each frame of your FRAPS output (that's the hard part, I'm not sure what you'd use for that). Throw away any duplicate frames and frames where the md5 isn't right.

You probably want to base64 encode your input, as OCR doesn't do well with nonprinting characters like tabs and spaces.

share|improve this answer
My experience of remote desktop is that if you're changing the entire contents of the screen every frame you should expect an fps nearer 5. – Peter Taylor May 10 '11 at 20:36
@Peter: then set framerate=5. – Keith Randall May 10 '11 at 22:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.