Coder Social home page Coder Social logo

bandie / ding Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 149 KB

Execute commands remotely in a secure way. Moved to git.chaospott.de

Home Page: https://git.chaospott.de/Bandie/ding

License: BSD 2-Clause "Simplified" License

Shell 27.30% Python 72.70%
client-certificate tls ssl remote remote-control remote-execution

ding's Introduction

ding

What is ding?

ding is a client-server thing written in python3. Its aim is to execute a set of commands remotely. The commands can be set in the server's config file.

How does it work?

The server will wait for a command to be sent by a client. If the command is present within the server's config file it will then execute the command, else nothing will happen.

What about ding's security?

The authentication is done via a SSL Client Certificate signed by an (self generated) Certificate Authority. The scripts for generating a CA and signing the Server/Client Certificates are also included to make it (relatively) easy. [ This involves typing in a few certificate details and entering a previously defined CA password. ]

Pic or didn't happen

Screenshot of ding Can't read a thing?

Requirements

  • Install python3 on your target computers.

Installation

At every step please read carefully what the generate certificates scripts want from you. The information on the certificates doesn't need to be true and can be totally random. They only need to be different from one another.

Step 1 to 3 can only be run on UNIX or GNU/Linux.

  1. Run ./1_generateCA.sh to generate a CA.
  2. Run ./2_generateServCert.sh to generate a signed Server Certificate.
  3. Run ./3_generateClientCert.sh to generate a signed Client Certificate.
  4. Move ding, ding.cfg, ding.crt, ding.key and CA.crt to the computer which should be able to send commands to the server.
    • UNIX or GNU/Linux: Also move ding.cfg to that computer.
    • Windows: Also move ding.win.cfg to that computer.
  5. Do some configuration on the server and client (dingd.cfg, ding.cfg or dingd.win.cfg, ding.win.cfg on Windows).
  6. Start the server using ./dingd or python .\dingd on Windows. (You may want to put this in a tmux session. [Ctrl+B, D] ;) ).
  7. Try out the client using ./ding <command> òr python .\ding <command> on Windows.

Optional: Cleartext password with timeout

If you want to be sure that this power won't be abused by bad people using your computer, you may want to add a password (saved in cleartext). The password will be sent inside the TLS connection.

Warning! Beware of the shell history!

You might want to do something like $ history -c after sending the password via the client or play around with bash's HISTCONTROL variable.

How to enable the password

  1. Open your dingd.cfg or dingd.win.cfg.
  2. Set pw_on=true.
  3. Set a password, like password=abc def.
  4. Set a password timeout: pwtimeout=10 for 10 seconds.

If you have a password with special characters as in spaces and the like, you may want to use quotation marks around your password. ./ding "abc def" or python .\ding "abc def" on Windows.

ding's People

Contributors

bandie avatar sir-boops avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.