<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "https://www.rssboard.org/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>Mark J Cox   </title>
    <link>https://esoom.com/mark/blog</link>
    <description>Here's where you can find everything you ever wanted to know, and less, about me and what I do.</description>
    <language>en</language>

  <item>
    <title>Searching my email attachments with Ponymail and Tika</title>
    <pubDate>Sat, 01 Apr 2023 18:09:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20230402.html</link>
    <description>
&lt;p&gt;Moving my email archives to Ponymail &lt;a data-from-md=&quot;&quot;
title=&quot;https://awe.com/mark/blog/20230328.html&quot;
href=&quot;https://awe.com/mark/blog/20230328.html&quot;&gt;went well&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One feature I forgot that &lt;a data-from-md=&quot;&quot;
title=&quot;https://web.archive.org/web/20040603090941/https://zoe.nu/itstories/story.php?data=stories&amp;amp;num=16&amp;amp;sec=1&quot;
href=&quot;https://web.archive.org/web/20040603090941/https://zoe.nu/itstories/story.php?data=stories&amp;amp;num=16&amp;amp;sec=1&quot;&gt;zoe&lt;/a&gt;
had was how it indexed some attachments.&amp;nbsp; If you have an email with a PDF
attachment and that PDF attachment had plain text in it (it wasn&amp;apos;t just a
scan) then you could search on words in the PDF.&amp;nbsp; That&amp;apos;s super
handy.&amp;nbsp; Ponymail doesn&amp;apos;t do that, in fact you don&amp;apos;t get to search
on any text in attachments, even if they are plain text (or things like
patches).&amp;nbsp; Let&amp;apos;s fix that!&lt;/p&gt;

&lt;p&gt;Remember how I said whenever I need some code I first look if there is an
Apache community that has a project that does something similar?&amp;nbsp; Well
Apache Tika is an awesome project that will return the plain text of pretty much
whatever you throw at it.&amp;nbsp; PDF? sure.&amp;nbsp; Patches? definitely.&amp;nbsp; Word
docs? yup.&amp;nbsp; Images? yes.&amp;nbsp; Wait, images? so Tika will go and use
Tesseract and do an OCR of an image.&lt;/p&gt;

&lt;p&gt;Okay, so let&amp;apos;s add a field to the mbox index, attachmenttext, populate
it with Tika, and search on it.&amp;nbsp; For now if some text in an attachment
matches your search query you&amp;apos;ll see the result, but you won&amp;apos;t know
exactly where the text appears (perhaps later it could highlight which
attachment it appears in).&lt;/p&gt;

&lt;p&gt;&lt;a data-from-md=&quot;&quot;
title=&quot;https://github.com/apache/incubator-ponymail-foal/commit/ace9178c072b8693efb7bf0292c5a117c19b8bbf&quot;
href=&quot;https://github.com/iamamoose/incubator-ponymail-foal/commit/ace9178c072b8693efb7bf0292c5a117c19b8bbf&quot;&gt;I
wrote a quick Python script&lt;/a&gt; that runs through all emails in Ponymail (or
some search query subset), and if they have attachments runs all the attachments
through Apache Tika, storing the plain texts in the attachmenttext field.&amp;nbsp;
We ignore anything that&amp;apos;s already got something in that field, so we can
just run this periodically rather than on import.&amp;nbsp; Then a one-line patch to
Ponymail also searches the attachmenttext field.&amp;nbsp; 40,000 attachments and
two hours later, it was all done and working.&lt;/p&gt;

&lt;p&gt;It&amp;apos;s not ready for a PR yet; probably for Ponymail upstream we&amp;apos;d
want the option of doing this at import, although I chose not too so we can be
deliberately careful as &lt;a data-from-md=&quot;&quot;
title=&quot;https://cwiki.apache.org/confluence/display/TIKA/The+Robustness+of+Apache+Tika&quot;
href=&quot;https://cwiki.apache.org/confluence/display/TIKA/The+Robustness+of+Apache+Tika&quot;&gt;parsing
untrusted attachments is risky&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So there we have it; a way to search your emails including inside most
attachments, outside the cloud, using Open Source projects and a few little
patches.&lt;/p&gt;

			
</description>
  </item>
  <item>
    <title>How Ponymail helped me keep my email archive searchable but out of the cloud.</title>
    <pubDate>Tue, 28 Mar 2023 11:51:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20230328.html</link>
    <description>
I have a lot of historical personal email, back as far as 1991, and from time to
time there&amp;apos;s a need to find some old message.&amp;nbsp; Although services like
GMail would like to you keep all your mail in their cloud and pride themselves
on searching, I&amp;apos;d rather keep my email archive offline and encrypted at
rest unless there&amp;apos;s some need to do a search.&amp;nbsp; Indeed I always use
Google takeout every month to remove all historic GMail messages. Until this
year I used a tool called &lt;a data-from-md=&quot;&quot;
title=&quot;https://web.archive.org/web/20040603090941/https://zoe.nu/itstories/story.php?data=stories&amp;amp;num=16&amp;amp;sec=1&quot;
href=&quot;https://web.archive.org/web/20040603090941/https://zoe.nu/itstories/story.php?data=stories&amp;amp;num=16&amp;amp;sec=1&quot;&gt;Zoe&lt;/a&gt;
for allowing searchable email archives.&amp;nbsp; You can import your emails, it
uses Apache Lucene as a back end, and gives you a nice web based interface to
find your mails.&amp;nbsp; But Zoe has been unmaintained for over a decade and has
mostly vanished from the net. It was time to replace it.&lt;/p&gt;

&lt;p&gt;Whenever I need some open source project my first place to look is if there
is an Apache Software Foundation community with a project along the same
lines.&amp;nbsp; And the ASF is all about communities communicating over Email, so
not only is there an ASF project with a solution, but that project is used to
provide the web interface for all the archived ASF mailing lists too. &amp;nbsp;
&amp;quot;&lt;a data-from-md=&quot;&quot;
title=&quot;https://github.com/apache/incubator-ponymail-foal&quot;
href=&quot;https://github.com/apache/incubator-ponymail-foal&quot;&gt;Ponymail Foal&lt;/a&gt;&amp;quot;
is the project and &lt;a data-from-md=&quot;&quot; title=&quot;https://lists.apache.org/&quot;
href=&quot;https://lists.apache.org/&quot;&gt;lists.apache.org&lt;/a&gt; is where you can see it
running.&amp;nbsp; (Note that the Ponymail website refers to the old version of Pony
Mail before &amp;quot;Foal&amp;quot;)&lt;/p&gt;

&lt;p&gt;Internally the project is mostly Python, HTML and Javascript, using Python
scripts to import emails into elasticsearch, so it&amp;apos;s really straightforward
to get up and running following the project instructions.&lt;/p&gt;
&lt;p&gt;So I can just import my several hundred thousand email messages I have in
random text mbox format files and be done?&amp;nbsp; Well, nearly.&amp;nbsp; It almost
worked but it needed a few tweaks:&lt;/p&gt;

&lt;li&gt;Ponymail wasn&amp;apos;t able to parse a fair number of email messages.&amp;nbsp; Analysing the mails led to only three root causes of mails not being able to be imported:
&lt;ul&gt;
&lt;li&gt;Bad &amp;quot;Content-Type&amp;quot; headers.&amp;nbsp; Even my bank gets this wrong
with the header Content-Type: text/html; charset=&amp;quot;utf-8
charset=\&amp;quot;iso-8859-1\&amp;quot;&amp;quot;.&amp;nbsp; I just made the code ignore similar
bad headers and try the fallbacks.&amp;nbsp; &amp;nbsp;&lt;a data-from-md=&quot;&quot;
title=&quot;https://github.com/apache/incubator-ponymail-foal/pull/246&quot;
href=&quot;https://github.com/apache/incubator-ponymail-foal/pull/246&quot;&gt;Patch
here&lt;/a&gt;&lt;/li&gt;
&lt;p&gt;&lt;li&gt;Messages with no text or HTML body and no attachments.&amp;nbsp; These are
fairly common for example a calendar entry might be sent as &amp;quot;Content-Type:
text/calendar&amp;quot;.&amp;nbsp; I just made it so that if there is no recognised body
it just uses whatever the last section it found was, regardless of content
type.&amp;nbsp; &lt;a data-from-md=&quot;&quot;
title=&quot;https://github.com/apache/incubator-ponymail-foal/pull/247&quot;
href=&quot;https://github.com/apache/incubator-ponymail-foal/pull/247&quot;&gt;Patch
here&lt;/a&gt;&lt;/li&gt;
&lt;p&gt;&lt;li&gt;Google Chat messages from many years ago.&amp;nbsp; These have no useful
anything, no body, no to: no message id, no return address. Rather than note
them as failures I use made the code ignore them completely.&amp;nbsp; Since this is
just a warning, no upstream patch prepared.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Handling List-Id&amp;apos;s.&amp;nbsp; Ponymail likes to sort mails by the List-Id
which makes a lot of sense where you have the thousands of Apache lists.&amp;nbsp;
But with personal email, and certainly when you subscribe to various
newsletters, or get bills, or spam that got into the archives then you end up
with lots of list id&amp;apos;s that are only used once or twice or are not
useful.&amp;nbsp; Working on open source projects there&amp;apos;s lots of lists that
I&amp;apos;m on that I want the email to get archived, but it would be nice if it
was separated out in the Ponymail UI.&amp;nbsp; So really I needed the ability to
have an &amp;apos;allow list&amp;apos; of list id&amp;apos;s that I want to have separate,
with everything else defaulting to a generic list id (being my email address
where all those mails came into).&amp;nbsp; &lt;a data-from-md=&quot;&quot;
title=&quot;https://github.com/apache/incubator-ponymail-foal/pull/248&quot;
href=&quot;https://github.com/apache/incubator-ponymail-foal/pull/248&quot;&gt;Patch
here&lt;/a&gt;&lt;/li&gt;
&lt;p&gt;
&lt;li&gt;HTML email.&amp;nbsp; Where an email contains only HTML and no text version then
Ponymail will make and store a text conversion of the HTML, but sometimes,
especially those pesky bank emails, it&amp;apos;s useful to be able to see the HTML
with all the embedded images.&amp;nbsp; Displaying HTML email in HTML isn&amp;apos;t
really a goal for the project, especially since you have to be really careful
you don&amp;apos;t end up parsing untrusted javascript for example.&amp;nbsp; And you
might not want all those tracking images to suddenly start getting pinged.&amp;nbsp;
But I&amp;apos;d really like a button that you could use on selected emails to
display them in HTML.&amp;nbsp; Fortunately Ponymail stores a complete raw copy of
the email, any my proof-of-concept worked, so this can be easy to add in the future.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Managing a personal email archive can be a daunting task especially with the
volume of email correspondence. However, with Ponymail, it&amp;apos;s possible to
take control of your email archive, keep it local and secure, and search through
it quickly and efficiently using the power of ElasticSearch.&lt;/p&gt;
</description>
  </item>
  <item>
    <title>Time for a new GPG key</title>
    <pubDate>Thu, 02 Jul 2015 09:21:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20150702.html</link>
    <description>
My GPG key has lasted me well, over 18 years, but it's a v2 key and therefore no longer supported by newer versions of GnuPG.  So it's
time to move to a new one.  &lt;a href=&quot;/mark/gpg-transition.txt.asc&quot;&gt;I've made a transition statement available&lt;/a&gt;.  If you signed my
old key please consider signing the new one.
</description>
  </item>
  <item>
    <title>OpenSSL CCS Injection</title>
    <pubDate>Sun, 15 Jun 2014 23:00:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20140616.html</link>
    <description>
I've written about why OpenSSL chose the disclosure method we did for the CCS Injection issues and how it went
&lt;a href=&quot;https://lwn.net/Articles/602406&quot;&gt;here&lt;/a&gt;
</description>
  </item>
  <item>
    <title>OpenSSL timelines</title>
    <pubDate>Wed, 04 Jun 2014 23:00:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20140605.html</link>
    <description>
Here is the timeline from my (OpenSSL) perspective for the recent CCS Injection
(MITM) vulnerability as well as the other flaws being fixed today.

&lt;h2&gt;SSL/TLS MITM vulnerability (CVE-2014-0224)&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;2014-04-22 (Date we were told the reporters shared the issue with
                        JPCERT/CC)
&lt;li&gt;2014-05-01 JPCERT/CC make first contact with OpenSSL security
&lt;li&gt;2014-05-02 JPCERT/CC send detailed report and reproducer to        
                        OpenSSL security (issue details are not complete and
                        doesn't look possible for a general purpose MITM at                               this point)
&lt;li&gt;2014-05-09 CERT/CC make first contact with OpenSSL security      
                         and send an updated report and reproducer which
                         shows full MITM is possible
&lt;li&gt;2014-05-09 OpenSSL verify the issue and assign CVE-2014-0224
&lt;li&gt;2014-05-12 JPCERT/CC contact OpenSSL with updated reproducer
&lt;li&gt;2014-05-13 OpenSSL start communication directly to reporters to  
                       share updated patch and other technical details
&lt;li&gt;2014-05-21 JPCERT/CC notify OpenSSL they have notified
                       &quot;vendors who have implemented  OpenSSL in their          
                        products&quot; under their framework agreement
&lt;li&gt;2014-05-21 CERT/CC request permission to prenotify vendors of
                       the issue
&lt;li&gt;2014-05-21 OpenSSL work with two major infrastructure providers
                       to test the fix and  ensure the fix is sufficient
&lt;li&gt;2014-06-02 CERT/CC notify their distribution list about the security
                        update but with no details
&lt;li&gt;2014-06-02 &quot;OS distros&quot; private vendor list is given headsup and
                        ability to request the patches and draft advisory
                        (0710).  Told Red Hat (0710) Debian (0750) FreeBSD
                        (0850),  AltLinux (1050), Gentoo (1150), Canonical
                        (1150), IBM (1700), Oracle (1700), 
                        SUSE (2014-06-03:0820), Amazon AMI
                        (2014-06-03:1330), NetBSD/pkgsrc (2014-06-04:0710),
                        Openwall (2014-06-04:0710)
&lt;li&gt;2014-06-02 Red Hat find issue with patch (1400), updated patch
                        sent to vendors
&lt;li&gt;2014-06-02 Canonical find regression with patch (1700), Stephen
                         produces updated patch, sent to vendors (1820)
&lt;li&gt;2014-06-03 &quot;ops-trust&quot; (1015) and selected OpenSSL Foundation
                         contracts (0820) are told a security  update will be
                         released on 2014-06-05 but with no details
&lt;li&gt;2014-06-05 Security updates and advisory is released (1130)
  &lt;/ul&gt;

&lt;h2&gt;DTLS recursion flaw (CVE-2014-0221)&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;2014-05-09 Reporter contacts OpenSSL security
&lt;li&gt;2014-05-09 OpenSSL contacts reporter with possible patch for
                       verification
&lt;li&gt;2014-05-16 Reporter confirmes patch
&lt;li&gt;2014-05-18 OpenSSL tells reporter CVE name
&lt;li&gt;2014-06-02 &quot;OS distros&quot; notification as above
&lt;li&gt;2014-06-03 OpenSSL lets reporter know the release date
&lt;li&gt;2014-06-05 Security updates and advisory is released
&lt;/ul&gt;
  
&lt;h2&gt;DTLS invalid fragment vulnerability (CVE-2014-0195)&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;2014-04-23 HP ZDI contact OpenSSL security and pass on security
                        report
&lt;li&gt;2014-05-29 OpenSSL let ZDI know the release date
&lt;li&gt;2014-06-02 &quot;OS distros&quot; notification as above
&lt;li&gt;2014-06-05 Security updates and advisory is released
&lt;/ul&gt;

&lt;h2&gt;Anonymous ECDH denial of service (CVE-2014-3470)&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;2014-05-28 Felix Gr&amp;ouml;bert and Iva Franti&amp;cacute; at Google report to
                       OpenSSL
&lt;li&gt;2014-05-29 OpenSSL tell reporters CVE name and release date
&lt;li&gt;2014-06-02 &quot;OS distros&quot; notification as above
&lt;li&gt;2014-06-05 Security updates and advisory is released
&lt;/ul&gt;

(All times UTC)
&lt;p&gt;
Post copied from my original source on Google+ https://plus.google.com/u/0/113970656101565234043/posts/L8i6PSsKJKs
</description>
  </item>
  <item>
    <title>OpenSSL Heartbleed Timeline</title>
    <pubDate>Tue, 08 Apr 2014 23:00:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20140409.html</link>
    <description>
We've had more than a few press enquiries at OpenSSL about the timeline of the
CVE-2014-0160 (heartbleed) issue.  Here's the OpenSSL view of the timeline:

&lt;ul&gt;
 &lt;li&gt;
April 01 - Google contact the Google OpenSSL team members with details of the
issue and a patch.  This was forwarded to the OpenSSL core team members (1109
UTC).  Original plan was to push that week, but it was postponed until April 09
to give time for proper processes.  Google tell us they've notified some
infrastructure providers under embargo, we don't have the names or dates for
these.
&lt;p&gt;
(Due to my unfortunate-timed holiday this week I used my Security Response Team
members at Red Hat to help co-ordinate this issue on behalf of OpenSSL, but see
below for when Red Hat Engineering were formally notified and started working on
the issue for Red Hat)
&lt;li&gt;
April 07 (0556 UTC) OpenSSL (via me) notify Red Hat.  Red Hat internal bug
created.  This is the time Red Hat was officially notified under embargo,
engineers and the Red Hat Security Response Team started working on the issue.
&lt;li&gt;
April 07 (0610 UTC) Red Hat contact the private distros list
(https://oss-security.openwall.org/wiki/mailing-lists/distros ) and let them know
an OpenSSL issue is due on Wednesday (no details of the issue are given: just
affected versions. Vendors are told to contact Red Hat for the full advisory
under embargo.
&lt;li&gt;
April 07 - OpenSSL (via Red Hat) give details of the issue, advisory, and patch
to the OS vendors that replied -- under embargo, telling them the issue will be
public on April 09.  This was SuSE (0815 UTC), Debian (0816 UTC), FreeBSD (0849
UTC), AltLinux (1000 UTC).  Some other OS vendors replied but we did not give
details in time before the issue was public, these included Ubuntu (asked at
1130 UTC), Gentoo (1414 UTC), Chromium (1615 UTC).
 &lt;li&gt;
April 07 (1519 UTC) - CERT-FI contact me and Ben Laurie by encrypted email with
details of the same issue found by Codenomicon.  This was forwarded to the
OpenSSL core team members (1611 UTC)
&lt;li&gt;
April 07 - The coincidence of the two finds of the same issue at the same time
increases the risk while this issue remained unpatched.  OpenSSL therefore
released updated packages that day.
&lt;li&gt;
April 07 (1725 UTC) OpenSSL updates, web pages including vulndb, and security
advisory (1839 UTC) gets made public.
&lt;/ul&gt;
So to be clear, OpenSSL notified only the following organisations prior to the
public release of the issue: Red Hat, SuSE, Debian, FreeBSD, AltLinux.
&lt;p&gt;
(Originally posted in Google+ at
https://plus.google.com/u/0/113970656101565234043/posts/TmCbp3BhJma )
&lt;p&gt;

Note: Akamai note on their blog that they were given advance notice of this
  issue by the OpenSSL team. This is incorrect.  They were probably notified
  directly by one of the vulnerability finders.
&lt;p&gt;
Note: To see how this fits into the overall timeline of this issue
see &lt;a href=&quot;https://www.smh.com.au/it-pro/security-it/heartbleed-disclosure-timeline-who-knew-what-and-when-20140415-zqurk.html&quot;&gt;this article&lt;/a&gt;
</description>
  </item>
  <item>
    <title>Hacking a Wifi Kettle</title>
    <pubDate>Sun, 23 Feb 2014 19:20:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20140223.html</link>
    <description>
&lt;p&gt;Here is a quick writeup of the protocol for the iKettle taken from my
&lt;a href=&quot;https://plus.google.com/+MarkJCox/posts/Nv6NZauosUX&quot;&gt;Google+&lt;/a&gt; post
earlier this month.  This protocol allows you to write your own software
to control your iKettle or get notifications from it, so you can integrate
it into your desktop or existing home automation system.

&lt;p&gt;


The &lt;a href=&quot;https://www.firebox.com/product/6068/iKettle&quot;&gt;iKettle&lt;/a&gt; is
advertised as the first wifi kettle, available in UK since February 2014.  I
bought mine on pre-order back in October 2013.  When you first turn on the 
kettle it acts as a wifi hotspot and they supply an app for Android and iPhone
that reconfigures the kettle to then connect to your local wifi hotspot instead.
The app then communicates with the kettle on your local network enabling you
to turn it on, set some temperature options, and get notification when it
has boiled. 

&lt;p&gt;

Once connected to your local network the device responds to ping requests and
listens on two tcp ports, 23 and 2000.  The wifi connectivity is enabled by
a third party serial to wifi interface board and it responds similar to a
HLK-WIFI-M03.  Port 23 is used to configure the wifi board itself (to
tell it what network to connect to and so on).  Port 2000 is passed through
to the processor in the iKettle to handle the main interface to the kettle.

&lt;h2&gt;Port 2000, main kettle interface&lt;/h2&gt;

The iKettle wifi interface listens on tcp port 2000; all devices that connect
to port 2000 share the same interface and therefore receive the same messages.
The specification for the wifi serial board state that the device can only
handle a few connections to this port at a time.  The iKettle app also uses
this port to do the initial discovery of the kettle on your network.

&lt;h3&gt;Discovery&lt;/h3&gt;

Sending the string &quot;HELLOKETTLE\n&quot; to port 2000 will return with &quot;HELLOAPP\n&quot;.
You can use this to check you are talking to a kettle (and if the kettle has
moved addresses due to dhcp you could scan the entire local network looking
for devices that respond in this way.  You might receive other HELLOAPP
commands at later points as other apps on the network connect to the kettle.

&lt;h3&gt;Initial Status&lt;/h3&gt;

Once connected you need to figure out if the kettle is currently doing
anything as you will have missed any previous status messages.  To do
this you send the string &quot;get sys status\n&quot;.  The kettle will respond with
the string &quot;sys status key=\n&quot; or &quot;sys status key=X\n&quot; where X is a single
character.  bitfields in character X tell you what buttons are currently
active:

&lt;p&gt;&lt;table border=1&gt;
&lt;tr&gt;&lt;td&gt;Bit 6&lt;td&gt;Bit 5&lt;td&gt;Bit 4&lt;td&gt;Bit 3&lt;td&gt;Bit 2&lt;td&gt;Bit 1&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;100C&lt;td&gt;95C&lt;td&gt;80C&lt;td&gt;65C&lt;td&gt;Warm&lt;td&gt;On&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;So, for example if you receive &quot;sys status key=!&quot; then buttons
&quot;100C&quot; and &quot;On&quot; are currently active (and the kettle is therefore
turned on and heating up to 100C).

&lt;h3&gt;Status messages&lt;/h3&gt;

As the state of the kettle changes, either by someone pushing the physical button
on the unit, using an app, or sending the command directly
you will get async status messages. Note that although the status
messages start with &quot;0x&quot; they are not really hex.  Here are all
the messages you could see:

&lt;p&gt;
&lt;table border=1&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x100&lt;td&gt;100C selected&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x95&lt;td&gt;95C selected&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x80&lt;td&gt;80C selected&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x100&lt;td&gt;65C selected&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x11&lt;td&gt;Warm selected&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x10&lt;td&gt;Warm has ended&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x5&lt;td&gt;Turned on&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x0&lt;td&gt;Turned off&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x8005&lt;td&gt;Warm length is 5 minutes&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x8010&lt;td&gt;Warm length is 10 minutes&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x8020&lt;td&gt;Warm length is 20 minutes&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x3&lt;td&gt;Reached temperature&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x2&lt;td&gt;Problem (boiled dry?)&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys status 0x1&lt;td&gt;Kettle was removed (whilst on)&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;
You can receive multiple status messages given one action, for example
if you turn the kettle on you should get a &quot;sys status 0x5&quot; and a
&quot;sys status 0x100&quot; showing the &quot;on&quot; and &quot;100C&quot; buttons are selected.
When the kettle boils and turns off you'd get a &quot;sys status 0x3&quot; to
notify you it boiled, followed by a &quot;sys status 0x0&quot; to indicate all
the buttons are now off.

&lt;h3&gt;Sending an action&lt;/h3&gt;

To send an action to the kettle you send one or more action messages
corresponding to the physical keys on the unit.  After sending an
action you'll get status messages to confirm them.

&lt;p&gt;
&lt;table border=1&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x80&lt;td&gt;Select 100C button&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x2&lt;td&gt;Select 95C button&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x4000&lt;td&gt;Select 80C button&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x200&lt;td&gt;Select 65C button&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x8&lt;td&gt;Select Warm button&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x8005&lt;td&gt;Warm option is 5 mins&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x8010&lt;td&gt;Warm option is 10 mins&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x8020&lt;td&gt;Warm option is 20 mins&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x4&lt;td&gt;Select On button&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;set sys output 0x0&lt;td&gt;Turn off&lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;

&lt;h2&gt;Port 23, wifi interface&lt;/h2&gt;

The user manual for this document
is &lt;a href=&quot;https://wooridisplay.co.kr/Documents/WIFi-RS232C_converter_V_User_Manual.pdf&quot;&gt;available
online&lt;/a&gt;, so no need to repeat the document here.  The iKettle uses the device
with the default password of &quot;000000&quot; and disables the web interface.  

&lt;p&gt;If you're interested in looking at the web interface you can enable it by
connecting to port 23 using telnet or nc, entering the password, then issuing the commands
&quot;AT+WEBS=1\n&quot; then &quot;AT+PMTF\n&quot; then &quot;AT+Z\n&quot; and then you can open up a webserver on port 80
of the kettle and change or review the settings.  I would not recommend you
mess around with this interface, you could easily break the iKettle in a way
that you can't easily fix.  The interface gives you the option of uploading
new firmware, but if you do this you could get into a state where the kettle
processor can't correctly configure the interface and you're left with
a broken kettle.  Also the firmware is just for the wifi serial interface,
not for the kettle control (the port 2000 stuff above), so there probably
isn't much point.

&lt;h2&gt;Missing functions&lt;/h2&gt;

The kettle processor knows the temperature but it doesn't expose that in any
status message.  I did try brute forcing the port 2000 interface using
combinations of words in the dictionary, but I found no hidden features (and
the folks behind the kettle confirmed there is no temperature read out).  This
is a shame since you could combine the temperature reading with time and figure
out how full the kettle is whilst it is heating up.  Hopefully they'll address
this in a future revision.


&lt;h2&gt;Security Implications&lt;/h2&gt;

The iKettle is designed to be contacted only through the local network - you
don't want to be port forwarding to it through your firewall for example because
the wifi serial interface is easily crashed by too many connections or bad
packets.  If you have access to a local network on which there is an iKettle you
can certainly cause mischief by boiling the kettle, resetting it to factory
settings, and probably even bricking it forever.  However the cleverly designed
segmentation between the kettle control and wifi interface means it's pretty
unlikely you can do something more serious like overiding safety (i.e. keeping
the kettle element on until something physically breaks).  
</description>
  </item>
  <item>
    <title>Hacking a disco laser</title>
    <pubDate>Sun, 15 Sep 2013 15:39:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20130915.html</link>
    <description>
&quot;Before&quot; and &quot;After&quot; video:
&lt;p&gt;
&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/zxoECKipwzo&quot;
        frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;
We were looking for a cheap laser lighting effect for our
weekend parties and saw one that looked impressive, the
&lt;a href=&quot;https://www.amazon.co.uk/Lanta-Quasar-Compact-Micro-Buster/dp/B0052RMLHG&quot;&gt;
Lanta Quasar Buster 2&lt;/a&gt;, and for only &amp;#163;30 new.  The unit
has both a red and green laser and and a nice moving effect
that looks like the beams splits up and recombine again.  It
promised &quot;sound activation&quot; and we thought that meant it would
do some clever sound to light effect, but it really does mean
sound activation and just turns itself on when it hears a sound, 
then off again when it's silent.  So out of the box the laser
has three modes; the first lets you just set the speed of the
effect with the lasers constantly on, the second strobes the
lasers on and off to a speed you can set, and the third is the
usless sound activation mode.
&lt;p&gt;
&lt;a href=&quot;https://www.flickr.com/photos/iamamoose/9760127072/&quot;
   title=&quot;20130911071819 by i am a moose, on
   Flickr&quot;&gt;&lt;img src=&quot;https://farm6.staticflickr.com/5462/9760127072_ba9e95205b_n.jpg&quot;
   width=&quot;320&quot; height=&quot;297&quot; alt=&quot;20130911071819&quot;&gt;&lt;/a&gt;
&lt;p&gt;
Warrany void if removed.  I didn't technically &quot;remove&quot; the
sticker though.
&lt;p&gt;
&lt;a href=&quot;https://www.flickr.com/photos/iamamoose/9760336175/&quot;
   title=&quot;20130911071918 by i am a moose, on
   Flickr&quot;&gt;&lt;img src=&quot;https://farm8.staticflickr.com/7281/9760336175_c19f4b2796_n.jpg&quot;
   width=&quot;320&quot; height=&quot;250&quot; alt=&quot;20130911071918&quot;&gt;&lt;/a&gt;
&lt;p&gt;
Opening the unit showed that it was easily hackable; all the
connections to the control panel were via connectors.  One connector
provides +5v to the cooling fan, another +5v to a separate
board that handles powering the two lasers, another connects to the motor
the turns the optics to produce the burst effect, and the final
one has a logic level signal to tell the laser power board if the lasers should
be on or off.
&lt;p&gt;
Since the laser power board is completely separate we can
just replace this control panel with one of our own and 
then we can control the laser on/off and the speed of the motor (actually
we could control the direction too but it doesn't really make the 
effect look any better so I leave it as one direction).  And we can always
swap the original board back in the future.
&lt;p&gt;
My new control board comprises of an Arduino pro mini compatible board, a rotary
encoder for setting the mode and levels, a mic with simple opamp preamp, and
a MSGEQ7 chip to do all the hard work of analysing the levels of various
frequencies.  The optics motor is now simply driven using a PWM output via a MOSFET I had
spare.
&lt;p&gt;
&lt;a href=&quot;https://www.flickr.com/photos/iamamoose/9760124452/&quot;
   title=&quot;20130914073636 by i am a moose, on
   Flickr&quot;&gt;&lt;img src=&quot;https://farm4.staticflickr.com/3811/9760124452_77cc73b753.jpg&quot;
   width=&quot;500&quot; height=&quot;367&quot; alt=&quot;20130914073636&quot;&gt;&lt;/a&gt;
&lt;p&gt;
&lt;a href=&quot;https://www.flickr.com/photos/iamamoose/9760402193/&quot;
   title=&quot;20130914073659 by i am a moose, on
   Flickr&quot;&gt;&lt;img src=&quot;https://farm6.staticflickr.com/5510/9760402193_21a227feb7.jpg&quot;
   width=&quot;500&quot; height=&quot;360&quot; alt=&quot;20130914073659&quot;&gt;&lt;/a&gt;
&lt;p&gt;
&lt;a href=&quot;https://github.com/iamamoose/arduino-laser&quot;&gt;Rough source and circuit
  diagram are available from github&lt;/a&gt;; some components don't have
values if it doesn't really matter and others (like the MOSFET) can be changed
as I just used things I happened to have in my component boxes.  I'm still
playing with different effects in software to see what works best.
</description>
  </item>
  <item>
    <title>Enterprise Linux 6.3 to 6.4 risk report</title>
    <pubDate>Wed, 27 Feb 2013 13:03:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20130227.html</link>
    <description>
You can read my &lt;a href=&quot;https://securityblog.redhat.com/2013/02/27/enterprise-linux-6-3-to-6-4-risk-report/&quot;&gt;Enterprise Linux 6.3 to 6.4 risk report&lt;/a&gt; on the
Red Hat Security Blog.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;
    &quot;for all packages, from release of 6.3 up to and including 6.4, we shipped
    108 advisories to address 311 vulnerabilities. 18 advisories were rated
    critical, 28 were important, and the remaining 62 were moderate and low.&quot;
&lt;/p&gt;&lt;p&gt;
    &quot;Updates to correct 77 of the 78 critical vulnerabilities were available via
    Red Hat Network either the same day or the next calendar day after the
    issues were public. The other one was in OpenJDK 1.60 
    where the update took 4 calendar days (over a weekend).&quot;
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;And if you are interested in how the figures were calculated, here is the
working out:

&lt;blockquote&gt;
&lt;p&gt;Note that we can't just use a date range because we've pushed some
RHSA the weeks before 6.4 that were not included in the 6.4 spin.
These issues will get included when we do the 6.4 to 6.5 report (as
anyone installing 6.4 will have got them when they first updated).

&lt;p&gt;So just after 6.4 before anything else was pushed that day:

&lt;pre&gt;** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20101110 - 20130221 (835 days)
** 397 advisories (C=55 I=109 L=47 M=186 )
** 1151 vulnerabilities (C=198 I=185 L=279 M=489 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20101110 - 20130221 (835 days)
** 177 advisories (C=11 I=71 L=19 M=76 )
** 579 vulnerabilities (C=35 I=133 L=159 M=252 )&lt;/pre&gt;

&lt;p&gt;And we need to exclude errata released before 2013-02-21 but not in 6.4:&lt;/p&gt;

&lt;pre&gt;RHSA-2013:0273 [critical, default]
RHSA-2013:0275 [important, not default]
RHSA-2013:0272 [critical, not default]
RHSA-2013:0271 [critical, not default]
RHSA-2013:0270 [moderate, not default]
RHSA-2013:0269 [moderate, not default]
RHSA-2013:0250 [moderate, default]
RHSA-2013:0247 [important, not default]
RHSA-2013:0245 [critical, default]
RHSA-2013:0219 [moderate, default]
RHSA-2013:0216 [important, default]

Default vulns from above: critical:12 important:2 moderate:16 low:3
Non-Default vulns from above: critical:4 important:2 moderate:5 low:0&lt;/pre&gt;

&lt;p&gt;This gives us &quot;Fixed between GA and 6.4 iso&quot;:

&lt;pre&gt;** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20101110 - 20130221 (835 days)
** 386 advisories (C=51 I=106 L=47 M=182 )
** 1107 vulnerabilities (C=182 I=181 L=276 M=468 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20101110 - 20130221 (835 days)
** 172 advisories (C=9 I=70 L=19 M=74 )
** 546 vulnerabilities (C=23 I=131 L=156 M=236 )&lt;/pre&gt;

&lt;p&gt;And taken from the last report &quot;Fixed between GA and 6.3 iso&quot;:

&lt;pre&gt;** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20101110 - 20120620 (589 days)
** 278 advisories (C=33 I=78 L=31 M=136 )
** 796 vulnerabilities (C=104 I=140 L=196 M=356 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20101110 - 20120620 (589 days)
** 134 advisories (C=6 I=56 L=15 M=57 )
** 438 vulnerabilities (C=16 I=110 L=126 M=186 )&lt;/pre&gt;

&lt;p&gt;Therefore between 6.3 iso and 6.4 iso:

&lt;pre&gt;** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20120621 - 20130221 (246 days)
** 108 advisories (C=18 I=28 L=16 M=46 )
** 311 vulnerabilities (C=78 I=41 L=80 M=112 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20120621 - 20130221 (246 days)
** 38 advisories (C=3 I=14 L=4 M=17 )
** 108 vulnerabilities (C=7 I=21 L=30 M=50 )&lt;/pre&gt;

&lt;p&gt;Note: although we have 3 default criticals, they are in openjdk-1.6.0, but we
only call Java issues critical if they can be exploited via a browser, and in
RHEL6 the Java browser plugin is in the icedtea-web package, which isn't a
default package.  So that means on a default install you don't get Java plugins
running in your browser, so really these are not default criticals in RHEL6
default at all. 
&lt;/blockquote&gt;
</description>
  </item>
  <item>
    <title>Enterprise Linux 6.2 to 6.3 risk report</title>
    <pubDate>Wed, 03 Oct 2012 15:16:00 GMT</pubDate>
    <link>https://esoom.com/mark/blog/20121003.html</link>
    <description>
You can read
my &lt;a href=&quot;https://securityblog.redhat.com/2012/10/03/enterprise-linux-6-2-to-6-3-risk-report/&quot;&gt;Enterprise
Linux 6.2 to 6.3 risk report&lt;/a&gt; on the Red Hat Security Blog.

&lt;blockquote&gt;&quot;for all packages, from release of 6.2 up to and including 6.3, we shipped
88 advisories to address 233 vulnerabilities.  15 advisories were rated critical,
23 were important, and the remaining 50 were moderate and low.&quot;
&lt;p&gt;&quot;Updates to correct 34 of the 36 critical vulnerabilities were
available via Red Hat Network either the same day or the next calendar
day after the issues were public.  The Kerberos telnet flaw was fixed
in 2 calendar days as the issue was published on Christmas day.  The
second PHP flaw took 4 calendar days (over a weekend) as the initial
fix released upstream was incomplete.&quot;&lt;/blockquote&gt;

And if you are interested in how
the figures were calculated, as always view the source of this
blog entry.

&lt;!--

Note that we can't just use a date range because we've pushed some
RHSA the weeks before 6.3 that were not included in the 6.3 spin.
These issues will get included when we do the 6.3 to 6.4 report (as
anyone installing 6.3 will have got them when they first updated).

So just after 6.3:

** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20101110 - 20120620 (589 days)
** 282 advisories (C=34 I=79 L=31 M=138 )
** 813 vulnerabilities (C=109 I=140 L=202 M=362 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20101110 - 20120620 (589 days)
** 136 advisories (C=7 I=57 L=15 M=57 )
** 447 vulnerabilities (C=21 I=110 L=127 M=189 )

But we need to take out the things pushed after 6.3 but on 20120620,
RHSA-2012:1009 (default) and RHSA-2012:0997 (not default).

So just after 6.3, before 6.3 0days:

** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20101110 - 20120620 (589 days)
** 280 advisories (C=34 I=78 L=31 M=137 )
** 811 vulnerabilities (C=109 I=140 L=201 M=361 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20101110 - 20120620 (589 days)
** 135 advisories (C=7 I=56 L=15 M=57 )
** 447 vulnerabilities (C=21 I=110 L=127 M=189 )

And we need to exclude errata released before 20120620 but not in 6.3:

RHSA-2012:0729 [critical, default] c c c l m m c m c 
RHSA-2012:0544 [moderate, not default] l m m l l l 

This gives us &quot;Fixed between GA and 6.3 iso&quot;:

** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20101110 - 20120620 (589 days)
** 278 advisories (C=33 I=78 L=31 M=136 )   C-1 I+1
** 796 vulnerabilities (C=104 I=140 L=196 M=356 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20101110 - 20120620 (589 days)
** 134 advisories (C=6 I=56 L=15 M=57 )
** 438 vulnerabilities (C=16 I=110 L=126 M=186 )

And from the last report &quot;Fixed between GA and 6.2 iso&quot;

** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20101110 - 20111206 (392 days)
** 190 advisories (C=18 I=55 L=19 M=98 )
** 563 vulnerabilities (C=68 I=107 L=126 M=262 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20101110 - 20111206 (392 days)
** 90 advisories (C=4 I=39 L=9 M=38 )
** 316 vulnerabilities (C=10 I=82 L=87 M=137 )

Therefore between 6.2 iso and 6.3 iso:

** Product: Red Hat Enterprise Linux 6 server (all packages)
** Dates: 20111206 - 20120620 (198 days)
** 88 advisories (C=15 I=23 L=12 M=38 )
** 233 vulnerabilities (C=36 I=33 L=70 M=94 )

** Product: Red Hat Enterprise Linux 6 Server (default installation packages)
** Dates: 20111206 - 20120620 (198 days)
** 44 advisories (C=2 I=17 L=6 M=19 )
** 122 vulnerabilities (C=6 I=28 L=39 M=49 )
--&gt;

&lt;!--
     26   &lt;daysdiff&gt;0&lt;/daysdiff&gt;
      8   &lt;daysdiff&gt;1&lt;/daysdiff&gt;
      1   &lt;daysdiff&gt;2&lt;/daysdiff&gt;
      1   &lt;daysdiff&gt;4&lt;/daysdiff&gt;
--&gt;

&lt;!-- CVE-2012-0217: On Xen, a privileged user on a 64 bit PV guest
kernel running on a 64 bit hypervisor could use this flaw to escalate
privileges to that of the host. Depending on the particular guest
kernel it is also possible that non-privileged guest users could also
elevate their privileges to that of the host.  But didn't affect
Linux kernel, and no Xen in RHEL6 --&gt;
</description>
  </item>
  </channel>
</rss>