Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 10 submissions in the queue.
posted by martyb on Sunday October 12 2014, @10:45PM   Printer-friendly
from the you-can-quote-me-on-that dept.

http://arstechnica.com/security/2014/10/poor-punctuation-leads-to-windows-shell-vulnerability/

"A class of coding vulnerabilities could allow attackers to fool Windows system administrators into running malicious code because of a simple omission: quotation marks."


The comments on the Ars Technica article are well worth reading for additional examples and descriptions. Better still, take a look at Command-injection vulnerability for COMMAND-Shell Scripts over at The Security Factory. The author provides a well-developed progression of possible attack vectors under Windows where environment variables and directory names can be used maliciously. In general, one should always surround references to %CD% (i.e. the current directory) with quotes:

SET startdir="%CD%"

Another interesting case is illustrated by this code sample:

SET B=T"&calc&
SET C="%B%"

where accessing the value of the environment variable B, even though it is quoted, causes the system to try and invoke a program called "calc" (i.e. the Windows calculator.)

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Monday October 13 2014, @02:39AM

    by Anonymous Coward on Monday October 13 2014, @02:39AM (#105401)

    The Python programmer has to actually make the effort to call system() before an exploit is possible.

    The Bash scripter only has to allow an environment variable to be set. Oh, wait, the Bash scripter can't even control that if he's writing a CGI script!

    You Bash lovers who keep screaming "But C has a system() function!!#!$!!!@!@!" really need to stop. Face it, your preferred technology is full of holes that just don't exist in other languages!

  • (Score: 0) by Anonymous Coward on Tuesday October 14 2014, @07:41AM

    by Anonymous Coward on Tuesday October 14 2014, @07:41AM (#105858)

    if you really think security exploits don't exist in programs written in other languages, you sir are a dumfuk... that is all