{"id":226,"date":"2018-03-13T09:36:11","date_gmt":"2018-03-13T01:36:11","guid":{"rendered":"http:\/\/www.max-shu.com\/blog\/?p=226"},"modified":"2018-03-13T09:36:11","modified_gmt":"2018-03-13T01:36:11","slug":"jboss%e6%bc%8f%e6%b4%9e%e5%af%bc%e8%87%b4%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%ad%e6%af%92","status":"publish","type":"post","link":"http:\/\/www.max-shu.com\/blog\/?p=226","title":{"rendered":"JBoss\u6f0f\u6d1e\u5bfc\u81f4\u670d\u52a1\u5668\u4e2d\u6bd2"},"content":{"rendered":"<p><b><span style=\"font-size: medium;\">\u4e2d\u6bd2\u73b0\u8c61\uff1a<\/span><\/b><br \/>\n<b>1.\u00a0<\/b>ps axf\u770b\u5230\u591a\u51fa\u4e86\u5f88\u591a\u8fdb\u7a0b\uff0c\u5c24\u5176\u662f\u6709pnscan\u8fd9\u4e2a\u8fdb\u7a0b\uff0c\u5b83\u4f1a\u5bf9\u5916\u626b\u63cf\u6574\u4e2a\u7f51\u7edc\uff0c\u5bfc\u81f4\u7f51\u7edc\u62e5\u585e\uff1a<br \/>\nsh -c .\/pnscan -r JBoss -w &#8220;HEAD \/ HTTP\/1.0\\r\\n\\r\\n&#8221; -t 6400 61.223.0.0\/16 8080 &gt; \/tmp\/sess_008802541<br \/>\n<b>2.\u00a0<\/b>crontab -l\u770b\u5230\u591a\u51fa\u4e86\uff0c\u6709\u4e9b\u4e2d\u6bd2\u7684\u5219\u6ca1\u6709\u8fd9\u4e2a\u73b0\u8c61\uff1a<br \/>\n1 1 10 * * \/root\/.sysdbs<br \/>\n1 1 24 * * \/root\/.sysync.pl<br \/>\n1 1 10 * * \/root\/.sysdbs<br \/>\n1 1 24 * * \/root\/.sysync.pl<br \/>\n<b>3.\u00a0<\/b>${JBOSS_HOME}\/bin\/\u591a\u51fa\u4e86\u597d\u591a\u6587\u4ef6\uff0c\u8fd9\u4e9b\u6587\u4ef6\u7684owner\u4e3a\u672a\u77e5\uff08\u6bd4\u5982\u4e3a1000)\uff1a<br \/>\na.tar.gz<br \/>\nbm.c<br \/>\nbm.h<br \/>\nbm.o<br \/>\nflu.pl<br \/>\nfly.pl<br \/>\ninstall-sh<br \/>\nipsort<br \/>\nkisses\/<br \/>\nkisses.tar.gz<br \/>\nkisses.tar.gz.1<br \/>\nlinda.pl<br \/>\nlindb.pl<br \/>\nMakefile<br \/>\npnscan<br \/>\npnscan.c<br \/>\npnscan.o<br \/>\nversion.c<br \/>\nversion.o<\/p>\n<p><span style=\"font-size: medium;\"><b>\u627e\u5230\u89e3\u51b3\u529e\u6cd5\uff1a<\/b><\/span><br \/>\n<a href=\"http:\/\/aws.amazon.com\/security\/security-bulletins\/jboss-worm-spreading-via-unpatched-or-unsecured-jboss-application-server\/\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/aws.amazon.com\/security\/security-bulletins\/jboss-worm-spreading-via-unpatched-or-unsecured-jboss-application-server\/<\/a><\/p>\n<p><span style=\"font-size: medium;\"><b>\u4fee\u6539\uff1a<\/b><\/span><br \/>\n1. kill \u6389\u591a\u51fa\u6765\u7684\u8fdb\u7a0b\uff0c\u53e6\u5916killall perl\uff0ckill -9 crond\uff0cservice crond restart\u3002<br \/>\n2. \u5220\u9664crontab \u91cc\u9762\u591a\u51fa\u6765\u7684\u6761\u76ee\u3002<br \/>\n3. \u5220\u9664${JBOSS_HOME}\/bin\/ \u4e0b\u9762\u591a\u51fa\u6765\u7684\u6587\u4ef6\u3002<br \/>\n4. \u5220\u9664<span style=\"color: #000000;\">${JBOSS_HOME}\/server\/all(default,minimal)\/deploy\/management\/iesvc.war\u548czecmd.war\u6587\u4ef6\u5939\u3002<\/span><br \/>\n5. \u4fee\u6539jboss\u914d\u7f6e\uff1a<br \/>\n<b>\u4e00\u3001JMX\u5b89\u5168\u8bbe\u7f6e\uff1a<\/b><br \/>\n# vi\u00a0<span style=\"color: #ff0000;\">${JBOSS_HOME}\/server\/all(default,minimal)\/deploy\/jmx-console.war\/WEB-INF\/web.xml<\/span><br \/>\n&lt;!&#8211; A security constraint that restricts access to the HTML JMX console<br \/>\nto users with the role JBossAdmin. Edit the roles to what you want and<br \/>\nuncomment the WEB-INF\/jboss-web.xml\/security-domain element to enable<br \/>\nsecured access to the HTML JMX console.<br \/>\n&#8211;&gt;<br \/>\n&lt;security-constraint&gt;<br \/>\n&lt;web-resource-collection&gt;<br \/>\n&lt;web-resource-name&gt;HtmlAdaptor&lt;\/web-resource-name&gt;<br \/>\n&lt;description&gt;An example security config that only allows users with the<br \/>\nrole JBossAdmin to access the HTML JMX console web application<br \/>\n&lt;\/description&gt;<br \/>\n&lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;<br \/>\n&lt;!&#8211;<br \/>\n&lt;http-method&gt;GET&lt;\/http-method&gt;<br \/>\n&lt;http-method&gt;POST&lt;\/http-method&gt;<br \/>\n&#8211;&gt;<br \/>\n&lt;\/web-resource-collection&gt;<br \/>\n&lt;auth-constraint&gt;<br \/>\n&lt;role-name&gt;JBossAdmin&lt;\/role-name&gt;<br \/>\n&lt;\/auth-constraint&gt;<br \/>\n&lt;\/security-constraint&gt;<br \/>\n\u628aGET\u548cPOST\u4e24\u884c\u6ce8\u91ca\u6389\uff0c\u540c\u65f6security-constraint\u6574\u4e2a\u90e8\u5206\u4e0d\u8981\u6ce8\u91ca\u6389\u3002<\/p>\n<p># vi\u00a0<span style=\"color: #ff0000;\">${JBOSS_HOME}\/server\/all(default,minimal)\/deploy\/jmx-console.war\/WEB-INF\/jboss-web.xml<\/span><br \/>\n&lt;jboss-web&gt;<br \/>\n&lt;!&#8211; Uncomment the security-domain to enable security. You will<br \/>\nneed to edit the htmladaptor login configuration to setup the<br \/>\nlogin modules used to authentication users.<br \/>\n&lt;&#8211;&gt;<br \/>\n&lt;security-domain&gt;java:\/jaas\/jmx-console&lt;\/security-domain&gt;<br \/>\n&lt;\/jboss-web&gt;<br \/>\n\u628asecurity-domain\u6ce8\u91ca\u53bb\u6389\u3002<\/p>\n<p># vi\u00a0<span style=\"color: #ff0000;\">${JBOSS_HOME}\/server\/all(default,minimal)\/conf\/props\/jmx-console-users.properties<\/span><br \/>\n# A sample users.properties file for use with the UsersRolesLoginModule<br \/>\nadmin=xxxxx<br \/>\n\u4fee\u6539admin\u5bc6\u7801<\/p>\n<p><b>\u4e8c\u3001WEB-CONSOLE\u5b89\u5168\u8bbe\u7f6e\uff1a<\/b><br \/>\n# vi\u00a0<span style=\"color: #ff0000;\">${JBOSS_HOME}\/server\/all(default,minimal)\/deploy\/management\/console-mgr.sar\/web-console.war\/WEB-INF\/web.xml<\/span><br \/>\n&lt;!&#8211; A security constraint that restricts access to the HTML JMX console<br \/>\nto users with the role JBossAdmin. Edit the roles to what you want and<br \/>\nuncomment the WEB-INF\/jboss-web.xml\/security-domain element to enable<br \/>\nsecured access to the HTML JMX console.<br \/>\n&#8211;&gt;<br \/>\n&lt;security-constraint&gt;<br \/>\n&lt;web-resource-collection&gt;<br \/>\n&lt;web-resource-name&gt;HtmlAdaptor&lt;\/web-resource-name&gt;<br \/>\n&lt;description&gt;An example security config that only allows users with the<br \/>\nrole JBossAdmin to access the HTML JMX console web application<br \/>\n&lt;\/description&gt;<br \/>\n&lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;<br \/>\n&lt;!&#8211;<br \/>\n&lt;http-method&gt;GET&lt;\/http-method&gt;<br \/>\n&lt;http-method&gt;POST&lt;\/http-method&gt;<br \/>\n&#8211;&gt;<br \/>\n&lt;\/web-resource-collection&gt;<br \/>\n&lt;auth-constraint&gt;<br \/>\n&lt;role-name&gt;JBossAdmin&lt;\/role-name&gt;<br \/>\n&lt;\/auth-constraint&gt;<br \/>\n&lt;\/security-constraint&gt;<br \/>\n\u628aGET\u548cPOST\u4e24\u884c\u6ce8\u91ca\u6389\uff0c\u540c\u65f6security-constraint\u6574\u4e2a\u90e8\u5206\u4e0d\u8981\u6ce8\u91ca\u6389\u3002<\/p>\n<p># vi\u00a0<span style=\"color: #ff0000;\">${JBOSS_HOME}\/server\/all(default,minimal)\/deploy\/management\/console-mgr.sar\/web-console.war\/WEB-INF\/jboss-web.xml<\/span><br \/>\n&lt;!&#8211; Uncomment the security-domain to enable security. You will<br \/>\nneed to edit the htmladaptor login configuration to setup the<br \/>\nlogin modules used to authentication users.<br \/>\n&#8211;&gt;<br \/>\n&lt;security-domain&gt;java:\/jaas\/web-console&lt;\/security-domain&gt;<br \/>\n\u628asecurity-domain\u6ce8\u91ca\u53bb\u6389\u3002<\/p>\n<p># vi\u00a0<span style=\"color: #ff0000;\">${JBOSS_HOME}\/server\/all(default,minimal)\/deploy\/management\/console-mgr.sar\/web-console.war\/WEB-INF\/classes\/web-console-users.properties<\/span><br \/>\n# A sample users.properties file for use with the UsersRolesLoginModule<br \/>\nadmin=xxxxx<br \/>\n\u4fee\u6539admin\u5bc6\u7801<\/p>\n<p>\u6700\u540e\u542f\u52a8jboss\u751f\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e2d\u6bd2\u73b0\u8c61\uff1a 1.\u00a0ps axf\u770b\u5230\u591a\u51fa\u4e86\u5f88\u591a\u8fdb\u7a0b\uff0c\u5c24\u5176\u662f\u6709pnscan\u8fd9\u4e2a\u8fdb\u7a0b\uff0c\u5b83\u4f1a\u5bf9\u5916\u626b\u63cf\u6574\u4e2a\u7f51\u7edc\uff0c\u5bfc\u81f4\u7f51\u7edc &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[140,142,141],"class_list":["post-226","post","type-post","status-publish","format-standard","hentry","category-13","tag-jboss","tag-142","tag-141"],"views":1639,"_links":{"self":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=226"}],"version-history":[{"count":1,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":227,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions\/227"}],"wp:attachment":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}