<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Mustafa Al-Bassam&#39;s blog</title>
    <description>The personal blog of Mustafa Al-Bassam.</description>
    <link>https://musalbas.com/blog/</link>
    <atom:link href="https://musalbas.com/blog/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 01 Dec 2018 20:59:00 +0000</pubDate>
    <lastBuildDate>Sat, 01 Dec 2018 20:59:00 +0000</lastBuildDate>
    <generator>Jekyll v3.1.6</generator>
    
      <item>
        <title>Equation Group&#39;s BENIGNCERTAIN tool - a remote exploit to extract Cisco VPN private keys</title>
        <description>&lt;p&gt;&lt;img src=&quot;/blog/img/pixpocket.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;a href=&quot;https://musalbas.com/2016/08/16/equation-group-firewall-operations-catalogue.html&quot;&gt;Equation Group dump that contained NSA hacking tools&lt;/a&gt;, there was an overlooked tool called BENIGNCERTAIN.&lt;/p&gt;

&lt;p&gt;Analysis of the tool shows that it appears to be a remote exploit for Cisco PIX devices that sends an Internet Key Exchange (IKE) packet to the victim machine, causing it to dump some of its memory. The memory dump can then be parsed to extract an RSA private key and other sensitive configuration information.&lt;/p&gt;

&lt;p&gt;The tool references Cisco PIX versions 5.2(9) to 6.3(4), which was released in 2004. It is also worth noting that the Cisco PIX line of products are at their end-of-life.&lt;/p&gt;

&lt;p&gt;The exploit consists of three binaries, each consisting of an individual step in the exploitation process.&lt;/p&gt;

&lt;p&gt;The first step is executing &lt;code class=&quot;highlighter-rouge&quot;&gt;bc-genpkt&lt;/code&gt;, which generates an IKE packet of arbitrary size and fills some of it with arbitrary data.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Usage:	./bc-genpkt [-h] [-o &amp;lt;file&amp;gt;] [-f &amp;lt;X&amp;gt;] [-r] [-s] [-v[vv]] size

	-h	help/usage
	-o file write data to named file
	-f X	fill remainder of large packets with character &#39;X&#39;
	-r	randomize the initiator cookie
	-s	randomize the SPI
	-v[vv]	verbosity - show lengths, packet dumps, etc
	size	size of new packet, should be 96 &amp;lt;= size &amp;lt;= 65536 bytes

	Packets larger than 2528 bytes will be filled with random data
	unless the -f option is used.
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This generates a packet file which can be used as input to the binary &lt;code class=&quot;highlighter-rouge&quot;&gt;bc-id&lt;/code&gt;, which sends the packet to the victim host. Hector Martin &lt;a href=&quot;https://twitter.com/marcan42/status/766346343405060096&quot;&gt;notes&lt;/a&gt; that it sends a IKE packets with a large Group-Prime option, and speculates that if the victim host is replying using the request length but only filling in the requested 768 bit prime, then it returns a buffer of uninitialised data following it.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Usage:
   ./bc-id -t &amp;lt;dest IP&amp;gt; [&amp;lt;options&amp;gt;]
  Options:
      -t &amp;lt;dest IP&amp;gt;
      -l &amp;lt;local port&amp;gt;
      -p &amp;lt;remote port&amp;gt;
      -I &amp;lt;infile name&amp;gt;  [defaults to sendpacket.raw]
      -O &amp;lt;outfile name&amp;gt; [defaults to &quot;&amp;lt;dest IP&amp;gt;.raw&quot;]
      -f &amp;lt;packetfile name&amp;gt; Reads in packet from a file.
      -h              print this message
      -q              quiet mode.  Doesn&#39;t print hex of response packet.
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The strings in the &lt;code class=&quot;highlighter-rouge&quot;&gt;bc-id&lt;/code&gt; binary shows that the program seems to patch some memory and look for a start string in the response. However Hector Martin &lt;a href=&quot;https://twitter.com/marcan42/status/766352850016284673&quot;&gt;notes&lt;/a&gt; that this appears to be dead unreferenced code.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Patched memory at location %d with %s
  *** Error: Start string never found.
    %.*s
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;bc-id&lt;/code&gt; program then outputs a file which can be used as input to &lt;code class=&quot;highlighter-rouge&quot;&gt;bc-parser&lt;/code&gt;, a program that parses the response.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;BENIGNCERTAIN parser v1.0
Usage:	./bc-parser [-c] [-h] [-u] [-v] &amp;lt;file&amp;gt;

	-c	Generate PIX configuration commands
	-h	Usage
	-v	Verbose - print uninteresting/default stuff
	-u	Hex-dump unknown structures only
	-x	Hex-dump all structures (overrides -u)

	&amp;lt;file&amp;gt;	BENIGNCERTAIN .raw file
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The strings in the &lt;code class=&quot;highlighter-rouge&quot;&gt;bc-parser&lt;/code&gt; binary shows what the tool extracts, which appears to include VPN configuration details and RSA private keys.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;RSA private key structure at offset 0x%04x, size 0x%x bytes:
	*** Found probable RSA private key ***
RSA public key structure at offset 0x%04x, size 0x%x bytes:
	*** Found probable RSA public key ***
RSA key structure at offset 0x%04x, size 0x%x bytes:
	RSA keys were generated at %s
VPN group structure at offset 0x%04x, size 0x%x bytes
	Split-tunnel ACL:  0x%08x		%s
	Idle-time:         0x%08x		[%d seconds]
	Max-time:          0x%08x		[%d %s]
	PFS:               0x%08x		%s
	Clear-client-cfg:  0x%08x		%s
	User-idle-timeout: 0x%08x		[%d seconds]
	Authen. server:    0x%08x		%s
	Secure-unit-auth:  0x%08x		%s
	User authen.:      0x%08x		%s
	Device pass-thru:  0x%08x		%s
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;It also shows that it appears to be reading a memory dump.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Per-thread stack structure at offset 0x%04x, size 0x%x bytes:
CLI buffer structure at offset 0x%04x, size 0x%x bytes:
ISAKMP key structure at offset 0x%04x, size 0x%x bytes
	Pointer:           0x%08x		%s
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The tool’s folder also contains various payloads for different encryption algorithms, and Maksym Zaitsev &lt;a href=&quot;https://twitter.com/cryptolok/status/766329594362429444&quot;&gt;notes&lt;/a&gt; that the tool uses Internet Security Association and Key Management Protocol (ISAKMP) for the payloads.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;3DES_MD5_payload
3DES_SHA_payload
AES_MD5_payload
AES_SHA_payload
DES_MD5_payload
DES_SHA_payload
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Thu, 18 Aug 2016 00:00:00 +0000</pubDate>
        <link>https://musalbas.com/blog/2016/08/18/equation-group-benigncertain.html</link>
        <guid isPermaLink="true">https://musalbas.com/blog/2016/08/18/equation-group-benigncertain.html</guid>
        
        
      </item>
    
      <item>
        <title>Equation Group firewall operations catalogue</title>
        <description>&lt;p&gt;This week someone &lt;a href=&quot;http://www.wsj.com/articles/group-claim-to-have-u-s-government-hacking-tools-for-sale-1471309022&quot;&gt;auctioning hacking tools obtained from the NSA-based hacking group “Equation Group”&lt;/a&gt; released a dump of around 250 megabytes of “free” files for proof alongside the auction.&lt;/p&gt;

&lt;p&gt;The dump contains a set of exploits, implants and tools for hacking firewalls (“firewall operations”). This post aims to be a comprehensive list of all the tools contained or referenced in the dump.&lt;/p&gt;

&lt;h2 id=&quot;exploits&quot;&gt;Exploits&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;EGREGIOUSBLUNDER&lt;/strong&gt;
A remote code execution exploit for Fortigate firewalls that exploits a HTTP cookie overflow vulnerability. It affects models 60, 60M, 80C, 200A, 300A, 400A, 500A, 620B, 800, 5000, 1000A, 3600, and 3600A. The model of the firewall is detected by examining the ETag in the HTTP headers of the firewall. This is not CVE-2006-6493 as detected by Avast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ELIGIBLEBACHELOR&lt;/strong&gt;
An exploit for TOPSEC firewalls running the TOS operation system, affecting versions 3.2.100.010, 3.3.001.050, 3.3.002.021 and 3.3.002.030. The attack vector is unknown but it has an XML-like payload that starts with &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;?tos length=&quot;001e:%8.8x&quot;?&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ELIGIBLEBOMBSHELL&lt;/strong&gt;
A remote code execution exploit for TOPSEC firewalls that exploits a HTTP cookie command injection vulnerability, affecting versions 3.2.100.010.1_pbc_17_iv_3 to 3.3.005.066.1. Version detection by ETag examination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WOBBLYLLAMA&lt;/strong&gt;
A payload for the ELIGIBLEBOMBSHELL TOPSEC firewall exploit affecting version 3.3.002.030.8_003.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FLOCKFORWARD&lt;/strong&gt;
A payload for the ELIGIBLEBOMBSHELL TOPSEC firewall exploit affecting version 3.3.005.066.1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HIDDENTEMPLE&lt;/strong&gt;
A payload for the ELIGIBLEBOMBSHELL TOPSEC firewall exploit affecting version tos_3.2.8840.1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CONTAINMENTGRID&lt;/strong&gt;
A payload for the ELIGIBLEBOMBSHELL TOPSEC firewall exploit affecting version tos_3.3.005.066.1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GOTHAMKNIGHT&lt;/strong&gt;
A payload for the ELIGIBLEBOMBSHELL TOPSEC firewall exploit affecting version 3.2.100.010.8_pbc_27. Has no BLATSTING support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ELIGIBLECANDIDATE&lt;/strong&gt;
A remote code execution exploit for TOPSEC firewalls that exploits a HTTP cookie command injection vulnerability, affecting versions 3.3.005.057.1 to 3.3.010.024.1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ELIGIBLECONTESTANT&lt;/strong&gt;
A remote code execution exploit for TOPSEC firewalls that exploits a HTTP POST paramter injection vulnerability, affecting versions 3.3.005.057.1 to 3.3.010.024.1. This exploit can be tried after ELIGIBLECANDIDATE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EPICBANANA&lt;/strong&gt;
A privilege escalation exploit against Cisco Adaptive Security Appliance (ASA) and Cisco Private Internet eXchange (PIX) devices. Exploitation takes advantage of default Cisco credentials (password: cisco). Affects ASA versions 711, 712, 721, 722, 723, 724, 80432, 804, 805, 822, 823, 824, 825, 831, 832 and PIX versions 711, 712, 721, 722, 723, 724, 804.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ESCALATEPLOWMAN&lt;/strong&gt;
A privilege escalation exploit against WatchGuard firewalls of unknown versions that injects code via the &lt;code class=&quot;highlighter-rouge&quot;&gt;ifconfig&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EXTRABACON&lt;/strong&gt;
A remote code execution exploit against Cisco Adaptive Security Appliance (ASA) devices affecting ASA versions 802, 803, 804, 805, 821, 822, 823, 824, 825, 831, 832, 841, 842, 843, 844. It exploits an overflow vulnerability using the Simple Network Management Protocol (SNMP) and relies on knowing the target’s uptime and software version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BOOKISHMUTE&lt;/strong&gt;
An exploit against an unknown firewall using Red Hat 6.0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FALSEMOREL&lt;/strong&gt;
Allows for the deduction of the “enable” password from data freely offered by an unspecified firewall (likely Cisco) and obtains privileged level access using only the hash of the “enable” password. Requires telnet to be installed on the firewall’s inside interface.&lt;/p&gt;

&lt;h2 id=&quot;implants&quot;&gt;Implants&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;BLATSTING&lt;/strong&gt;
A firewall software implant that is used with EGREGIOUSBLUNDER (Fortigate) and ELIGIBLEBACHELOR (TOPSEC).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BANANAGLEE&lt;/strong&gt;
A non-persistent firewall software implant for Cisco ASA and PIX devices that is installed by writing the implant directly to memory. Also mentioned in the previously leaked &lt;a href=&quot;https://leaksource.info/2013/12/30/nsas-ant-division-catalog-of-exploits-for-nearly-every-major-software-hardware-firmware/&quot;&gt;NSA ANT catalogue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BANANABALLOT&lt;/strong&gt;
A BIOS module associated with an implant (likely BANANAGLEE).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BEECHPONY&lt;/strong&gt;
A firewall implant that is a predecessor of BANANAGLEE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JETPLOW&lt;/strong&gt;
A firmware persistence implant for Cisco ASA and PIX devices that persists BANANAGLEE. Also mentioned in the previously leaked &lt;a href=&quot;https://leaksource.info/2013/12/30/nsas-ant-division-catalog-of-exploits-for-nearly-every-major-software-hardware-firmware/&quot;&gt;NSA ANT catalogue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SCREAMINGPLOW&lt;/strong&gt;
Similar to JETPLOW.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BARGLEE&lt;/strong&gt;
A firewall software implant for Juniper NetScreen firewalls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BUZZDIRECTION&lt;/strong&gt;
A firewall software implant for Fortigate firewalls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FEEDTROUGH&lt;/strong&gt;
A technique for persisting BANANAGLEE and ZESTYLEAK implants for Juniper NetScreen firewalls. Also mentioned in the previously leaked &lt;a href=&quot;https://leaksource.info/2013/12/30/nsas-ant-division-catalog-of-exploits-for-nearly-every-major-software-hardware-firmware/&quot;&gt;NSA ANT catalogue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JIFFYRAUL&lt;/strong&gt;
A module loaded into Cisco PIX firewalls with BANANAGLEE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BANNANADAIQUIRI&lt;/strong&gt;
An implant associated with SCREAMINGPLOW. Yes, banana is spelled with three Ns this time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;POLARPAWS&lt;/strong&gt;
A firewall implant. Unknown vendor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;POLARSNEEZE&lt;/strong&gt;
A firewall implant. Unknown vendor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ZESTYLEAK&lt;/strong&gt;
A firewall software implant for Juniper NetScreen firewalls that is also listed as a module for BANANAGLEE. Also mentioned in the previously leaked &lt;a href=&quot;https://leaksource.info/2013/12/30/nsas-ant-division-catalog-of-exploits-for-nearly-every-major-software-hardware-firmware/&quot;&gt;NSA ANT catalogue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SECONDDATE&lt;/strong&gt;
A packet injection module for BANANAGLEE and BARGLEE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BARPUNCH&lt;/strong&gt;
A module for BANANAGLEE and BARGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BBALL&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BBALLOT&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BBANJO&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BCANDY&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BFLEA&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BMASSACRE&lt;/strong&gt;
A module for BANANAGLEE and BARGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BNSLOG&lt;/strong&gt;
A module for BANANAGLEE and BARGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BPATROL&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BPICKER&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BPIE&lt;/strong&gt;
A module for BANANAGLEE and BARGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BUSURPER&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CLUCKLINE&lt;/strong&gt;
A module for BANANAGLEE implants.&lt;/p&gt;

&lt;h2 id=&quot;tools&quot;&gt;Tools&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;BILLOCEAN&lt;/strong&gt;
Retrieves the serial number of a firewall, to be recorded in operation notes. Used in conjunction with EGREGIOUSBLUNDER for Fortigate firewalls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FOSHO&lt;/strong&gt;
A Python library for creating HTTP exploits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BARICE&lt;/strong&gt;
A tool that provides a shell for installing the BARGLEE implant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DURABLENAPKIN&lt;/strong&gt;
A tool for injecting packets on LANs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BANANALIAR&lt;/strong&gt;
A tool for connecting to an unspecified implant (likely BANANAGLEE).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PANDAROCK&lt;/strong&gt;
A tool for connecting to a POLARPAWS implant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TURBOPANDA&lt;/strong&gt;
A tool that can be used to communicate with a HALLUXWATER implant. Also mentioned in the previously leaked &lt;a href=&quot;https://leaksource.info/2013/12/30/nsas-ant-division-catalog-of-exploits-for-nearly-every-major-software-hardware-firmware/&quot;&gt;NSA ANT catalogue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TEFLONDOOR&lt;/strong&gt;
A self-destructing post-exploitation shell for executing an arbitrary file. The arbitrary file is first encrypted with a key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1212/DEHEX&lt;/strong&gt;
Converts hexademical strings to an IP addresses and ports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;XTRACTPLEASING&lt;/strong&gt;
Extracts something from a file and produces a PCAP file as output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOPEN&lt;/strong&gt;
A post-exploitation shell consisting of a client and a server that encrypts data using RC6. The server is installed on the target machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BENIGNCERTAIN&lt;/strong&gt;
A tool that appears to be for sending certain types of Internet Key Exchange (IKE) packets to a remote host and parsing the response.&lt;/p&gt;
</description>
        <pubDate>Tue, 16 Aug 2016 00:00:00 +0000</pubDate>
        <link>https://musalbas.com/blog/2016/08/16/equation-group-firewall-operations-catalogue.html</link>
        <guid isPermaLink="true">https://musalbas.com/blog/2016/08/16/equation-group-firewall-operations-catalogue.html</guid>
        
        
      </item>
    
      <item>
        <title>Security advisory - E-Detective Lawful Interception System</title>
        <description>&lt;p&gt;This is a security advisory (also &lt;a href=&quot;http://seclists.org/fulldisclosure/2015/Jun/42&quot;&gt;posted on the Full Disclosure mailing list&lt;/a&gt;) co-authored by &lt;a href=&quot;https://twitter.com/TheWack0lian&quot;&gt;slipstream/RoL&lt;/a&gt; and I, for multiple vulnerabilities in &lt;a href=&quot;http://www.edecision4u.com/index.html&quot;&gt;Decision Group&lt;/a&gt;’s &lt;a href=&quot;http://www.edecision4u.com/E-DETECTIVE.html&quot;&gt;E-Detective&lt;/a&gt; “Real-Time Network Forensics and Lawful Interception System”.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;E-Detective is a real-time Internet interception, monitoring and forensics system that captures, decodes, and reconstructs various types of Internet traffic. It is commonly used for organization Internet behavioral monitoring, auditing, record keeping, forensics analysis, and investigation, as well as, legal and lawful interception for lawful enforcement agencies such as Police Intelligence, Military Intelligence, Cyber Security Departments, National Security Agencies, Criminal Investigation Agencies, Counter Terrorism Agencies etc. It also can provide a compliance solution for many standards or acts like Sarbanes Oxley Act (SOX), HIPAA, GLBA, SEC, NASD, E-Discovery and many others.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Decision Group also &lt;a href=&quot;http://www.edecision4u.com/HTTPS-SSL.html&quot;&gt;claims&lt;/a&gt; that its products are used by “more than 100 law enforcement agencies”, including the National Security Bureau of the Republic of China.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Unauthenticated Local File Disclosure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;common/download.php&lt;/code&gt; script in the web root allows for unauthenticated users to read arbitrary files on the system. This may include database credentials and captured data intercepts.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;file&lt;/code&gt; URL query parameter of the script is “protected” by the following encoding which is trivially reversible: base64 followed by rot40.&lt;/p&gt;

&lt;p&gt;A &lt;a href=&quot;https://github.com/musalbas/edetective-poc/blob/master/pwned-detective.py&quot;&gt;proof of concept for this vulnerability is available on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Authenticated Remote Code Execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Combining this vulnerability with the Local File Disclosure vulnerability above can result in unauthenticated remote code execution.&lt;/p&gt;

&lt;p&gt;The restore feature on the “config backup” page extracts a .tar file encrypted with Blowfish using OpenSSL into the system’s root directory (/) as root.&lt;/p&gt;

&lt;p&gt;The .tar file must be encrypted with the static key &lt;code class=&quot;highlighter-rouge&quot;&gt;/tmp/.charlie&lt;/code&gt;. Yes, that’s the actual key - the software passes the wrong argument to OpenSSL. &lt;code class=&quot;highlighter-rouge&quot;&gt;-K&lt;/code&gt; is used to pass the keyfile instead of &lt;code class=&quot;highlighter-rouge&quot;&gt;-kfile&lt;/code&gt;, meaning that the key is the path of the keyfile rather than the contents of the keyfile.&lt;/p&gt;

&lt;p&gt;This allows an attacker to upload a shell into the web root, or overwrite any sensitive system files such as &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/shadow/&lt;/code&gt;.&lt;/p&gt;
</description>
        <pubDate>Sun, 14 Jun 2015 00:00:00 +0000</pubDate>
        <link>https://musalbas.com/blog/2015/06/14/e-detective-security-advisory.html</link>
        <guid isPermaLink="true">https://musalbas.com/blog/2015/06/14/e-detective-security-advisory.html</guid>
        
        
      </item>
    
      <item>
        <title>Making sound from the sentiment of Tweets</title>
        <description>&lt;p&gt;This a write up of a hack I originally co-authored as “Noisy Tweets” with &lt;a href=&quot;http://markormesher.co.uk/&quot;&gt;Mark Ormesher&lt;/a&gt;, &lt;a href=&quot;http://faresalaboud.me/&quot;&gt;Fares Alaboud&lt;/a&gt; and &lt;a href=&quot;http://krisi.me/&quot;&gt;Kristin Kasavetova&lt;/a&gt; at &lt;a href=&quot;https://mlh.io/&quot;&gt;MLH&lt;/a&gt; Launch Hack.&lt;/p&gt;

&lt;p&gt;Noisy Tweets is an application created in 24 hours that takes in a keyword as input, live-streams all tweets containing that keyword, analyses how happy or sad (sentiment) the tweets are, and plays different musical notes depending on how happy or sad the tweets are.&lt;/p&gt;

&lt;p&gt;The happier the general discussion, the higher the pitch of each note; the more tweets there are, the faster the notes play.&lt;/p&gt;

&lt;p&gt;I eventually refactored it into a live web application: &lt;a href=&quot;http://listentotwitter.com&quot;&gt;listentotwitter.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/img/listentotwitter-screenshot.png&quot; alt=&quot;Screenshot from listentotwitter.com&quot; /&gt;&lt;br /&gt;
&lt;em&gt;Screenshot from listentotwitter.com.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The backend of the web application is written in Python, using &lt;a href=&quot;http://flask.pocoo.org/&quot;&gt;Flask&lt;/a&gt; for the web server, &lt;a href=&quot;https://textblob.readthedocs.org/en/dev/&quot;&gt;TextBlob&lt;/a&gt; for sentiment analysis, and &lt;a href=&quot;http://socket.io/&quot;&gt;socket.io&lt;/a&gt; for real-time client communication.&lt;/p&gt;

&lt;p&gt;Admittedly, it sounds pretty bad from a musical perspective. It sounds a bit like the “&lt;a href=&quot;https://www.youtube.com/watch?v=RENk9PK06AQ&quot;&gt;world’s ugliest music&lt;/a&gt;”. Regardless, it was a fun experiment. There are perhaps way to make it sound more musical, but I don’t know much about making music that sounds good.&lt;/p&gt;
</description>
        <pubDate>Sat, 13 Jun 2015 00:00:00 +0000</pubDate>
        <link>https://musalbas.com/blog/2015/06/13/listen-to-twitter.html</link>
        <guid isPermaLink="true">https://musalbas.com/blog/2015/06/13/listen-to-twitter.html</guid>
        
        
      </item>
    
      <item>
        <title>Asteroids on Steroids</title>
        <description>&lt;p&gt;Asteroids on Steroids is a desktop game I developed in Python using the &lt;a href=&quot;http://pygame.org&quot;&gt;Pygame&lt;/a&gt; library in the summer of 2012, when I was 17.&lt;/p&gt;

&lt;p&gt;It was my first ever Python project, and although the code for this project is pretty horrible and unstructured, I’ve been hooked on Python ever since and use it for almost everything.&lt;/p&gt;

&lt;p&gt;The idea for the game is to make it possible to play the classic arcade game Asteroids with anything - not just asteroids. Instead of shooting asteroids, you can shoot elements of any image you specify. There’s also a desktop mode that allows you to shoot at your computer desktop.&lt;/p&gt;

&lt;p&gt;The game automatically determines what the different elements (or “asteroids”) of the user-specified image are. It does this by considering which regions of the image are connected by the same (or similar) colour. This method was inspired by the &lt;a href=&quot;http://docs.gimp.org/en/gimp-tool-fuzzy-select.html&quot;&gt;fuzzy selection tool in GIMP&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Initially, I attempted to implement my own fuzzy selection algorithm in raw Python using a queue-based implementation, but I quickly realised that Python and scripting languages in general were way too slow (for a responsive game) to process the millions of pixels in an image on their own. My implementation in Python took several minutes per image to execute. I eventually found &lt;a href=&quot;http://opencv.org/&quot;&gt;OpenCV&lt;/a&gt;, an image processing library available for Python that had a “fuzzy selection”-type function (in the end it was probably unnecessary because Pygame itself has a “fuzzy selection”-type function).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/musalbas/Asteroids-on-Steroids&quot;&gt;The source code for the game is available on GitHub.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/img/Asteroids-on-Steroids/gameplay_shot_1.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;A screenshot of gameplay in desktop mode, on an Ubuntu desktop.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/img/Asteroids-on-Steroids/gameplay_shot_2.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;A screenshot of gameplay when an image of Barack Obama’s face is used as input.&lt;/em&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 03 Aug 2014 11:00:00 +0000</pubDate>
        <link>https://musalbas.com/blog/2014/08/03/asteroids-on-steroids.html</link>
        <guid isPermaLink="true">https://musalbas.com/blog/2014/08/03/asteroids-on-steroids.html</guid>
        
        
      </item>
    
      <item>
        <title>Musical Packets</title>
        <description>&lt;p&gt;Earlier this year I attended &lt;a href=&quot;http://www.studenthack.com/&quot;&gt;StudentHack&lt;/a&gt; and formed a team with &lt;a href=&quot;http://faresalaboud.me/&quot;&gt;Fares Alaboud&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/spoffeh&quot;&gt;Callum Spawforth&lt;/a&gt;. For 24 hours we worked on a project called &lt;a href=&quot;https://github.com/musalbas/musicalpackets&quot;&gt;Musical Packets&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Musical Packets is a Python application that listens to your aggregate network traffic and plays it back as music! It also comes with a web interface that visualises the aggregate packets received.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/img/musicalpackets-screen.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;Musical Packets web interface.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The way it works at the moment is by converting the rate of packets received per second to a musical tone. Although it sounds pretty good as it is right now, the original idea (which wasn’t developed further due to the 24 hours time constraint) was to assign a different instrument to each network protocol or port. For example, HTTP would sound different than HTTPS.&lt;/p&gt;

&lt;p&gt;The application also logs packets into a MongoDB database, so it has the capability of playing back the musical packets.&lt;/p&gt;

&lt;p&gt;The project won two of the six prizes at StudentHack:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Best Use of MongoHQ&lt;/li&gt;
  &lt;li&gt;Best Fresher Hack&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/musalbas/musicalpackets&quot;&gt;The source code is available on GitHub.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/img/studenthack.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;From left to right: Callum Spawforth, me and Fares Alaboud.&lt;/em&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 03 Aug 2014 10:00:00 +0000</pubDate>
        <link>https://musalbas.com/blog/2014/08/03/musical-packets.html</link>
        <guid isPermaLink="true">https://musalbas.com/blog/2014/08/03/musical-packets.html</guid>
        
        
      </item>
    
      <item>
        <title>First they came...</title>
        <description>&lt;p&gt;&lt;img src=&quot;/blog/img/apollo-11.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;The NSA is spying on every single person in this photo, because everybody in existence is in this photo (except for Neil Armstrong and Michael Collins).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;First they came for the &lt;a href=&quot;http://www.zdnet.com/nsa-targets-sysadmin-personal-accounts-to-exploit-networks-7000027553/&quot;&gt;sysadmins&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a sysadmin.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;http://www.bbc.co.uk/news/technology-28162273&quot;&gt;Tor users&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a Tor user.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;http://thehill.com/blogs/blog-briefing-room/news/316751-snowden-nsa-targeted-journalists-critical-of-government-after-911&quot;&gt;journalists&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a journalist.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;https://firstlook.org/theintercept/article/2014/07/09/under-surveillance/&quot;&gt;civil rights leaders&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a civil rights leader.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;http://www.huffingtonpost.com/2014/07/09/nsa-glenn-greenwald_n_5545686.html&quot;&gt;politically active&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not politically active.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;http://edition.cnn.com/2013/12/09/tech/web/nsa-spying-video-games/&quot;&gt;World of Warcraft players&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a World of Warcraft player.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;https://firstlook.org/theintercept/2014/04/04/cuban-twitter-scam-social-media-tool-disseminating-government-propaganda/&quot;&gt;Cubans&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a Cuban.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;https://firstlook.org/theintercept/2014/05/20/bahamas-wants-know-nsa-recording-phone-calls/&quot;&gt;Bahamians&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a Bahamian.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;http://boingboing.net/2014/02/25/nsa-and-gchqs-dirty-tricking.html&quot;&gt;protest groups&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not in a protest group.&lt;/p&gt;

&lt;p&gt;Then they came for the &lt;a href=&quot;http://www.huffingtonpost.com/2013/11/26/nsa-porn-muslims_n_4346128.html&quot;&gt;wankers&lt;/a&gt;, and I did not speak out—&lt;br /&gt;
Because I was not a wanker (but they are).&lt;/p&gt;

&lt;p&gt;Then they came for me—and there was no one left to speak for me.&lt;/p&gt;
</description>
        <pubDate>Wed, 09 Jul 2014 00:00:00 +0000</pubDate>
        <link>https://musalbas.com/blog/2014/07/09/first-they-came.html</link>
        <guid isPermaLink="true">https://musalbas.com/blog/2014/07/09/first-they-came.html</guid>
        
        
      </item>
    
  </channel>
</rss>
