Linux LOLBins Applications Available in Windows, (Sat, Dec 3rd)

Tux, the Linux mascot
Tux, the Linux mascot Date 16 October 2003 Source New Tux, created using Sodipodi. Based on original image by Larry Ewing, made in GIMP. Author Larry Ewing, gg3po

Some useful Linux applications that are now part of default installation in Windows 10, Windows Server 2019/2022 (LOLBins – Living Off the Land Binaries). 


The first one is curl which can be very useful for scripting to download or upload files and/or use with a username/password (curl –help) and save the output either to a new filename or the same:

C:UsersguyDownloads>curl -o Example.csv
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  230k  100  230k    0     0  1443k      0 –:–:– –:–:– –:–:– 1461k


The next application is tar (tar –help) is used to store, extract and manipulate archive files. Let’s take the previous file Example.csv, archive and compress it and then review the result. Using the same options as Linux will use gzip compression and create the file Example.tgz:

-c Create  -r Add/Replace  -t List  -u Update  -x Extract
-f  Location of archive
-v Verbose
-z, -j, -J, –lzma  Compress archive with gzip/bzip2/xz/lzma

C:UsersguyDownloads>tar zcvf example.tgz Example.csv
C:UsersguyDownloads>dir Example.*
 Volume in drive C is Starbase
 Volume Serial Number is EEB2-C010

 Directory of C:UsersguyDownloads

12/03/2022  01:39 PM           236,526 Example.csv
12/03/2022  01:46 PM            38,247 example.tgz

To extract the file(s), using the following command:

C:UsersguyDownloads>tar xvf example.tgz
x Example.csv

To view the content of the archive:

c:UsersguyDownloads>tar ztvf Example.tgz
-rw-rw-rw-  0 0      0      236526 Dec 03 13:39 Example.csv


This tool is a Windows original which I think is worth mentionning again. I wrote a diary in May 2020 [1] on how to use PktMON to capture packets using this tool in Windows 10. The resulting packet capture can be converted into a pcapng format to be read later with Wireshark.


The last one that is always useful is ssh/scp/sftp which is using the OpenSSH. The location of the OpenSSH binaries is: C:WindowsSystem32OpenSSH


First lest create some public/private keys using the default user home directory:

Generating public/private rsa key pair.
Enter file in which to save the key (C:Usersguy/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:Usersguy/.ssh/id_rsa.
Your public key has been saved in C:Usersguy/.ssh/
C:Usersguy>cd .ssh

 Volume in drive C is Starbase
 Volume Serial Number is EEB2-C010

 Directory of C:Usersguy.ssh

12/03/2022  02:10 PM              .
12/03/2022  02:10 PM              ..
12/03/2022  02:10 PM             2,655 id_rsa
12/03/2022  02:10 PM               567
11/10/2022  01:49 PM               545 known_hosts

Now ssh/scp/sftp is ready to use with a public key to a remote server. By default OpenSSH doesn’t run the SSH listener service but it can be configured using the information posted here in a Microsoft article.

Guy Bruneau IPSS Inc.
My Handler Page
Twitter: GuyBruneau
gbruneau at isc dot sans dot edu

(c) SANS Internet Storm Center. Creative Commons Attribution-Noncommercial 3.0 United States License.

Reposted from SANS. View original.

Alex Post