356 lines
18 KiB
Plaintext
356 lines
18 KiB
Plaintext
*** Settings ***
|
|
Force Tags tsg-ui objects tags
|
|
Resource ../../../02-Keyword/tsg_ui/securityPolicy/SecurityPolicy.robot
|
|
Library OperatingSystem
|
|
Resource ../../../02-Keyword/tsg_ui/Menu.robot
|
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot
|
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot
|
|
Resource ../../../03-Variable/bifangapivariable.txt
|
|
|
|
|
|
*** Test Cases ***
|
|
SecurityPolicy-Deny-HTTP-MaxCombination-Drop
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建对象url
|
|
Comment 新建对象url
|
|
CreatePage URL single zdhurl keywordtext=*.com
|
|
#新建Request Header
|
|
Comment Request Header
|
|
#新建cookie
|
|
CreatePage HTTPSignature single zdhreqck reqrestype=req reqresheader=ck keywordtext=1234@#%
|
|
#新建ua
|
|
CreatePage HTTPSignature single zdhrequa reqrestype=req reqresheader=ua keywordtext=*скрипцияк
|
|
#新建Response Header
|
|
Comment Response Header
|
|
#新建set cookie
|
|
CreatePage HTTPSignature single zdhressck reqrestype=res reqresheader=sck keywordtext=1234@#%
|
|
#新建ct
|
|
CreatePage HTTPSignature single zdhresct reqrestype=res reqresheader=ct keywordtext=text*
|
|
#新建Request Content
|
|
Comment Request Content
|
|
#新建Request Content
|
|
CreatePage Key single zdhreqcontent keywordtext=*pppp
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
SecurityPolicy.Create-Destination-Button
|
|
SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${urlname} create list zdhurl
|
|
${RequestHeadername} create list zdhreqck zdhrequa
|
|
${ResponseHeadername} create list zdhressck zdhresct
|
|
${RequestContentname} create list zdhreqcontent
|
|
${filter} create list Host URL Request Header Response Header Request Content
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname} URLname=${urlname} Request Headername=${RequestHeadername}
|
|
... Response Headername=${ResponseHeadername} Request Contentname=${RequestContentname}
|
|
Deny-subaction action=deny subaction=Drop
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-MaxCombination-RST
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建对象url
|
|
Comment 新建对象url
|
|
CreatePage URL single zdhurl keywordtext=*.com
|
|
#新建Request Header
|
|
Comment Request Header
|
|
#新建cookie
|
|
CreatePage HTTPSignature single zdhreqck reqrestype=req reqresheader=ck keywordtext=1234@#%
|
|
#新建ua
|
|
CreatePage HTTPSignature single zdhrequa reqrestype=req reqresheader=ua keywordtext=*скрипцияк
|
|
#新建Response Header
|
|
Comment Response Header
|
|
#新建set cookie
|
|
CreatePage HTTPSignature single zdhressck reqrestype=res reqresheader=sck keywordtext=1234@#%
|
|
#新建ct
|
|
CreatePage HTTPSignature single zdhresct reqrestype=res reqresheader=ct keywordtext=text*
|
|
#新建Request Content
|
|
Comment Request Content
|
|
#新建Request Content
|
|
CreatePage Key single zdhreqcontent keywordtext=*pppp
|
|
#Response Content
|
|
Comment Response Content
|
|
#新建Response Content
|
|
CreatePage Key single zdhrescontent keywordtext=*pppp
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${urlname} create list zdhurl
|
|
${RequestHeadername} create list zdhreqck zdhrequa
|
|
${ResponseHeadername} create list zdhressck zdhresct
|
|
${RequestContentname} create list zdhreqcontent
|
|
${ResponseContentname} create list zdhrescontent
|
|
${filter} create list Host URL Request Header Response Header Request Content
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname} URLname=${urlname} Request Headername=${RequestHeadername}
|
|
... Response Headername=${ResponseHeadername} Request Contentname=${RequestContentname} Response Contentname=${ResponseContentname}
|
|
Deny-subaction action=deny subaction=RST
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Block403TEXT
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Block code=403 Content=TEXT block-text=123456
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Block403ProfileCreate
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Block code=403 Content=Profile SearchorCreate=Create ProfileName=zdhprofilehtml file=${path}response_pages_files\\Create-ResponsePages-test.html
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Block403ProfileSearch
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Block code=403 Content=Profile SearchorCreate=Search ProfileName=zdhprofilehtml
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Block404TEXT
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Block code=404 Content=TEXT block-text=123456
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Block404ProfileCreate
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Block code=404 Content=Profile SearchorCreate=Create ProfileName=zdhprofilehtml file=${path}response_pages_files\\Create-ResponsePages-test.html
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Block404ProfileSearch
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Block code=404 Content=Profile SearchorCreate=Search ProfileName=zdhprofilehtml
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Alert200TEXT
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Alert code=200 Content=TEXT block-text=123456
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Alert200ProfileCreate
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Alert code=200 Content=Profile SearchorCreate=Create ProfileName=zdhprofilehtml file=${path}response_pages_files\\Create-ResponsePages-test.html
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Alert200ProfileSearch
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Alert code=200 Content=Profile SearchorCreate=Search ProfileName=zdhprofilehtml
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
SecurityPolicy-Deny-HTTP-Host-Alert204
|
|
#新建对象fqdn
|
|
Comment 新建对象fqdn
|
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
|
#新建策略
|
|
Comment 新建策略
|
|
Menu policys Security Policy
|
|
SecurityPolicy.CreateButton
|
|
SecurityPolicy.Create-name SecurityPolicy-Deny-HTTP-MaxCombination
|
|
SecurityPolicy.Create-action deny
|
|
SecurityPolicy.Create-Source-Button
|
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
#SecurityPolicy.Create-Destination-Button
|
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
|
${hostname} create list zdhfqdn
|
|
${filter} create list Host
|
|
Create-Application-Button
|
|
ApplicationSearch HTTP
|
|
Create-Filter-judge Application=HTTP Filter=${filter} Hostname=${hostname}
|
|
Deny-subaction action=deny subaction=Alert code=204
|
|
LogSession 1
|
|
Enabled open
|
|
Security-Policies-OK
|
|
|
|
|
|
|
|
|
|
|