diff --git a/src/jcnetworkenum.py b/src/jcnetworkenum.py new file mode 100644 index 0000000..89f1464 --- /dev/null +++ b/src/jcnetworkenum.py @@ -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 + \ No newline at end of file diff --git a/src/jcprivesc.py b/src/jcprivesc.py new file mode 100644 index 0000000..9bfe4aa --- /dev/null +++ b/src/jcprivesc.py @@ -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") \ No newline at end of file diff --git a/src/jcsystemenum.py b/src/jcsystemenum.py new file mode 100644 index 0000000..7fab99a --- /dev/null +++ b/src/jcsystemenum.py @@ -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") + diff --git a/src/ocLE4P.py b/src/ocLE4P.py index 5b3d411..d790717 100755 --- a/src/ocLE4P.py +++ b/src/ocLE4P.py @@ -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 @@ -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 @@ -59,6 +64,8 @@ ENUM.append(BasicHostInfo()) ENUM.append(BasicNetworkInfo()) ENUM.append(WritableScripts()) + ENUM.append(SystemEnumeration()) + ENUM.append(NetworkEnumeration()) #ENUM.append(YOUR_PLUGIN)