first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
FROM openjdk:7-jre
LABEL maintainer="phithon <root@leavesongs.com>"
# Download jboss from http://jbossas.jboss.org/downloads/
RUN set -ex \
&& curl -L -o jboss.zip http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.zip \
&& unzip -q jboss.zip \
&& rm -rf jboss.zip
COPY jmx-console.web.xml /jboss-6.1.0.Final/common/deploy/jmx-console.war/WEB-INF/web.xml
COPY jmx-console.jboss-web.xml /jboss-6.1.0.Final/common/deploy/jmx-console.war/WEB-INF/jboss-web.xml
COPY web-console.web.xml /jboss-6.1.0.Final/common/deploy/jbossws-console.war/WEB-INF/web.xml
COPY web-console.jboss-web.xml /jboss-6.1.0.Final/common/deploy/jbossws-console.war/WEB-INF/jboss-web.xml
COPY run.sh /run.sh
COPY set_jboss_admin_pass.sh /set_jboss_admin_pass.sh
RUN chmod +x /*.sh
EXPOSE 8080
CMD ["/run.sh"]

View File

@@ -0,0 +1,7 @@
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
<security-domain>java:/jaas/jmx-console</security-domain>
</jboss-web>

View File

@@ -0,0 +1,117 @@
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<description>The standard web descriptor for the html adaptor</description>
<!--
<filter>
<filter-name>JmxOpsAccessControlFilter</filter-name>
<filter-class>org.jboss.jmx.adaptor.html.JMXOpsAccessControlFilter</filter-class>
<init-param>
<description>Comma-delimited Roles that define the JMX Operation denoting updation of Attributes</description>
<param-name>updateAttributes</param-name>
<param-value>UpdateAttributeRole</param-value>
</init-param>
<init-param>
<description>Comma-delimited Roles that define the JMX Operation denoting Invocation of Operations</description>
<param-name>invokeOp</param-name>
<param-value>InvokeOpRole</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>JmxOpsAccessControlFilter</filter-name>
<servlet-name>HtmlAdaptor</servlet-name>
</filter-mapping>
-->
<servlet>
<servlet-name>HtmlAdaptor</servlet-name>
<servlet-class>org.jboss.jmx.adaptor.html.HtmlAdaptorServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ClusteredConsoleServlet</servlet-name>
<servlet-class>org.jboss.jmx.adaptor.html.ClusteredConsoleServlet</servlet-class>
<init-param>
<param-name>jgProps</param-name>
<param-value>UDP(ip_mcast=true;ip_ttl=16;loopback=false;mcast_addr=${jboss.partition.udpGroup:228.1.2.3};mcast_port=${jboss.jmxconsolepartition.mcast_port:46666}):
org.jboss.jmx.adaptor.control.FindView
</param-value>
<description>The JGroups protocol stack config</description>
</init-param>
</servlet>
<servlet>
<servlet-name>DisplayMBeans</servlet-name>
<jsp-file>/displayMBeans.jsp</jsp-file>
</servlet>
<servlet>
<servlet-name>InspectMBean</servlet-name>
<jsp-file>/inspectMBean.jsp</jsp-file>
</servlet>
<servlet>
<servlet-name>DisplayOpResult</servlet-name>
<jsp-file>/displayOpResult.jsp</jsp-file>
</servlet>
<servlet>
<servlet-name>ClusterView</servlet-name>
<jsp-file>/cluster/clusterView.jsp</jsp-file>
</servlet>
<servlet>
<servlet-name>ProfileServiceDebugServlet</servlet-name>
<servlet-class>org.jboss.profileservice.web.DebugServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HtmlAdaptor</servlet-name>
<url-pattern>/HtmlAdaptor</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ClusteredConsoleServlet</servlet-name>
<url-pattern>/cluster/ClusteredConsole</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DisplayMBeans</servlet-name>
<url-pattern>/DisplayMBeans</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>InspectMBean</servlet-name>
<url-pattern>/InspectMBean</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DisplayOpResult</servlet-name>
<url-pattern>/DisplayOpResult</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ProfileServiceDebugServlet</servlet-name>
<url-pattern>/ProfileServiceDebugServlet</url-pattern>
</servlet-mapping>
<!-- Display a generic error page when HTTP Status 500 exceptions
occur. -->
<error-page>
<error-code>500</error-code>
<location>/genericError.jsp</location>
</error-page>
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<description>An example security config that only allows users with the
role JBossAdmin to access the HTML JMX console web application
</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>JBoss JMX Console</realm-name>
</login-config>
<security-role>
<role-name>JBossAdmin</role-name>
</security-role>
</web-app>

View File

@@ -0,0 +1,7 @@
#!/bin/bash
if [ ! -f /.jboss_admin_pass_configured ]; then
/set_jboss_admin_pass.sh
fi
exec /jboss-6.1.0.Final/bin/run.sh --host=0.0.0.0

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
if [ -f /.jboss_admin_pass_configured ]; then
echo "JBoss admin user's password has been configured!"
exit 0
fi
#generate password
PASS=${JBOSS_PASS:-"vulhub"}
_word=$( [ ${JBOSS_PASS} ] && echo "preset" || echo "default" )
echo "=> Configuring admin user with a ${_word} password in JBoss"
echo "admin:${PASS}" > /jboss-6.1.0.Final/server/default/conf/props/jmx-console-users.properties
echo "admin:${PASS}" > /jboss-6.1.0.Final/server/default/conf/props/jbossws-users.properties
echo "=> Done!"
echo "========================================================================"
echo "You can now configure to this JBoss server using:"
echo ""
echo " admin:${PASS}"
echo ""
echo "========================================================================"
touch /.jboss_admin_pass_configured

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE jboss-web
PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
<jboss-web>
<security-domain>java:/jaas/jmx-console</security-domain>
<context-root>jbossws</context-root>
</jboss-web>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>JBossWS</display-name>
<servlet>
<servlet-name>ContextServlet</servlet-name>
<servlet-class>org.jboss.wsf.framework.management.ContextServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>PortComponentLinkServlet</servlet-name>
<servlet-class>org.jboss.ws.core.server.PortComponentLinkServlet</servlet-class>
</servlet>
<!-- now the mappings -->
<servlet-mapping>
<servlet-name>ContextServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PortComponentLinkServlet</servlet-name>
<url-pattern>/pclink</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>ContextServlet</web-resource-name>
<description>An example security config that only allows users with the
role 'friend' to access the JBossWS console web application
</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>JBossWS Management Console</realm-name>
</login-config>
<security-role>
<role-name>friend</role-name>
</security-role>
<!--
currently the W3C haven't settled on a media type for WSDL;
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
for now we go with the basic 'it's XML' response
-->
<mime-mapping>
<extension>wsdl</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xsd</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
</web-app>