Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'bytes.': 0.07; 'attack.': 0.09; 'nice!': 0.09; 'cc:addr:python- list': 0.10; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hypothetical': 0.16; 'petabytes': 0.16; 'reboot': 0.16; 'sequence:': 0.16; 'wrote:': 0.16; 'translation': 0.16; "wouldn't": 0.16; 'byte': 0.18; 'bytes': 0.18; '>>>': 0.20; 'suggested': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'fairly': 0.22; 'suppose': 0.22; 'am,': 0.23; '2015': 0.23; 'sat,': 0.23; 'slightly': 0.23; 'tried': 0.24; 'header:In-Reply- To:1': 0.24; 'example': 0.25; 'chris': 0.26; 'possibility': 0.27; 'data,': 0.27; 'disk': 0.27; 'message-id:@mail.gmail.com': 0.28; "doesn't": 0.28; "i'm": 0.29; 'fri,': 0.31; 'maybe': 0.31; 'table': 0.32; 'probably': 0.32; 'values.': 0.33; 'windows.': 0.33; 'received:google.com': 0.34; "i'll": 0.34; 'happened': 0.35; 'somebody': 0.35; 'but': 0.36; 'there': 0.36; 'possible': 0.36; 'two': 0.37; "didn't": 0.37; 'subject:: ': 0.37; 'thought': 0.37; "won't": 0.38; 'pm,': 0.39; 'expect': 0.39; 'sure': 0.40; 'where': 0.40; 'your': 0.60; 'back': 0.61; 'entire': 0.61; 'you.': 0.64; 'subject:Data': 0.66; '26,': 0.72; 'smith': 0.76; '(okay,': 0.84; 'attacks.': 0.84; 'chrisa': 0.84; 'malicious': 0.84; 'to:none': 0.90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=vt/MIC3BQW3b1WFz6AsDrPUY9evP7X8XioebUDKM0H8=; b=nCKtAfXfUUZGNH3B3o6PfRZlZMJBcNtz8VSFMVQsuEnnbzrtTciHVWMJOfwcnn5mEU o3CvAsMLkpms07UIUx9mQHtxSyifNqVm2Ke+UAQhKFLBEpwFLiqpt2a7Nkg+kSQ5P8jZ 6d8uRuetJx+67558yI5qls5B64qR9ri22/TyBlVO8NafoK6U97gYes7GMb4iwAxwfll4 erHMW9l83IDh+FWHpdmYuhxqVpT0dodKbhKYvbRvUv2PYK5phVeImW2UeDKKVPnmVezb ZaU7ZqwyY30IjsImfB6ZrPZUVYkcrvpkFDVlz3+heDDDXZko7bu6uyiAyn8mHSVi9j9H YLPw== MIME-Version: 1.0 X-Received: by 10.50.61.241 with SMTP id t17mr2365498igr.34.1435387958491; Fri, 26 Jun 2015 23:52:38 -0700 (PDT) In-Reply-To: References: <558b7e85$0$1648$c3e8da3$5496439d@news.astraweb.com> <558bc912$0$2899$c3e8da3$76491128@news.astraweb.com> <558c1a7e$0$1668$c3e8da3$5496439d@news.astraweb.com> <558d86b0$0$1659$c3e8da3$5496439d@news.astraweb.com> Date: Sat, 27 Jun 2015 16:52:38 +1000 Subject: Re: Pure Python Data Mangling or Encrypting From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435387966 news.xs4all.nl 2936 [2001:888:2000:d::a6]:59960 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 5621 X-Received-Body-CRC: 3228416953 Xref: csiph.com comp.lang.python:93226 On Sat, Jun 27, 2015 at 3:59 PM, Ian Kelly wrote: > On Fri, Jun 26, 2015 at 7:21 PM, Chris Angelico wrote: >> On Sat, Jun 27, 2015 at 6:09 AM, Randall Smith wrote: >>> Give me one plausible scenario where an attacker can cause malware to hit >>> the disk after bytearray.translate with a 256 byte translation table and >>> I'll be thankful to you. >> >> The entire 256-byte translation table is significant ONLY if you need >> all 256 possible bytes. Suppose I want to generate the following byte >> sequence: >> >> "\xCD\x19" >> >> (Okay, this is a slightly oversimplified example, as this attack >> doesn't work on a modern Windows. But back in the days of DOS, this >> program would reboot your computer.) > > Nice! When I suggested the possibility of a two byte value malicious > payload, I thought it an extreme example of the hypothetical attack. I > didn't expect that somebody might actually produce one. I'm fairly sure this won't actually work on a modern system (I tried it and all that happened was that debug.exe terminated), but it's entirely possible there are other attacks. Or attacks that require only a small number of bytes - maybe create a gzip bomb that will expand to petabytes of data, that probably wouldn't need many unique byte values. ChrisA