fullspectrumdev / tsh-update

Tiny SHell - An open-source UNIX backdoor (I'm not the author either, this is just my fork of a fork for experiments and updating it!)
http://packetstormsecurity.org/files/31650/tsh-0.6.tgz.html
1 stars 0 forks source link

TODO: Fix it on OpenBSD #11

Open fullspectrumdev opened 5 months ago

fullspectrumdev commented 5 months ago

At the moment, the tinyshell implant doesn't actually work on modern OpenBSD due to differences in the implementation of memcpy.

The fix for this, discovered through extensive trial and error, is to just use memmove instead.

I'm unsure if this will break on other platforms though, so I might have to "guard" it with an ifdef or some bullshit.

fullspectrumdev commented 5 months ago

Currently, it also does not actually compile on OpenBSD. I should fix this as well as the memcpy/memmove issue and validate that it doesn't break anything elsewhere (FreeBSD, Linux) before proceeding.

fullspectrumdev commented 5 months ago

this is now fixed, at least, it works on OpenBSD, FreeBSD and Ubuntu test hosts.

The changes were:

  1. Replacing memcpy with memmove in the pel.c file
  2. Adding a missing include of sys/select.h