Skip to content

fix suid command

fix suid command #16

Triggered via push March 21, 2024 02:25
Status Success
Total duration 15s
Artifacts

pylint.yml

on: push
Run linters
7s
Run linters
Fit to window
Zoom out
Zoom in

Annotations

29 errors and 2 warnings
/home/runner/work/FFM/FFM/commands/help_commands.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import time from commands.command_manager import register_plugin from model.plugin.command import Command from model.driver.input_api import * # ----------------------------------------------------------------------------- + class Debug(Command): def __init__(self, *args, **kwargs): pass
/home/runner/work/FFM/FFM/commands/notty_sudo.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import os import random import string from model.driver.input_api import *
/home/runner/work/FFM/FFM/commands/log_control.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from model.driver.input_api import * from model.plugin.command import Command from commands.command_manager import register_plugin import os
/home/runner/work/FFM/FFM/commands/remote_elf.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import base64 import io import tqdm from model.driver.input_api import *
/home/runner/work/FFM/FFM/commands/remote_elf3.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import base64 import io import tqdm from model.driver.input_api import *
/home/runner/work/FFM/FFM/commands/remote_script.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from abc import abstractmethod from model.driver.input_api import * from model.plugin.command import Command from commands.command_manager import register_plugin
/home/runner/work/FFM/FFM/commands/stealth_commands.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import time from commands.command_manager import register_plugin from model.plugin.command import Command from model.driver.input_api import * # ----------------------------------------------------------------------------- + class PtySpawn(Command): def __init__(self, *args, **kwargs): pass
/home/runner/work/FFM/FFM/commands/stealth_commands.py#L61
pass_command("unset SSH_CONNECTION") # ----------------------------------------------------------------------------- + class Shred(Command): def __init__(self, *args, **kwargs): self.file = None if len(args) == 2: self.file = args[1]
/home/runner/work/FFM/FFM/commands/stealth_commands.py#L95
def execute(self): if not check_command_existence("shred"): shell_exec(f"FN={self.file}") shell_exec( - 'dd bs=1k count="`du -sk "${FN}" | cut -f1`" if=/dev/urandom > "${FN}"; rm -f "${FN}"',print_output=True,) + 'dd bs=1k count="`du -sk "${FN}" | cut -f1`" if=/dev/urandom > "${FN}"; rm -f "${FN}"', + print_output=True, + ) write_str("{} deleted with dd/rm\r\n".format(self.file), LogLevel.ERROR) else: shell_exec("shred -uz {}".format(self.file)) write_str("{} deleted with shred\r\n".format(self.file), LogLevel.ERROR)
/home/runner/work/FFM/FFM/commands/upload_file.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from model.plugin.command import Command from model.driver.input_api import * from commands.command_manager import register_plugin import base64 import gzip
/home/runner/work/FFM/FFM/misc/logging.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import re from model import context
/home/runner/work/FFM/FFM/commands/enumeration_commands.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ -import random + +import random import string import time from commands.command_manager import register_plugin from model.plugin.command import Command from model.driver.input_api import *
/home/runner/work/FFM/FFM/commands/enumeration_commands.py#L252
def usage(): return "Usage: !mtime 5" def execute(self): write_str( - "[+] Files Modified in the last {}m:\r\n".format(self.time), LogLevel.WARNING + "[+] Files Modified in the last {}m:\r\n".format(self.time), + LogLevel.WARNING, ) shell_exec( 'find / -type f -mmin -{} ! -path "/proc/*" ! -path "/sys/*" ! -path "/run/*" ! -path "/dev/*" ! -path "/var/lib/*" 2>/dev/null'.format( self.time ),
/home/runner/work/FFM/FFM/commands/enumeration_commands.py#L294
print_output=False, ) if len(test_sudo) == 0: write_str("[+] Sudo Version is likely NOT Vulnerable\r\n", LogLevel.WARNING) elif "not found" in test_sudo: - write_str("[!] Sudo not found, are you in a container?\r\n", LogLevel.WARNING) + write_str( + "[!] Sudo not found, are you in a container?\r\n", LogLevel.WARNING + ) else: write_str( - "[!] Sudo Version might be Vulnerable, examine further\r\n", LogLevel.ERROR + "[!] Sudo Version might be Vulnerable, examine further\r\n", + LogLevel.ERROR, ) class VM(Command): def __init__(self, *args, **kwargs):
/home/runner/work/FFM/FFM/commands/enumeration_commands.py#L473
"ls -R {} 2>/dev/null | grep \":$\" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'".format( self.path ), print_output=True, ) - res = ''.join(random.choices(string.ascii_uppercase + - string.digits, k=5)) + res = "".join(random.choices(string.ascii_uppercase + string.digits, k=5)) if not os.path.isdir("dirwalk"): os.mkdir("dirwalk") - with open("dirwalk/" + res + ".txt", 'w') as fp: + with open("dirwalk/" + res + ".txt", "w") as fp: fp.write(command_output) - write_str("[+] Wrote dirwalk output to dirwalk/{}\r\n".format(res), LogLevel.WARNING) + write_str( + "[+] Wrote dirwalk output to dirwalk/{}\r\n".format(res), LogLevel.WARNING + ) register_plugin(GetOS) register_plugin(Suid) register_plugin(Info)
/home/runner/work/FFM/FFM/misc/silent_argparse.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import argparse class SilentArgumentParser(argparse.ArgumentParser): """ArgumentParser is subclassed to avoid printing the help on invalid command lines."""
/home/runner/work/FFM/FFM/misc/process_utils.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import os from collections import deque def get_children():
/home/runner/work/FFM/FFM/misc/pretty_printing.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import os def print_columns(strings, fd, width=80): """
/home/runner/work/FFM/FFM/model/plugin/command.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from abc import abstractmethod, ABCMeta class Command(metaclass=ABCMeta): @AbstractMethod
/home/runner/work/FFM/FFM/model/plugin/processor.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from abc import abstractmethod, ABCMeta from enum import Enum # -----------------------------------------------------------------------------
/home/runner/work/FFM/FFM/model/driver/input_api.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from enum import Enum import misc.logging from model import context import os import random
/home/runner/work/FFM/FFM/commands/replacement_commands.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import time from commands.command_manager import register_plugin from model.plugin.command import Command from model.driver.input_api import *
/home/runner/work/FFM/FFM/processors/assert_torify.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import os from model import context from model.plugin.processor import Processor, ProcessorType, ProcessorAction from processors.processor_manager import register_processor
/home/runner/work/FFM/FFM/processors/sample_output_processor.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import re from model.plugin.processor import Processor, ProcessorType, ProcessorAction from processors.processor_manager import register_processor
/home/runner/work/FFM/FFM/test/command/test_log_command.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import os from commands.command_manager import parse_commands from model.driver.input_api import write_str from test.fixture.dummy_context import DummyContextTest
/home/runner/work/FFM/FFM/test/fixture/dummy_context.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import configparser import os import unittest # Modules to monkey-patch:
/home/runner/work/FFM/FFM/test/processor/test_rdesktop_options.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import processors.rdesktop_command_line as rdesktop_command_line from processors.rdesktop_command_line import RdesktopOptions from processors.processor_manager import ProcessorAction from test.fixture.dummy_context import DummyContextTest
/home/runner/work/FFM/FFM/test/processor/test_assert_torify.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from processors.processor_manager import ProcessorAction from processors.assert_torify import AssertTorify from test.fixture.dummy_context import DummyContextTest
/home/runner/work/FFM/FFM/test/processor/test_ssh_options.py#L12
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import processors.ssh_command_line as ssh_command_line from processors.ssh_command_line import SSHOptions from processors.processor_manager import ProcessorAction from test.fixture.dummy_context import DummyContextTest
Run linters
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v1, wearerequired/lint-action@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Run linters
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-python@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/