Skip to content
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

Wrong paths when querying Windows agent configuration #236

Open
Cerv1 opened this issue Nov 7, 2018 · 1 comment
Open

Wrong paths when querying Windows agent configuration #236

Cerv1 opened this issue Nov 7, 2018 · 1 comment
Labels

Comments

@Cerv1
Copy link

Cerv1 commented Nov 7, 2018

Hi team,

I've seen that the character \ is scaped on every path when querying Windows agent configuration.

# curl -u foo/bar -k "https://localhost:55000/agents/034/config/wmodules/wmodules?pretty"
{
   "error": 0,
   "data": {
      "wmodules": [
         {
            "syscollector": {
               "hardware": "yes",
               "processes": "yes",
               "network": "yes",
               "interval": 3600,
               "disabled": "yes",
               "scan-on-start": "yes",
               "packages": "yes",
               "os": "yes",
               "ports": "yes",
               "ports_all": "no"
            }
         },
         {
            "cis-cat": {
               "interval": 86400,
               "disabled": "yes",
               "scan-on-start": "yes",
               "ciscat_path": "C:\\cis-cat",
               "java_path": "\\\\server\\jre\\bin\\java.exe",
               "timeout": 1800
            }
         },
         {
            "osquery": {
               "config_path": "C:\\ProgramData\\osquery\\osquery.conf",
               "log_path": "C:\\ProgramData\\osquery\\log\\osqueryd.results.log",
               "disabled": "yes",
               "bin_path": "C:\\ProgramData\\osquery\\osqueryd",
               "run_daemon": "yes",
               "add_labels": "yes"
            }
         }
      ]
   }
}

Best regards,
Cerv1.

@Cerv1 Cerv1 added the bug label Nov 7, 2018
@Cerv1 Cerv1 added this to To do in v3.7.0 via automation Nov 7, 2018
@jesuslinares jesuslinares removed this from To do in v3.7.0 Jan 3, 2019
@mgmacias95
Copy link
Contributor

Hello @Cerv1,

Those escape characters are added by Python's XML Etree library. Here's a screenshot debugging our XML reader with Pycharm:
imagen
As you can see, those characters are already added when we're reading the XML. We should add something like this:

option_value.replace('\\','\')

Best regards,
Marta

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

No branches or pull requests

2 participants