Skip to content

Adding plugins to main repo #4

Merged
merged 3 commits into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/jcnetworkenum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!python3
import pty
import os #used to automate linux commands within python files
from plugins import Enumeration #using generic class from plugins file
class NetworkEnumeration(Enumeration): #using generic enumeration class for specific enumeration class
def __init__(self): #constructor to initialise class
Enumeration.__init__(self)
self.name="Network Enumeration" #overriding generic info from enumeration class and replacing with meaningful info
self.author="Joe Conteh"
self.description="Provides the user with the network configuration display information and cpu architecture"
self.version="0.1 alpha"


def execute(self): # when called on, displays info contained in function
cpu=os.system("lscpu") #provides cpu architecture
network=os.system("ifconfig") #provides network configuration

14 changes: 14 additions & 0 deletions src/jcprivesc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!python3
import pty
import os
from plugins import PrivEsc
class PrivilegeEsc(PrivEsc):
def __init__(self):
PrivEsc.__init__(self)
self.name="Privilege Escalation"
self.author="Joe Conteh"
self.description="Increases the privileges of the user, allows user to see contents of shadow file"
self.version="0.1 alpha"

def execute(self):
os.system("cat /etc/shadow")
16 changes: 16 additions & 0 deletions src/jcsystemenum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!python3
import pty
import os
from plugins import Enumeration
class SystemEnumeration(Enumeration):
def __init__(self):
Enumeration.__init__(self)
self.name="System Enumeration"
self.author="Joe Conteh"
self.description="Provides the user with the system information and hostname"
self.version="0.1 alpha"

def execute(self):
os.system("uname -a")
os.system("hostname")

7 changes: 7 additions & 0 deletions src/ocLE4P.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
from ja_plugins import BasicHostInfo
from ja_plugins import BasicNetworkInfo
from ja_plugins import SudoRights
from jcprivesc import PrivilegeEsc
from jcsystemenum import SystemEnumeration
from jcnetworkenum import NetworkEnumeration

#from YOUR_PLUGINFILE import YOUR_PLUGINS


Expand Down Expand Up @@ -48,6 +52,7 @@
ESCAL.append(grepSHADOW())
ESCAL.append(Shadow())
ESCAL.append(SudoRights())
ESCAL.append(PrivilegeEsc())
#ESCAL.append(YOUR_PLUGIN)

#Make a list of available enumerations
Expand All @@ -59,6 +64,8 @@
ENUM.append(BasicHostInfo())
ENUM.append(BasicNetworkInfo())
ENUM.append(WritableScripts())
ENUM.append(SystemEnumeration())
ENUM.append(NetworkEnumeration())
#ENUM.append(YOUR_PLUGIN)


Expand Down