Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Command Line of a call to CreateProcess catchable?

Command Line of a call to CreateProcess catchable?

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stone Free
    wrote on last edited by
    #1

    Hi, I have a program that has a commandline option to pass a user and a password. If I start this program from within another windows program using CreateProcess, can dodgy types get hold of this commandline?

    D B M 3 Replies Last reply
    0
    • S Stone Free

      Hi, I have a program that has a commandline option to pass a user and a password. If I start this program from within another windows program using CreateProcess, can dodgy types get hold of this commandline?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      If it's a string literal, yes.


      "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

      "Judge not by the eye but by the heart." - Native American Proverb

      1 Reply Last reply
      0
      • S Stone Free

        Hi, I have a program that has a commandline option to pass a user and a password. If I start this program from within another windows program using CreateProcess, can dodgy types get hold of this commandline?

        B Offline
        B Offline
        bolivar123
        wrote on last edited by
        #3

        Someone could fairly easily view all the string literals in your .exe file. Alternatively they could replace the EXE that you are launching via CreateProcess and they could display the command line from their EXE.

        1 Reply Last reply
        0
        • S Stone Free

          Hi, I have a program that has a commandline option to pass a user and a password. If I start this program from within another windows program using CreateProcess, can dodgy types get hold of this commandline?

          M Offline
          M Offline
          Mike Dimmick
          wrote on last edited by
          #4

          The Process Explorer[^] utility can show the command line that any process (to which you have access) was launched with. I think it does this by using the ReadProcessMemory API. By default, processes have ACLs (security settings) set so that only the creator of the process can use this API, but this behaviour can be overridden with use of the Debug privilege, which Administrators have by default - and as we all know, most people log in to Windows as a member of the Administrators group.

          Stability. What an interesting concept. -- Chris Maunder

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups