Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #194999

Re: encryption

From Richard Hector <richard@walnut.gen.nz>
Newsgroups linux.debian.user
Subject Re: encryption
Date 2018-04-23 08:00 +0200
Message-ID <vHCG5-5Xk-7@gated-at.bofh.it> (permalink)
References <vGK2Z-3Dx-1@gated-at.bofh.it> <vH3Il-8kQ-5@gated-at.bofh.it> <vH6ZA-2bM-19@gated-at.bofh.it> <vHcsh-5Je-5@gated-at.bofh.it> <vHpfQ-5SG-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 23/04/18 03:29, Brian wrote:

> I reduced the contents of myscript to its one essential line:
> 
>  mpw -M "secret" "railcard"
> 
> Then
> 
>  brian@desktop:~$ echo hello && eval /home/brian/myscript && echo world! & sleep 2 && ps -f
>  [1] 2049
>  hello
>  hYM@ei0tSL1rOZRmYD4:
>  UID        PID  PPID  C STIME TTY          TIME CMD
>  brian     1106  1070  0 14:27 pts/2    00:00:00 -bash
>  brian     2049  1106  0 16:15 pts/2    00:00:00 -bash
>  brian     2051  2049  0 16:15 pts/2    00:00:00 /bin/bash /home/brian/myscript
>  brian     2052  2051 89 16:15 pts/2    00:00:01 mpw -M                                       railcard
>  brian     2053  1106  0 16:15 pts/2    00:00:00 ps -f
>  brian@desktop:~$ world!
> 
> sleep is needed because mpw itself uses scrypt to generate a password
> and is slow. -M should be followed by the secret. It is not revealed
> by ps while eval is evaluating it. I do not know why. Perhaps it has
> something to do with the way mpw processes the command.
> 

I believe a program can alter its own command line (as it appears to the
system), and this is done by some programs that take passwords on the
command line - which explains why the password is hidden, but the rest
of the command line isn't. On the other hand, it's generally preferred
not to pass passwords on the command line - use eg a config file, stdin,
or an environment variable instead.

BTW, if you're still interested in the original question, did you find
'shc'? It encrypts your script and creates a binary executable. I don't
know how current/good the encryption is, though. It's in debian.

Richard

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

encryption Brian <ad44@cityscape.co.uk> - 2018-04-20 21:40 +0200
  Re: encryption Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-20 22:00 +0200
  Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-21 02:10 +0200
    Re: encryption Brian <ad44@cityscape.co.uk> - 2018-04-21 17:30 +0200
      Re: encryption john doe <johndoe65534@mail.com> - 2018-04-21 17:40 +0200
        Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-21 22:00 +0200
          Re: encryption john doe <johndoe65534@mail.com> - 2018-04-22 08:30 +0200
            Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-22 20:30 +0200
      Re: encryption Glenn English <ghe2001@gmail.com> - 2018-04-21 19:00 +0200
        Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-21 22:30 +0200
      Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-21 21:50 +0200
        Re: encryption David Wright <deblis@lionunicorn.co.uk> - 2018-04-22 18:20 +0200
          Re: encryption Brian <ad44@cityscape.co.uk> - 2018-04-22 18:50 +0200
            Re: encryption David Wright <deblis@lionunicorn.co.uk> - 2018-04-23 10:50 +0200
              Re: encryption Brian <ad44@cityscape.co.uk> - 2018-04-23 13:20 +0200
                Re: encryption David Wright <deblis@lionunicorn.co.uk> - 2018-04-24 20:50 +0200
  Re: encryption David Wright <deblis@lionunicorn.co.uk> - 2018-04-21 18:40 +0200
    Re: encryption Brian <ad44@cityscape.co.uk> - 2018-04-21 20:20 +0200
      Re: encryption David Wright <deblis@lionunicorn.co.uk> - 2018-04-21 21:00 +0200
        Re: encryption Brian <ad44@cityscape.co.uk> - 2018-04-21 21:20 +0200
          Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-21 23:30 +0200
          Re: encryption David Wright <deblis@lionunicorn.co.uk> - 2018-04-22 04:30 +0200
            Re: encryption Curt <curty@free.fr> - 2018-04-22 11:20 +0200
              Re: encryption Reco <recoverym4n@gmail.com> - 2018-04-22 11:50 +0200
                Re: encryption Brian <ad44@cityscape.co.uk> - 2018-04-22 19:10 +0200
      Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-21 22:50 +0200
    Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-21 22:10 +0200
      Re: encryption David Wright <deblis@lionunicorn.co.uk> - 2018-04-22 04:00 +0200
        Re: encryption Brian <ad44@cityscape.co.uk> - 2018-04-22 17:40 +0200
          Re: encryption Richard Hector <richard@walnut.gen.nz> - 2018-04-23 08:00 +0200
            Re: encryption Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2018-04-23 09:00 +0200
        Re: encryption David Christensen <dpchrist@holgerdanske.com> - 2018-04-22 20:10 +0200

csiph-web