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

Add accept risk rule #66

Open
potatoqualitee opened this issue Jan 24, 2021 · 0 comments
Open

Add accept risk rule #66

potatoqualitee opened this issue Jan 24, 2021 · 0 comments

Comments

@potatoqualitee
Copy link
Owner

potatoqualitee commented Jan 24, 2021

https://docs.tenable.com/tenablesc/api/Accept-Risk-Rule.htm

Invoke-WebRequest -Uri "https://securitycenter/rest/repository?fields=name%2Cdescription%2Ctype%2CdataFormat%2CmodifiedTime%2CvulnCount%2CipCount%2CtypeFields" -Headers @{
    "sec-ch-ua"        = "`"Google Chrome`";v=`"89`", `"Chromium`";v=`"89`", `";Not A Brand`";v=`"99`""
    "Accept"           = "application/json, text/javascript, */*; q=0.01"
    "X-Requested-With" = "XMLHttpRequest"
    "X-SecurityCenter" = "2006057900"
    "sec-ch-ua-mobile" = "?0"
    "User-Agent"       = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
    "Sec-Fetch-Site"   = "same-origin"
    "Sec-Fetch-Mode"   = "cors"
    "Sec-Fetch-Dest"   = "empty"
    "Referer"          = "https://securitycenter/"
    "Accept-Encoding"  = "gzip, deflate, br"
    "Accept-Language"  = "en-US,en;q=0.9"
    "Cookie"           = "TNS_SESSIONID=29f9eefcc0bddf61b07b9f6a92779ac0"
};
Invoke-WebRequest -Uri "https://securitycenter/rest/status" -Headers @{
    "sec-ch-ua"        = "`"Google Chrome`";v=`"89`", `"Chromium`";v=`"89`", `";Not A Brand`";v=`"99`""
    "Accept"           = "application/json, text/javascript, */*; q=0.01"
    "X-Requested-With" = "XMLHttpRequest"
    "X-SecurityCenter" = "2006057900"
    "sec-ch-ua-mobile" = "?0"
    "User-Agent"       = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
    "Sec-Fetch-Site"   = "same-origin"
    "Sec-Fetch-Mode"   = "cors"
    "Sec-Fetch-Dest"   = "empty"
    "Referer"          = "https://securitycenter/"
    "Accept-Encoding"  = "gzip, deflate, br"
    "Accept-Language"  = "en-US,en;q=0.9"
    "Cookie"           = "TNS_SESSIONID=29f9eefcc0bddf61b07b9f6a92779ac0"
};
Invoke-WebRequest -Uri "https://securitycenter/rest/acceptRiskRule" `
    -Method "POST" `
    -Headers @{
    "sec-ch-ua"        = "`"Google Chrome`";v=`"89`", `"Chromium`";v=`"89`", `";Not A Brand`";v=`"99`""
    "Accept"           = "application/json, text/javascript, */*; q=0.01"
    "X-Requested-With" = "XMLHttpRequest"
    "X-SecurityCenter" = "2006057900"
    "sec-ch-ua-mobile" = "?0"
    "User-Agent"       = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
    "Origin"           = "https://securitycenter"
    "Sec-Fetch-Site"   = "same-origin"
    "Sec-Fetch-Mode"   = "cors"
    "Sec-Fetch-Dest"   = "empty"
    "Referer"          = "https://securitycenter/"
    "Accept-Encoding"  = "gzip, deflate, br"
    "Accept-Language"  = "en-US,en;q=0.9"
    "Cookie"           = "TNS_SESSIONID=29f9eefcc0bddf61b07b9f6a92779ac0"
} `
    -ContentType "application/json" `
    -Body "{`"name`":`"Host Fully Qualified Domain Name (FQDN) Resolution`",`"hostType`":`"ip`",`"hostValue`":`"192.168.1.160`",`"plugin`":{`"id`":`"12053`"},`"protocol`":6,`"port`":`"0`",`"newSeverity`":{`"id`":0},`"comments`":`"`",`"repositories`":[{`"id`":2,`"name`":`"Audits`",`"description`":`"`",`"context`":`"`",`"status`":null,`"createdTime`":null,`"modifiedTime`":1615199723,`"dataFormat`":`"IPv4`",`"type`":`"Local`",`"trendingDays`":`"30`",`"trendWithRaw`":`"true`",`"ipRange`":`"192.168.0
.0-192.168.2.255`",`"organizations`":[],`"correlation`":[]},{`"id`":1,`"name`":`"Vulnerabilities`",`"description`":`"`",`"context`":`"`",`"status`":null,`"createdTime`":null,`"modifiedTime`":1615199722,`"dataFormat`":`"IPv4`",`"type`":`"Local`",`"trendingDays`":`"30`",`"trendWithRaw`":`"true`",`"ipRange`":`"192.168.0
.0-192.168.2.255`",`"organizations`":[],`"correlation`":[]}],`"expires`":-1}";


Invoke-WebRequest -Uri "https://securitycenter/rest/status" -Headers @{
    "sec-ch-ua"        = "`"Google Chrome`";v=`"89`", `"Chromium`";v=`"89`", `";Not A Brand`";v=`"99`""
    "Accept"           = "application/json, text/javascript, */*; q=0.01"
    "X-Requested-With" = "XMLHttpRequest"
    "X-SecurityCenter" = "2006057900"
    "sec-ch-ua-mobile" = "?0"
    "User-Agent"       = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
    "Sec-Fetch-Site"   = "same-origin"
    "Sec-Fetch-Mode"   = "cors"
    "Sec-Fetch-Dest"   = "empty"
    "Referer"          = "https://securitycenter/"
    "Accept-Encoding"  = "gzip, deflate, br"
    "Accept-Language"  = "en-US,en;q=0.9"
    "Cookie"           = "TNS_SESSIONID=29f9eefcc0bddf61b07b9f6a92779ac0"
}
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