chrisallenlane / wash

`wash` is a framework for creating and interfacing with trojans that can establish a "web shell" on a compromised web server. It is designed with penetration testers in mind, and thus is highly versatile and extensible.
GNU General Public License v3.0
28 stars 7 forks source link

Vim functionality is somehow broken #39

Closed chrisallenlane closed 11 years ago

chrisallenlane commented 11 years ago

There are a few things wrong with Vim:

  1. Sometimes I'm still getting that issue whereby saved files are displaying oddly into the terminal.
  2. Sometimes Vim clears itself when I click on it
  3. Sometimes the cursor is very unresponsive at first (in the editor)

I still suspect the problem might have to do with cd-ing around or something.

chrisallenlane commented 11 years ago

This one was pretty bizarre.

The issue seemed to arise when the ACE editor saved a new file that did not conclude with a newline. If I wrote such a file to disk, then tried to cat out its contents from the shell, a few weird things would happen:

  1. The contents of the file would appear within the prompt context, rather than the shell history, sort of like this:
www-data@host:CONTENTS-OF-FILE-WOULD-BE-HERE/current-working-directory$

I have no damn clue why that happened. Again, though, doing an od -a on the suspect files would always show that they lacked a concluding newline character, which perhaps serves as an end-of-file marker. Even when cating these files from a regular shell, the output would be a little weird. (More specifically, the prompt would not appear on a clean newline.)

  1. (Actually, 2. Thanks, Markdown formatter!) After a file cated out oddly per the above, my cwd would always reset to the directory in which the connected trojan lived. I've really got pretty much no explanation for this. Was something disrupting my $_SESSION, and thus the saved cwd information was lost?

In any case, manually attaching a "\n" to file data before saving it seems to have done the trick at least for now. I'll keep a watchful eye open to see if this problem manifests itself again or differently down the road, but for the time being, I'll close the ticket.