quinta-feira, 31 de março de 2011

Atualização de Security Advisories

Consideramos Security Advisories uma importante ferramenta de contribuição para a comunidade, onde de uma forma responsável, sempre que identificamos falhas em aplicações entramos em contato com o desenvolvedor para buscar uma solução que corrija o ponto em questão e permita o uso de forma segura.

Até ontem tínhamos sete documentos publicados de forma distribuída em mais de um repositório, porém para assegurar que o acesso seja feito de forma mais adequada, estamos agora concentrando todo o material somente em nosso blog e mantendo o histórico na página de Recursos em nosso web site, o que leva a duas considerações:

Atualização do Formato


Dois de nossos Security Advisories não estavam com o formato txt disponível em nosso web site, e foram hoje atualizados, a saber:

Acompanhamento das Publicações


Foram adicionados dois recursos para facilitar a busca e acompanhamento deste tipo de publicação.

Com isso, estamos concentrando todos os Security Advisories publicados pelo Conviso Labs em nosso blog e mantendo o histórico em um repositório único.

Security Advisory | CVE-2010-3977 | cform Wordpress Plugin V 11.5

Introduction


1. Copyright and Disclaimer


The information in this advisory is Copyright 2010 Conviso and provided so that the society can understand the risk they may be facing by running affected software, hardware or other components used on their systems. In case you wish to copy information from this advisory, you must either copy all of it or refer to this document (including our URL). No guarantee is provided for the accuracy of this information, or damage you may cause your systems in testing.

2. About Conviso


Founded on 2008 by a team of professionals working the IT Security market since 1997, Conviso is a consulting company specialized on network and application security services. Our values are based on the allocation of the adequate competencies on the field, a clear and direct speech with the market, collaboration and partnership with our customers and business partners and constant investments on methodology and research improvement.

This advisory has been discovered as part of a general investigation into the security of software used in the IT environments of our customers. For more information about our company and services provided, please check our website at www.conviso.com.br.

3. The Security Research


Conviso maintains a virtual team dedicated to explore our customer’s environments in order to identify technical vulnerabilities in software and hardware, developing real-world mitigation solutions and processes to maintain more secure environments. Leaded by Wagner Elias, our CTO, this team is named Conviso Labs and also contribute to important world-class organizations projects and organizations.

The vulnerability described in this security advisory was discovered by Wagner Elias on July 24th 2010 during a penetration test project.

Security Advisory


1. Issue Description


Created and distributed by Delicious Days (http://www.deliciousdays.com/), cforms is a rich form plugin for WordPress, offering deployment of multiple Ajax driven contact forms throughout user’s blog or even on the same page. An issue on version 11.5 allows the exploit of a Cross Site Scripting (XSS) vulnerability and the consequent capability of client-side attacks for data leaking and malware propagation.

2. Affected Components


File lib_ajax.php on version 11.5.

3. Details


The file lib_ajax.php on version 11.5 creates a data array with all values inserted on the form’s fields on a POST requisition. As there is no data validation of the rs and rsargs parameters, it is possible to inject malformed data by Javascript.

Request:

http://www.siteexample.com/wp-content/plugins/cforms/lib_ajax.php

POST /wp-content/plugins/cforms/lib_ajax.php HTTP/1.1

Host: www.siteexample.com

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Content-Length: 219

Cookie: wp-settings-1=m0%3Do%26m1%3Do%26m2%3Do%26m3%3Do%26m4%3Do%26m5%3Do%26m6%3

Do%26m7%3Do%26m8%3Do%26urlbutton%3Dnone%26editor%3Dtinymce%26imgsize%3

Dfull%26align%3Dcenter%26hidetb%3D1%26m9%3Dc%26m10%3Do%26uploader%3D1%26m11%3Do;

wp-settings-time-1=1285758765; comment_author_93f41ba0b16f34676f802058e82388f6=teste; comment_author_email_93f41ba0b16f34676f802058e82388f6=welias%40conviso.com.br

Pragma: no-cache

Cache-Control: no-cache

rs=<script>alert(1)</script>&rst=&rsrnd=1287506634854&rsargs[]=1$#$<script>alert(1)</script>

$#$welias@conviso.com.br$#$http://blog.conviso.com.br$#$<script>alert(1)</script>

4. Issue Mitigation


Update to version 11.6.1.

5. Additional Information


The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2010-3977 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems.

6. CVSS Issue Severity Scores


Conviso calculated the scores of this vulnerability using the online CVSS calculator found at http://www.patchadvisor.com/PatchAdvisor/CVSSCalculator.aspx and described at http://www.first.org/cvss/cvss-guide.pdf.

  • Base Metrics | Value: 5,7

  • Temporal Metrics | Value: 4,5

  • Environmental Metrics | Value: 0


 

Security Advisory CVE 2010-1582 24/7 Real Media’s Open AdStream v.5.7

Introduction


1. Copyright and Disclaimer


The information in this advisory is Copyright 2010 Conviso and provided so that the society can understand the risk they may be facing by running affected software, hardware or other components used on their systems. In case you wish to copy information from this advisory, you must either copy all of it or refer to this document (including our URL). No guarantee is provided for the accuracy of this information, or damage you may cause your systems in testing.

2. About Conviso


Founded on 2008 by a team of professionals working the IT Security market since 1997, Conviso is a consulting company specialized on network and application security services. Our values are based on the allocation of the adequate competencies on the field, a clear and direct speech with the market, collaboration and partnership with our customers and business partners and constant investments on methodology and research improvement.

This advisory has been discovered as part of a general investigation into the security of software used in the IT environments of our customers. For more information about our company and services provided, please check our website at www.conviso.com.br.

3. The Security Research


Conviso maintains a virtual team dedicated to explore our customer’s environments in order to identify technical vulnerabilities in software and hardware, developing real-world mitigation solutions and processes to maintain more secure environments. Leaded by Wagner Elias, our CTO, this team is named Conviso Labs and also contribute to important world-class organizations projects and organizations.

The vulnerability described in this security advisory was discovered by Wagner Elias on January 14th 2010 during a malware investigation project.

Security Advisory


1. Issue Description


This advisory describes a vulnerability in the permission of the directory RealMedia created as default during the installation of Open AdStream, an ad campaign management platform provided by 24/7 Real Media, which exposes directly to the Internet the configuration files, including .sql which contains access credentials.

As a result, a cracker can use this flaw to install a backdoor or take the ownership of the affected component as he/she had access to all configuration files and access credentials.

2. Affected Components


The vulnerability was identified on the deployment of Open AdStream Version 5.7 in several large Brazilian Internet portals and media delivery websites. The product’s webpage is located at http://www.247realmedia.com/EN-US/us/open-ad-stream.html.

This version of the product can be used only with MySQL 3.23 and Apache 1.36.x, versions which are outdated and vulnerable to several exploits as described on the security advisories posted on the Internet at http://www.securityfocus.com/bid/11357 and http://httpd.apache.org/security/vulnerabilities_13.html.

The vulnerability described in this advisory can easily be found by “script kid” style hackers, making non-targeted attacks, by searching Google using “Google Hacking” techniques.

3. Details


The deployment process performed by 24/7 Real Media keeps the default configuration on Open AdStream which publishes the configuration files of the host exposed to the Internet on a format such as http://admXX.customername.com.br/RealMedia. As a result the following example files can be fully accessed:

ads oasis_mysql_insertdb.sqlbcrypt oasis_mysql_insertdb.sql.templateClasses oasis_mysql_insertuser.sqlConvertNotification.ini oasis_mysql_insertuser.sql.templatehash.txt oasis_mysql_testdb.sqlindex.html oasis_mysql_testdb.sql.templateini oasis_mysql_uninstalldb.sqlinstall.sh oasis_mysql_uninstalldb.sql.templatelibstdc++.so.2.10 oasis_mysql_uninstallOAS.sqllicense.txt oasis_mysql_uninstallOAS.sql.templatelicense.txt.bfe oasis_params.cfgoasis_apache.layout oasis_path_substitution.shoasis.cfg oasis_ReportFormat.awkoasis_cfg_apache.sh oasis_ReportFormat_mapping.5.1.1oasis_cfg_cron.sh oasis_ReportFormat_mapping.5.1.2oasis_cfg_distrib.sh oasis.shoasis_cfg_mysql.sh oasis_upgrade_apache.cfgoasis_cfg_ns.sh oasis_upgrade_de.shoasis_copysofiles.sh oasis_upgrade_ns.cfgoasis_errorlog.sh oasis_upgrade_ns.shoasis_example.cfg oasis_util.shoasis_find_apache.sh oasis_validate_config.shoasis_finish_upgrade.sh oasis_wsusr_apache.cronoasis_install.ini oasis_wsusr_bean.cronoasis_install_oas.sh oasis_wsusr_bean.cron.templateoasis.log oasis_wsusr_nightly.cronoasis_mysql_createdb.sql oasis_wsusr_nightly.cron.templateoasis_mysql_createdb.sql.template

The database server location as well as access credentials of administrative accounts can be found within the files oasis_mysql_insertuser.sql and oasis_params.cfg. With this information, an attacker could gain access to the database and perform any malicious activity. Other files such as oasis_install.ini and install.sh discloses the directory organization of Open AdStream server, which could be useful in combination with another attack.

Other problem we found is related to the old versions of Apache HTTP server and MySQL that must be installed to use the affected software.

Apache Foundation released the final release of version 1.3 of the Apache HTTP Server on February 3rd 2010, stating that no more full releases will be produced, although critical security updates may be made available as described on their mailing lists archives at http://mail-archives.apache.org/mod_mbox/httpd-announce/201002.mbox/%3C20100203000334.GA19021@infiltrator.stdlib.net%3E. They recommend that users update to the current 2.2 version.

4. Issue Mitigation


The permission of the directory RealMedia should be changed in order to deny access to the configuration files.

5. Additional Information


The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2010-1582 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems.

6. CVSS Issue Severity Scores


Conviso calculated the scores of this vulnerability using the online CVSS calculator found at http://www.patchadvisor.com/PatchAdvisor/CVSSCalculator.aspx and described at http://www.first.org/cvss/cvss-guide.pdf.

  • Base Metrics | Value: 9

  • Temporal Metrics | Value: 9

  • Environmental Metrics | Value: 7

segunda-feira, 28 de março de 2011

Patrocínio do YSTS


Pelo terceiro ano consecutivo a Conviso patrocina o evento You Shot the Sheriff, que irá acontecer no dia 16 de maio em São Paulo. Seguindo o mesmo modelo dos anos anteriores, as melhores palestras técnicas e gerenciais do ramo irão ocorrer em um single track, em um bar informado somente para os participantes.

domingo, 27 de março de 2011

Por que usar LaTeX para escrita de artigos na Conviso?

Recentemente decidimos adotar o LaTeX como tecnologia para escrita de artigos na Conviso. Quem acompanha a nossa pesquisa pode estar se perguntando do porquê dessa decisão. Esse post vem para esclarecer essa dúvida e mostrar um pouco das vantagens que o LaTeX oferece.

Para quem não conhece, o LaTeX é uma linguagem de marcação (tipo HTML) para escrita de documentos inventada por Donald Knuth. Uma primeira vantagem é que não é vinculado a software de edição, ou seja, estamos livres para construir documentos LaTeX (.tex) em qualquer tecnologia de edição de texto (de bloco de notas até ferramentas mais sofisticadas como o Kile).

O LaTeX pode ser modularizado e possui pacotes (extenções para a linguagem) para os mais diversos recursos como: fórmulas, tabelas, imagens, legendas, bibliografias, código fonte etc. Outra grande vantagem, é quanto a organização de referências bibliográficas que são armazenadas em um arquivo separado (.bib) e podem ser compartilhadas por diversos documentos.

O LaTeX já vêm sendo usado como padrão para escrita de artigos científicos tanto na academia quanto na indústria. Ferramentas para busca e indexação de artigos e para organização de referências (IEEE Explorer, Mendeley, ACM Digital Library, Scopus) já possuem definições para identificar o padrão das classes bases do LaTeX (article, report, letter, book, proc e slides).

Além de todos os recursos oferecidos o artigo produzido em um formato padrão está apto a ser indexado por qualquer uma das ferramentas acima listadas. O LaTeX já possui compiladores para formatos como HTML, DVI, PDF e Postscript. Claro que para cada problema atacado, temos que realizar uma analise e escolher a ferramenta apropriada.

O LaTeX é muito eficiente para escrita de documentos técnicos nos mais diferentes formatos. Para documentos que necessitam de recursos visuais mais rebuscados (relatórios gerênciais para clientes e para vendas), talvez o LaTeX não seja a ferramenta mais adequada.

sexta-feira, 25 de março de 2011

II Sheriff Night

No dia 16 de março realizamos a segunda edição do Sheriff Night. Com um excelente suporte da STS, o evento teve a presença de membros da comunidade de segurança da informação que assistiram a uma pequena apresentação institucional sobre a Conviso e depois o Nelson Murilo, falando sobre resposta a incidentes.

Agradecemos imensamente a presença dos convidados que puderam nos dar a oportunidade de sua presença. Confira as fotos no web site da STS, e abaixo um vídeo mostrando um pouco de como o evento aconteceu.

quinta-feira, 24 de março de 2011

Related Posts Word Press Plugin Cross Site Scripting Vulnerability - CVE-2011-0760

Introduction


Copyright and Disclaimer


The information in this advisory is Copyright 2010 Conviso and provided so that the society can understand the risk they may be facing by running affected software, hardware or other components used on their systems. In case you wish to copy information from this advisory, you must either copy all of it or refer to this document (including our URL). No guarantee is provided for the accuracy of this information, or damage you may cause your systems in testing.

About Conviso


Conviso is a consulting company specialized on application security. Our values are based on the allocation of the adequate competencies on the field, a clear and direct speech with the market, collaboration and partnership with our customers and business partners and constant investments on methodology and research improvement.

This advisory has been discovered as part of a general investigation into the security of software used in the IT environments of our customers. For more information about our company and services provided, please check our website at www.conviso.com.br.

The Security Research


Conviso maintains a virtual team dedicated to explore our customer’s environments in order to identify technical vulnerabilities in software and hardware, developing real-world mitigation solutions and processes to maintain more secure environments. Leaded by Wagner Elias, our CTO, this team is named Conviso Labs and also contribute to important world-class organizations projects and organizations.

The vulnerability described in this security advisory was discovered by Gabriel Quadros on December 22nd 2010 during a internal security research.

Security Advisory


Issue Description


The WordPress Related Posts Plugin, available at http://WordPress.org/extend/plugins/wp-related-posts/ shows the posts related to others posts. This advisory describes multiple Stored Cross Site Scripting (XSS) vulnerabilities and one Cross Site Request Forgery (CSRF) vulnerability on  the plugin.

As a result, an attacker can gain elevated access privileges to sensitive page content, session cookies, and a variety of other information maintained by the web browser on behalf of the WordPress administrator. Furthermore, the attacker can perform actions with administrative privileges.

Affected Components


This problem was confirmed in the latest version of the plugin - WP Related Posts 1.0, other versions maybe also affected.

CVSS Scoring System


Conviso calculated the scores using the online CVSS calculator found at http://www.patchadvisor.com/PatchAdvisor/CVSSCalculator.aspx and described at http://www.first.org/cvss/cvss-guide.pdf.

The CVSS score is: 6.4

  • Base Score: 6.7

  • Temporal Score: 6.4


We used the following values to calculate the scores:

  • Base score is: AV:N/AC:L/Au:N/C:C/I:C/A:N

  • Temporal score is: E:F/RL:U/RC:C


Details

The plugin's configuration page is vulnerable to Stored Cross Site Scripting. The three fields wp_relatedposts_ title, wp_relatedposts_num and wp_relatedposts_type are received through POST or GET and included on the response page with inadequate sanitization. The vulnerable code is shown bellow:

158: <tr valign="top">

159:        <th scope="row">Title:</th>

160:                        <td><input type="text"

name="wp_relatedposts_title" value="<?=$options['

title']?>"></td>

161: </tr>

162: <tr valign="top">

163:        <th scope="row">Number posts:</th>

164:                        <td><input type="text"

name="wp_relatedposts_num" value="<?=$options['

count']?>"></td>

165: </tr>

166: <tr valign="top">

167:        <th scope="row">Related on:</th>

168:                        <td>

169:                                        <select name="wp_relatedposts_type">

170:                                                        <option

selected value="<?=$options['type']?>"><?=$options['type']?></option>

171:                                                        <option

value="Tags">Tags</option>

172:                                                        <option

value="Category">Category</option>

173:                                                        </select>

174:                        </td>

Another vulnerable piece of code is the one which prints the related posts list. The title, eceived through the parameter wp_relatedposts_title, is included with little sanitization into suchs lists. The vulnerable code is shown bellow:

79: $relatedpost.= '<br><br><br><h3>' . $options['title'] . '</h3><ul>';

(...)

120: $relatedpost.= '<br><br><br><h3>' . $options['title'] . '</h3><ul>';

These vulnerabilities allow an attacker to insert HTML/JavaScript commands to be interpreted in the session of an authenticated administrator. Since the plugin's configuration page is not protected against Cross Site Request Forgery, the exploitation permits the attacker to inject configuration values. Proof of concept exploitation code is available to interested parties.

Issue Mitigation


The developers have not provided a patch or workaround. The solution should add code to sanitize the values before including them using the htmlspecialchars() function or equivalent. Furthermore, a mechanism to protect against the CSRF is needed to prevent an attacker from changing the plugin's configuration.

Additional Information


The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2011-0760 to this issue.

Security Advisory: Recaptcha Word Press Plugin Cross Site Scripting Vulnerability | CVE 2011-0759

Introduction


Copyright and Disclaimer


The information in this advisory is Copyright 2010 Conviso and provided so that the society can understand the risk they may be facing by running affected software, hardware or other components used on their systems. In case you wish to copy information from this advisory, you must either copy all of it or refer to this document (including our URL). No guarantee is provided for the accuracy of this information, or damage you may cause your systems in testing.

About Conviso


Conviso is a consulting company specialized on application security. Our values are based on the allocation of the adequate competencies on the field, a clear and direct speech with the market, collaboration and partnership with our customers and business partners and constant investments on methodology and research improvement.

This advisory has been discovered as part of a general investigation into the security of software used in the IT environments of our customers. For more information about our company and services provided, please check our website at www.conviso.com.br.

The Security Research


Conviso maintains a virtual team dedicated to explore our customer’s environments in order to identify technical vulnerabilities in software and hardware, developing real-world mitigation solutions and processes to maintain more secure environments. Leaded by Wagner Elias, our CTO, this team is named Conviso Labs and also contribute to important world-class organizations projects and organizations.

The vulnerability described in this security advisory was discovered by Gabriel Quadros on December 22nd 2010 during a internal security research.

Security Advisory


Issue Description


The WordPress Recaptcha Plugin integrates reCAPTCHA antispam methods with WordPress including comment, registration, and email spam protection and is available at http://wordpress.org/extend/plugins/wp-recaptcha/.

This advisory describes multiple Stored Cross Site Scripting (XSS) vulnerabilities and one Cross Site Request Forgery (CSRF) vulnerability on the plugin.  As a result, an attacker can gain elevated access privileges to sensitive page content, session cookies, and a variety of other information maintained by the browser on behalf of the WordPress administrator user. Furthermore, the attacker can perform actions administrative privileges.

Affected Components


This problem was confirmed in the latest version of the plugin - WP-reCAPTCHA 2.9.8.2, other versions maybe also affected.

CVSS Scoring System


Conviso calculated the scores using the online CVSS calculator found at http://www.patchadvisor.com/PatchAdvisor/CVSSCalculator.aspx and described at http://www.first.org/cvss/cvss-guide.pdf.

The CVSS score is: 6.4

  • Base Score: 6.7

  • Temporal Score: 6.4


We used the following values to calculate the scores:

  • Base score is: AV:N/AC:L/Au:N/C:C/I:C/A:N

  • Temporal score is: E:F/RL:U/RC:C


Details


The plugin's configuration page is vulnerable to Stored Cross Site Scripting. Several fields are received through POST and included on the response page with inadequate sanitization. The vulnerable code is shown bellow:

749: <input name="recaptcha_opt_pubkey" id="recaptcha_opt_pubkey" size="40"

value="<?php echo $optionarray_def['pubkey']; ?>" />

753: <input name="recaptcha_opt_privkey" id="recaptcha_opt_privkey" size="40"

value="<?php echo $optionarray_def['privkey']; ?>" />

782: <input name="re_tabindex" id="re_tabindex" size="5" value="<?php echo

$optionarray_def['re_tabindex']; ?>" />

814: <input name="error_blank" id="error_blank" size="80" value="<?php

echo $optionarray_

def['error_blank']; ?>" />

818: <input name="error_incorrect" id="error_incorrect" size="80" value="<?php

echo $optionarray_def['error_incorrect']; ?>" />

865: <input name="mailhide_pub" id="mailhide_pub" size="40" value="<?php echo

$optionarray_def['mailhide_pub']; ?>" />

869: <input name="mailhide_priv" id="mailhide_priv" size="40" value="<?php echo

$optionarray_def['mailhide_priv']; ?>" />

888: <input name="mh_replace_link" id="mh_replace_link" size="40" value="<?php

echo $optionarray_def['mh_replace_link']; ?>" />

891: <input name="mh_replace_title" id="mh_replace_title" size="40" value="<?php

echo $optionarray_def['mh_replace_title']; ?>" />

As a result, an attacker may insert HTML/JavaScript commands to be interpreted in the session of an authenticated administrator and, as the plugin's configuration page is not protected against Cross Site Request Forgery, the exploitation can be used to inject configuration values and change the reCAPTCHA configuration, disabling CAPTCHA for comments and registration forms. Proof of concept exploitation code is available to interested parties.

Issue Mitigation


The developer did not provided a patch or workaround. The solution for this issue should add code to sanitize the values before including them using the htmlspecialchars() function or equivalent. Furthermore, a mechanism to protect against the CSRF is needed to prevent an attacker from changing the plugin's configuration.

Additional Information


The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2011-0759 to this issue.