8000 REQUEST-944-APPLICATION-ATTACK-JAVA.conf · Issue #990 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

REQUEST-944-APPLICATION-ATTACK-JAVA.conf #990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CRS-migration-bot opened this issue May 13, 2020 · 20 comments
Closed

REQUEST-944-APPLICATION-ATTACK-JAVA.conf #990

CRS-migration-bot opened this issue May 13, 2020 · 20 comments

Comments

@CRS-migration-bot
Copy link

Issue for tracking original pull request created by user spartantri on date 2017-12-28 22:09:36.
Link to original PR: SpiderLabs/owasp-modsecurity-crs#990.

HEAD is: e8cc868
BASE is: ce36ede
Java attacks updated config

@CRS-migration-bot
Copy link
Author

User fzipi commented on date 2018-01-01 16:58:54:

Shouldn't this be 2018 now?

@CRS-migration-bot
Copy link
Author

User fzipi commented on date 2018-01-01 17:00:18:

Is this normal indentation?

@CRS-migration-bot
Copy link
Author

User fzipi commented on date 2018-01-01 17:01:03:

This 'SecRule' should be aligned with the previous 'chain'

@CRS-migration-bot
Copy link
Author

User fzipi commented on date 2018-01-01 17:01:58:

This 'SecRule' should be aligned with the previous 'chain'

@CRS-migration-bot
Copy link
Author

User fzipi commented on date 2018-01-01 17:02:10:

Same here.

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-01-02 15:44:09:

Fixed all those, sorry about that, it is my personal identation style to distinguish short chains, anyway, removed all those extra 4 spaces to allign to contributing.md

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-01-02 15:44:33:

I don't know but changed anyway

@CRS-migration-bot
Copy link
Author

User lifeforms commented on date 2018-02-04 19:10:15:

Why do we have SecRequestBodyAccess On here? It's in mod_security2.conf, I would remove it here. Users should generally have this enabled (or the CRS will run ineffectively anyway), but if they should disable it (maybe for debugging purposes, etc.) I feel we should honor that.

@CRS-migration-bot
Copy link
Author

User lifeforms commented on date 2018-02-04 19:14:28:

  1. As a small nitpick for the msg, these are all Suspicious Java class instead of method.

  2. There are many other strings I found in some exploit payloads. I had suggested some in the last PR. Could we change this rule to a @pmf with a java-classes.data file?

  3. For completeness, my blacklist is as follows, but if you feel it's not necessary to use them all, I would still recommend using a data file, and then we can improve it later easily with another PR:

com.opensymphony.xwork2.
com.sun.org.apache.​
java.io.BufferedInputStream
java.io.BufferedReader
java.io.ByteArrayInputStream
java.io.ByteArrayOutputStream
java.io.CharArrayReader
java.io.DataInputStream
java.io.File
java.io.FileOutputStream
java.io.FilterInputStream
java.io.FilterOutputStream
java.io.FilterReader
java.io.InputStream
java.io.InputStreamReader
java.io.LineNumberReader
java.io.ObjectOutputStream
java.io.OutputStream
java.io.PipedOutputStream
java.io.PipedReader
java.io.PrintStream
java.io.PushbackInputStream
java.io.Reader
java.io.StringReader
java.lang.Class
java.lang.Integer
java.lang.Number
java.lang.Object
java.lang.Process
java.lang.ProcessBuilder
java.lang.reflect.
java.lang.Runtime
java.lang.String
java.lang.StringBuilder
java.lang.System
javax.script.ScriptEngineManager
org.apache.commons.
org.omg.CORBA.

@CRS-migration-bot
Copy link
Author

User lifeforms commented on date 2018-02-04 19:18:20:

I notice this rule is in Paranoia Level 3, which feels a bit high for me, since the rule is pretty nice and I think the byte sequence should be rare... Have you found false positives on this rule? I would advocate Paranoia Level 1 or if you found FPs Paranoia Level 2

@CRS-migration-bot
Copy link
Author

User lifeforms commented on date 2018-02-04 19:20:18:

This rule seems pretty specific and not prone to FP, what about moving it to a lower Paranoia Level like 2?

@CRS-migration-bot
Copy link
Author

User lifeforms commented on date 2018-02-04 19:21:31:

Is this rule duplicate?

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-02-05 10:10:23:

You are right, I wrote these with an empty ruleset first so put this here to make sure it worked, I will remove this, and add a comment about it

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-02-05 18:26:29:

I'm not sure how common this may be for legitimate purposes so let's start with 3 and lower it once we have some feedback.

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-02-05 18:27:57:

fixed, missed that one

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-02-05 18:37:14:

no there is no chain in this one is intended to complain on most common keywords to spawn a process

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-02-05 18:38:08:

changed the message to class lets add this into a new rule, maybe a new PR if required

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-02-05 18:48:50:

Added to 944230 and class list into java-classes.data

@CRS-migration-bot
Copy link
Author

User lifeforms commented on date 2018-02-05 20:46:19:

We leave this in for now and create a separate issue on how to handle this generally in setup/initialization file.

@CRS-migration-bot
Copy link
Author

User spartantri commented on date 2018-02-06 18:11:36:

lifeforms There are no false negative on my tests but some of the rules were on pass instead of block for testing, changed all back to block, please test again

http://localhost/?redirect:$%7B%23matt%3d%20%23context.get('com.opensymphony.xwork2.dispatcher.HttpServletResponse'),%23matt.setContentType('text/plain'),%23matt.getWriter().println%20('successsuccess'),%23matt.getWriter().flush(),%23matt.getWriter().close()%7D

[Tue Feb 06 19:04:15.778459 2018] [:error] [pid 13977] [client 127.0.0.1] ModSecurity: Warning. Matched phrase "com.opensymphony.xwork2" at ARGS_NAMES:redirect:${#matt= #context.get('com.opensymphony.xwork2.dispatcher.HttpServletResponse'),#matt.setContentType('text/plain'),#matt.getWriter().println ('successsuccess'),#matt.getWriter().flush(),#matt.getWriter().close()}. [file "/home/spartan/owasp-modsecurity-crs/rules/REQUEST-944-APPLICATION-ATTACK-JAVA.conf"] [line "160"] [id "944230"] [rev "1"] [msg "Suspicious Java class detected"] [data "Matched Data: redirect:${#matt= #context.get('com.opensymphony.xwork2.dispatcher.httpservletresponse'),#matt.setcontenttype('text/plain'),#matt.getwriter().println ('successsuccess'),#matt.getwriter().flush(),#matt.getwriter().close()} found within ARGS_NAMES:redirect:${#matt= #context.get('com.opensymphony.xwork2.dispatcher.HttpServletResponse'),#matt.setContentType('text/plain'),#matt.getWriter().println ('successsuccess'),#matt.getWriter().flush(),#matt.getWriter().close()}"] [severity "NOTICE"] [ver "OWASP_CRS/3.1.0"] [tag "application-multi"] [tag "l [hostname "localhost"] [uri "/"] [unique_id "WnnuH38AAQEAADaZIF4AAAAK"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0