<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-469193354808242650</atom:id><lastBuildDate>Tue, 02 Jun 2026 10:50:18 +0000</lastBuildDate><category>VPN</category><category>ap</category><category>cyber</category><category>cybersecurity</category><category>deception</category><category>detection</category><category>honeypot</category><category>internet</category><category>internet of things</category><category>new</category><category>rogue</category><category>security</category><category>wifi</category><title>Jason Gardner&#39;s Cybersecurity Research Blog</title><description></description><link>http://jgardnerla.blogspot.com/</link><managingEditor>noreply@blogger.com (iAmTheRealJason)</managingEditor><generator>Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-6628299612751851035</guid><pubDate>Tue, 02 Jun 2026 03:22:55 +0000</pubDate><atom:updated>2026-06-02T03:50:18.415-07:00</atom:updated><title>Independent Replication of CVE‑2026‑0073: A Study in ADB Protocol Authentication Bypass</title><description>&lt;h2&gt;&lt;span&gt;Abstract&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;This
 report documents the independent re‑implementation of an exploit for 
CVE‑2026‑0073, a critical authentication bypass in the Android Debug 
Bridge daemon (&lt;/span&gt;&lt;code&gt;adbd&lt;/code&gt;&lt;span&gt;). The 
vulnerability arises from a type‑confusion error in the comparison of 
TLS client certificate public keys, enabling an unauthenticated network 
peer to obtain an ADB shell. The goal of this work was not to produce a 
novel attack, but to achieve a deep, practical understanding of the 
vulnerability through hands‑on reproduction on a physical device. We 
describe the ADB‑over‑TLS protocol, the logical defect in &lt;/span&gt;&lt;code&gt;adbd_tls_verify_cert()&lt;/code&gt;&lt;span&gt;,
 and the practical challenges encountered when targeting a Samsung 
Galaxy A22 (SM‑A225F). My experience highlights the gap between 
theoretical vulnerability descriptions and the engineering demands of 
real‑world exploit development, underscoring the value of independent 
replication in security research.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;1. Introduction&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;On
 5 May 2026, the Android Security Bulletin disclosed CVE‑2026‑0073, a 
critical‑severity vulnerability in the ADB daemon’s TLS authentication 
path. The flaw permits a remote, unauthenticated attacker on the local 
network to bypass ADB host verification and execute arbitrary commands 
as the &lt;/span&gt;&lt;code&gt;shell&lt;/code&gt;&lt;span&gt; user. The original 
discovery and detailed analysis were published by BARGHEST, whose work 
provided both a lucid explanation of the bug and a functional 
proof‑of‑concept.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;While
 the public availability of an exploit makes the vulnerability 
accessible, the educational value of reconstructing such an exploit from
 first principles is substantial. This report presents our independent 
effort to replicate the attack against a Samsung Galaxy A22, a mid‑range
 device running Android 13. We emphasize that no new vulnerability is 
claimed; rather, we document the protocol intricacies, implementation 
obstacles, and lessons learned during the replication process. All 
findings are consistent with the public advisory, and no unpatched 
devices beyond the tested unit were targeted.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;2. Background&lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span&gt;2.1 ADB Wireless Debugging&lt;/span&gt;&lt;/h3&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;Modern
 Android devices support wireless debugging, which exposes the ADB 
service over TCP. The connection process involves several phases:&lt;/span&gt;&lt;/p&gt;&lt;ol start=&quot;1&quot;&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;Plaintext ADB handshake:&lt;/span&gt;&lt;/b&gt;&lt;span&gt; The client sends a &lt;/span&gt;&lt;code&gt;CNXN&lt;/code&gt;&lt;span&gt; packet advertising supported features, including &lt;/span&gt;&lt;code&gt;tls_auth&lt;/code&gt;&lt;span&gt;. The device responds with an &lt;/span&gt;&lt;code&gt;STLS&lt;/code&gt;&lt;span&gt; packet, indicating that the transport must be upgraded to TLS.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;TLS 1.3 mutual authentication:&lt;/span&gt;&lt;/b&gt;&lt;span&gt;
 The client initiates a TLS 1.3 handshake and presents a client 
certificate. The server (adbd) verifies this certificate against the set
 of authorized host keys stored in &lt;/span&gt;&lt;code&gt;/data/misc/adb/adb_keys&lt;/code&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;Post‑TLS ADB exchange:&lt;/span&gt;&lt;/b&gt;&lt;span&gt;
 Upon successful verification, normal ADB packets flow inside the 
encrypted tunnel, allowing the client to open service streams (e.g., a 
shell).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The
 critical security property is that only a host possessing the private 
key corresponding to a previously paired RSA public key should be able 
to complete the TLS handshake.&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;2.2 The Vulnerability (CVE‑2026‑0073)&lt;/span&gt;&lt;/h3&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The vulnerability resides in the function &lt;/span&gt;&lt;code&gt;adbd_tls_verify_cert()&lt;/code&gt;&lt;span&gt; within the ADB module’s &lt;/span&gt;&lt;code&gt;auth.cpp&lt;/code&gt;&lt;span&gt;. The relevant code fragment (prior to patching) is:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;md-code-block md-code-block-light&quot;&gt;&lt;div class=&quot;md-code-block-banner-wrap&quot;&gt;&lt;div class=&quot;md-code-block-banner md-code-block-banner-lite&quot;&gt;&lt;div class=&quot;_121d384&quot;&gt;&lt;div class=&quot;d2a24f03&quot;&gt;&lt;span class=&quot;d813de27&quot;&gt;c&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;span&gt;&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;EVP_PKEY_cmp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;known_evp&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; evp_pkey&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class=&quot;token function&quot;&gt;VLOG&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;AUTH&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Matched auth_key=&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; public_key&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    verified &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; true&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;svg class=&quot;_9bc997d _33882ae&quot; fill=&quot;none&quot; height=&quot;12&quot; viewbox=&quot;0 0 12 12&quot; width=&quot;12&quot;&gt;&lt;/svg&gt;&lt;svg class=&quot;_9bc997d _28d7e84&quot; fill=&quot;none&quot; height=&quot;12&quot; viewbox=&quot;0 0 12 12&quot; width=&quot;12&quot;&gt;&lt;/svg&gt;&lt;/div&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;code&gt;EVP_PKEY_cmp()&lt;/code&gt;&lt;span&gt; returns an integer with the following semantics:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;code&gt;1&lt;/code&gt;&lt;span&gt; – keys are equal&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;code&gt;0&lt;/code&gt;&lt;span&gt; – keys of the same type differ&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;code&gt;-1&lt;/code&gt;&lt;span&gt; – key types differ&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;code&gt;-2&lt;/code&gt;&lt;span&gt; – operation not supported&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;In C, any non‑zero value evaluates to &lt;/span&gt;&lt;code&gt;true&lt;/code&gt;&lt;span&gt; in a conditional context. Therefore, when the function returns &lt;/span&gt;&lt;code&gt;-1&lt;/code&gt;&lt;span&gt; (indicating different key types), the condition &lt;/span&gt;&lt;code&gt;if (EVP_PKEY_cmp(...))&lt;/code&gt;&lt;span&gt; still succeeds—because &lt;/span&gt;&lt;code&gt;-1&lt;/code&gt;&lt;span&gt;
 is truthy. This allows an attacker who presents a certificate with a 
non‑RSA key (e.g., EC or Ed25519) against a stored RSA key to satisfy 
the check and be incorrectly authorized. The fix, distributed in the May
 2026 security patch, changes the condition to &lt;/span&gt;&lt;code&gt;EVP_PKEY_cmp(...) == 1&lt;/code&gt;&lt;span&gt;, so that only an exact match grants access.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;3. Methodology&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;We undertook a from‑scratch implementation of the exploit in Python, using only the &lt;/span&gt;&lt;code&gt;cryptography&lt;/code&gt;&lt;span&gt; library for certificate generation and Python’s standard &lt;/span&gt;&lt;code&gt;ssl&lt;/code&gt;&lt;span&gt;
 module for the TLS handshake. The target device was a Samsung Galaxy 
A22 (SM‑A225F) running Android 13 with security patch level prior to May
 2026. The device had previously been paired via USB, ensuring at least 
one RSA key in the trust store.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The implementation was broken into three phases:&lt;/span&gt;&lt;/p&gt;&lt;ol start=&quot;1&quot;&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;ADB transport emulation:&lt;/span&gt;&lt;/b&gt;&lt;span&gt; Implementing the packet framing, checksums, and the &lt;/span&gt;&lt;code&gt;CNXN&lt;/code&gt;&lt;span&gt;/&lt;/span&gt;&lt;code&gt;STLS&lt;/code&gt;&lt;span&gt; exchange.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;TLS handshake with a cross‑type certificate:&lt;/span&gt;&lt;/b&gt;&lt;span&gt; Generating a self‑signed EC P‑256 certificate and integrating it into a TLS 1.3 client context.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;Post‑TLS service access:&lt;/span&gt;&lt;/b&gt;&lt;span&gt; Opening a &lt;/span&gt;&lt;code&gt;shell&lt;/code&gt;&lt;span&gt; stream and reading command output.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;&lt;span&gt;4. Implementation Challenges&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;Despite
 the conceptual simplicity of the bug, practical exploitation demanded 
careful attention to protocol details and device‑specific behaviour.&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;4.1 TLS Version Requirements&lt;/span&gt;&lt;/h3&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The
 initial development environment utilized the system Python, which was 
linked against LibreSSL 2.8.3. This library does not support TLS 1.3, 
which the target device required. The problem was resolved by creating a
 virtual environment that used a Homebrew‑installed OpenSSL 3.6.2, which
 provides full TLS 1.3 support.&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;4.2 Samsung‑Specific STLS Flooding&lt;/span&gt;&lt;/h3&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The most significant obstacle emerged after the TLS handshake. The Samsung A22 emitted a continuous stream of &lt;/span&gt;&lt;code&gt;STLS&lt;/code&gt;&lt;span&gt; packets before sending the expected &lt;/span&gt;&lt;code&gt;CNXN&lt;/code&gt;&lt;span&gt; banner. In a naïve implementation, the main thread blocked while waiting for &lt;/span&gt;&lt;code&gt;CNXN&lt;/code&gt;&lt;span&gt;, causing timeouts. Experiments with background draining threads and manual pre‑drains did not fully resolve the issue.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The key insight came from observing that the device would accept a service &lt;/span&gt;&lt;code&gt;OPEN&lt;/code&gt;&lt;span&gt; request even before sending its own &lt;/span&gt;&lt;code&gt;CNXN&lt;/code&gt;&lt;span&gt;. By transmitting the &lt;/span&gt;&lt;code&gt;OPEN shell:&amp;lt;command&amp;gt;&lt;/code&gt;&lt;span&gt; packet &lt;/span&gt;&lt;i&gt;&lt;span&gt;immediately&lt;/span&gt;&lt;/i&gt;&lt;span&gt; after the TLS handshake—without waiting for any device‑initiated messages—the host elicited both the &lt;/span&gt;&lt;code&gt;CNXN&lt;/code&gt;&lt;span&gt; (confirming authentication bypass) and an &lt;/span&gt;&lt;code&gt;OKAY&lt;/code&gt;&lt;span&gt;
 for the shell in immediate succession. This ordering inverted the 
intuitive “receive then send” sequence and circumvented the STLS flood 
entirely.&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;4.3 Stream Management&lt;/span&gt;&lt;/h3&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;Once the shell stream was established, standard ADB flow control was required: acknowledging &lt;/span&gt;&lt;code&gt;WRTE&lt;/code&gt;&lt;span&gt; packets with &lt;/span&gt;&lt;code&gt;OKAY&lt;/code&gt;&lt;span&gt; and terminating on &lt;/span&gt;&lt;code&gt;CLSE&lt;/code&gt;&lt;span&gt;. Stray &lt;/span&gt;&lt;code&gt;STLS&lt;/code&gt;&lt;span&gt;
 packets continued to appear during the session, necessitating a 
filtering loop that discarded them silently. With these final 
adjustments, command execution became reliable.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;5. Results&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The
 final implementation consistently demonstrated the authentication 
bypass and obtained command execution on the Samsung A22. The following 
is sample&amp;nbsp;&lt;/span&gt;output:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;md-code-block md-code-block-light&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKItoVaqPEk6V7vOEVTwHOTSq6W6xwEDy0IrBSMMXaN-zxSmN5OZKNViiPS3GberQkovle5diu8eokH-xLO8RfJOoPLtBy8EfEGh-Qc5lxM7rrPYj6yqX8veGYmvjDaDc8NvU3HbbbUgZn59Sh7RYxSj22SrPNvpiWXxccHtTBceSfHtf0RatSGLBWgGIL/s2082/a22PoC1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;754&quot; data-original-width=&quot;2082&quot; height=&quot;281&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKItoVaqPEk6V7vOEVTwHOTSq6W6xwEDy0IrBSMMXaN-zxSmN5OZKNViiPS3GberQkovle5diu8eokH-xLO8RfJOoPLtBy8EfEGh-Qc5lxM7rrPYj6yqX8veGYmvjDaDc8NvU3HbbbUgZn59Sh7RYxSj22SrPNvpiWXxccHtTBceSfHtf0RatSGLBWgGIL/w776-h281/a22PoC1.png&quot; width=&quot;776&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The exploit achieved remote code execution as the &lt;/span&gt;&lt;code&gt;shell&lt;/code&gt;&lt;span&gt; user in the &lt;/span&gt;&lt;code&gt;u:r:shell:s0&lt;/code&gt;&lt;span&gt; SELinux context, consistent with the impact described in the original advisory.&lt;br /&gt;&lt;br /&gt;I built out the PoC with a few variations to see the impact and here you can see that I was able to launch chrome and open a link to my website at thejasongardner.com.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;600&#39; height=&#39;499&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dwev04aFGVFXbZPV4zdYz2CHEGBXVSO_Bwj56sHEvb-DcPv0RAy7RcN0zEZVJSM9GCzdApTgDUG9m2E-uZBXQ&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;6. Discussion&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The replication effort illuminated several important aspects of vulnerability research:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;Protocol state machines are fragile.&lt;/span&gt;&lt;/b&gt;&lt;span&gt; The ADB‑over‑TLS handshake is not purely linear; implementations may interleave &lt;/span&gt;&lt;code&gt;STLS&lt;/code&gt;&lt;span&gt; notifications, requiring adaptive message ordering.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;Library dependency management is critical.&lt;/span&gt;&lt;/b&gt;&lt;span&gt;
 A mismatch between development and target environments (LibreSSL vs. 
OpenSSL) can stall progress, underscoring the importance of reproducible
 build configurations.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;Independent replication is a powerful learning tool.&lt;/span&gt;&lt;/b&gt;&lt;span&gt;
 While the vulnerability itself is well‑understood, the engineering 
process of reconstructing the exploit deepened our understanding of both
 the bug and the Android ADB architecture.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;It is noteworthy that the Samsung A22 exhibited the &lt;/span&gt;&lt;code&gt;STLS&lt;/code&gt;&lt;span&gt;
 flooding behavior, which was not detailed in public write‑ups. This 
device‑specific quirk does not constitute a new vulnerability, but it 
illustrates the diversity of real‑world implementations and the 
challenge of creating universally robust exploits.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;7. Conclusion&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;We
 have successfully replicated CVE‑2026‑0073 on a Samsung Galaxy A22, 
confirming the vulnerability’s exploitability under the documented 
pre‑conditions. The project served as an educational exercise in 
protocol analysis, cryptographic API pitfalls, and the practical art of 
exploit development. All credit for the original discovery belongs to 
BARGHEST and the Android security team; this work is merely a 
reconstruction that validates and learns from their findings.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;Acknowledgements&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;span&gt;The authors thank BARGHEST for their detailed public analysis of CVE‑2026‑0073 which helped with my analysis.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;p class=&quot;ds-markdown-paragraph&quot;&gt;&lt;b&gt;&lt;span&gt;Disclaimer:&lt;/span&gt;&lt;/b&gt;&lt;span&gt;
 No novel vulnerabilities are disclosed in this report. The described 
exploit relies on a publicly known, patched issue. The author does not 
distribute exploit code and does not encourage unauthorized access to 
devices. Author encourages users to update to the latest security patch as per Android&amp;nbsp;&lt;/span&gt;&quot;Security patch levels of 2026-05-01 or later address
    all issues associated with the 2026-05-01 security patch
    level&quot;.&amp;nbsp;&lt;a href=&quot;https://source.android.com/docs/security/bulletin/2026/2026-05-01&quot;&gt;https://source.android.com/docs/security/bulletin/2026/2026-05-01&lt;/a&gt;&lt;/p&gt;</description><link>http://jgardnerla.blogspot.com/2026/06/independent-replication-of-cve20260073.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKItoVaqPEk6V7vOEVTwHOTSq6W6xwEDy0IrBSMMXaN-zxSmN5OZKNViiPS3GberQkovle5diu8eokH-xLO8RfJOoPLtBy8EfEGh-Qc5lxM7rrPYj6yqX8veGYmvjDaDc8NvU3HbbbUgZn59Sh7RYxSj22SrPNvpiWXxccHtTBceSfHtf0RatSGLBWgGIL/s72-w776-h281-c/a22PoC1.png" height="72" width="72"/><georss:featurename>Los Angeles International Airport (LAX), 1 World Wy, Los Angeles, CA 90045, USA</georss:featurename><georss:point>33.942153 -118.4036052</georss:point><georss:box>20.107744994977693 -135.98173020000002 47.7765610050223 -100.8254802</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-6933175042771992061</guid><pubDate>Sun, 22 Dec 2024 16:00:00 +0000</pubDate><atom:updated>2024-12-22T09:16:51.225-08:00</atom:updated><title>Dynamic Hooking and Overwriting of Native Android Password Validation Using Frida</title><description>
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;&lt;/meta&gt;
    &lt;meta content=&quot;width=device-width, initial-scale=1.0&quot; name=&quot;viewport&quot;&gt;&lt;/meta&gt;
    &lt;title&gt;Dynamic Hooking: Bypassing Android Password Validation and Manipulating UI with Frida&lt;/title&gt;
 &lt;style&gt;
    body {
        font-family: &quot;Arial&quot;, sans-serif;
        background-color: #F4F4F9;
        color: #2C3E50;
        margin: 0;
        padding: 20px;
        line-height: 1.6;
    }

    h1, h2, h3 {
        color: #2C3E50;
        font-weight: 600;
        border-bottom: 2px solid #B0BEC5;
        padding-bottom: 5px;
        margin-bottom: 15px;
    }

    pre {
        background-color: #ECEFF1;
        color: #37474F;
        padding: 15px;
        border: 1px solid #CFD8DC;
        border-radius: 5px;
        overflow-x: auto;
        font-size: 14px;
    }

    code {
        font-family: &quot;Consolas&quot;, monospace;
        background-color: #ECEFF1;
        color: #37474F;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #CFD8DC;
    }

    .command {
        color: #455A64;
        display: block;
        margin: 10px 0;
        font-weight: bold;
        font-size: 15px;
    }

    a {
        color: #0074D9;
        text-decoration: none;
        border-bottom: 1px dotted #0074D9;
    }

    a:hover {
        text-decoration: underline;
        color: #0056B3;
    }

    .highlight {
        color: #D32F2F;
        font-weight: bold;
    }

    table {
        width: 80%;
        border-collapse: collapse;
        margin-bottom: 20px;
        font-size: 14px;
    }

    table th, table td {
        padding: 10px;
        text-align: left;
        border: 1px solid #CFD8DC;
    }

    table th {
        background-color: #ECEFF1;
        font-weight: 600;
    }

    table tbody tr:nth-child(even) {
        background-color: #FAFAFA;
    }

    button {
        background-color: #2C3E50;
        color: white;
        border: none;
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 3px;
        cursor: pointer;
    }

    button:hover {
        background-color: #37474F;
    }

    .footer {
        text-align: center;
        color: #78909C;
        font-size: 12px;
        margin-top: 20px;
    }

    /* Custom scrollbar */
    ::-webkit-scrollbar {
        width: 10px;
    }

    ::-webkit-scrollbar-track {
        background: #F4F4F9;
    }

    ::-webkit-scrollbar-thumb {
        background: #B0BEC5;
        border-radius: 5px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #90A4AE;
    }
   /* Ensures all images are responsive and maintain aspect ratio */
.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* Center the images */
}

/* Optional: Adds a uniform border around images for a polished look */
.blog-content img {
    border: 2px solid #ddd; /* Light gray border */
    border-radius: 5px; /* Slightly rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    padding: 5px; /* Space between the image and border */
}

/* Limits images to a consistent maximum height */
.blog-content img {
    max-height: 500px; /* Adjust as needed */
    object-fit: cover; /* Ensures cropped images look good */
}
&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Dynamic Hooking: Bypassing Android Password Validation and Manipulating UI with Frida&lt;/h1&gt;

    &lt;h2&gt;Introduction&lt;/h2&gt;
    &lt;p&gt;In this exploration, we leverage &lt;span class=&quot;highlight&quot;&gt;Frida&lt;/span&gt;, a powerful dynamic instrumentation toolkit, to manipulate native Android password validation logic and manipulate UI elements programatically. These techniques showcase how we can reveal vulnerabilities and assess applications.&lt;/p&gt;

    &lt;h2&gt;Password Validation Hooking&lt;/h2&gt;
    &lt;p&gt;We begin by dynamically intercepting the password validation function in the native library. The library &lt;code&gt;libnative-lib.so&lt;/code&gt; serves as the artifact providing the functionality, and the script attaches to the function &lt;code&gt;Java_com_optiv_ndkcrackme_MainActivity_b&lt;/code&gt;, which is responsible for handling password validation:&lt;/p&gt;

    &lt;pre&gt;
&lt;code&gt;Java.perform(function () {
    var lib = Module.findExportByName(&quot;libnative-lib.so&quot;, &quot;Java_com_optiv_ndkcrackme_MainActivity_b&quot;);

    if (lib) {
        Interceptor.attach(lib, {
            onEnter: function (args) {
                console.log(&quot;Password input: &quot; + Memory.readUtf8String(args[1]));
            },
            onLeave: function (retval) {
                console.log(&quot;Original return value: &quot; + retval.toInt32());
                retval.replace(1); // Force valid password
                console.log(&quot;Modified return value: &quot; + retval.toInt32());
            }
        });
        console.log(&quot;Password bypass hook installed.&quot;);
    } else {
        console.log(&quot;Target function not found.&quot;);
    }
});&lt;/code&gt;
    &lt;/pre&gt;

    &lt;p&gt;Note: The app must be in the foreground to ensure that the native library is loaded into memory and accessible for hooking.&lt;/p&gt;

    &lt;div style=&quot;text-align: center;&quot;&gt;
        &lt;img alt=&quot;Password bypass screenshot&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhsK5FKMFBsUiH92dsLM-qSs75gc7Geg_SGyBnMugCiO3N_b4CW8M3DwPnGsX95mvBoP3Z23MxF78RVqLqtXjWVQUlTTDxkuMPSC8Wn9do35nTQNFrzGTI79tgTCODvU7BXdj3w8OTtFDonq46Nsc1mNtbsHShXVJ-xBGEioxlB8JYfVNiHTrLBiBoAzX7/s1600/Screenshot%202024-12-20%20at%203.04.52%E2%80%AFAM.png&quot; width=&quot;300&quot; /&gt;
        &lt;p&gt;&lt;em&gt;Figure 1: Demonstrating password bypass with Frida&lt;/em&gt;&lt;/p&gt;
    &lt;/div&gt;

    &lt;h2&gt;Method Hooking for Password Validation&lt;/h2&gt;
    &lt;p&gt;After enumerating the methods available in &lt;code&gt;MainActivity&lt;/code&gt;, we identified &lt;code&gt;b(String)&lt;/code&gt; as the method responsible for password validation. Using Frida, we can hook this method and implement custom logic for password verification. This allows us to specify certain passwords that should be accepted or rejected dynamically during runtime.&lt;/p&gt;

    &lt;h3&gt;Implementation&lt;/h3&gt;
    &lt;p&gt;The following script overrides the behavior of &lt;code&gt;b(String)&lt;/code&gt; in &lt;code&gt;MainActivity&lt;/code&gt;. It accepts the password &lt;span class=&quot;highlight&quot;&gt;&quot;correctPassword&quot;&lt;/span&gt; and rejects &lt;span class=&quot;highlight&quot;&gt;&quot;securePassword123&quot;&lt;/span&gt;, while defaulting to the original validation logic for other inputs:&lt;/p&gt;

    &lt;pre&gt;
&lt;code&gt;Java.perform(function () {
    var MainActivity = Java.use(&quot;com.optiv.ndkcrackme.MainActivity&quot;);

    MainActivity.b.implementation = function (password) {
        console.log(&quot;Password validation called with input: &quot; + password);

        if (password === &quot;correctPassword&quot;) {
            console.log(&quot;Accepting password: &quot; + password);
            return true; // Accept &quot;correctPassword&quot;
        } else if (password === &quot;securePassword123&quot;) {
            console.log(&quot;Rejecting password: &quot; + password);
            return false; // Reject &quot;securePassword123&quot;
        }

        // Call original method for other inputs
        var result = this.b(password);
        console.log(&quot;Original return value: &quot; + result);
        return result;
    };
});&lt;/code&gt;
    &lt;/pre&gt;


    &lt;p&gt;Running this script produces the following results. We see a specific password is allowed and one is explicitly denied access:&lt;/p&gt;


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center; padding: 1em 0;&quot;&gt;
    &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibWJx37QttxJX7O9ReuTXqQuS0EtDthSNMmx_Jt6nbeKpERrbSyeFsVjXQpAMMJCDsi9rzxxpjb48euQKc97J_q_C06YB21jQgiAMkppUcsMzk-8zPDft6dLWLazCfRJU0niB7oeMMK5UOWVtNrhfxB01BV5p-MGgoqW7crXp6SE4XwZXa5YpzlxjISYTO/s1600/Screenshot%202024-12-21%20at%204.29.20%E2%80%AFPM.png&quot; target=&quot;_blank&quot;&gt;
        &lt;img alt=&quot;Screenshot&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibWJx37QttxJX7O9ReuTXqQuS0EtDthSNMmx_Jt6nbeKpERrbSyeFsVjXQpAMMJCDsi9rzxxpjb48euQKc97J_q_C06YB21jQgiAMkppUcsMzk-8zPDft6dLWLazCfRJU0niB7oeMMK5UOWVtNrhfxB01BV5p-MGgoqW7crXp6SE4XwZXa5YpzlxjISYTO/s1600/Screenshot%202024-12-21%20at%204.29.20%E2%80%AFPM.png&quot; style=&quot;max-width: 300px; height: auto; border: 2px solid #ddd; border-radius: 5px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);&quot; /&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center; padding: 1em 0;&quot;&gt;
    &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXMn5-AHMk_ZTcC28nSRbxoothTfsxOZi48lGubrYe5dhbxFR9EP42xJc38XrFoDd2WvBoO4nGOJwDxsCsxcz2t5VNEob8PtuH473jzAaThyphenhyphenoV16OlduOGho2l27s24EH1V2PyLcSaggoDPCpeAE1V3baCidxjnmHdzlA64h6npbA6WsJ_ej9vbbrQWzGZ/s1600/Screenshot%202024-12-21%20at%204.32.09%E2%80%AFPM.png&quot; target=&quot;_blank&quot;&gt;
        &lt;img alt=&quot;Screenshot&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXMn5-AHMk_ZTcC28nSRbxoothTfsxOZi48lGubrYe5dhbxFR9EP42xJc38XrFoDd2WvBoO4nGOJwDxsCsxcz2t5VNEob8PtuH473jzAaThyphenhyphenoV16OlduOGho2l27s24EH1V2PyLcSaggoDPCpeAE1V3baCidxjnmHdzlA64h6npbA6WsJ_ej9vbbrQWzGZ/s1600/Screenshot%202024-12-21%20at%204.32.09%E2%80%AFPM.png&quot; style=&quot;max-width: 300px; height: auto; border: 2px solid #ddd; border-radius: 5px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);&quot; /&gt;
    &lt;/a&gt;
&lt;/div&gt;



    &lt;pre&gt;
&lt;code&gt;Password validation called with input: securePassword123
Rejecting password: securePassword123
Password validation called with input: correctPassword
Accepting password: correctPassword&lt;/code&gt;
    &lt;/pre&gt;

    &lt;p&gt;This demonstrates how dynamic method hooking can be used to manipulate application behavior, enabling targeted testing and analysis of password validation logic.&lt;/p&gt;

    &lt;h2&gt;Text Replacement Hook&lt;/h2&gt;
    &lt;p&gt;The following section discusses the dynamic text replacement hook implemented using Frida. This script intercepts calls to the &lt;code&gt;setText&lt;/code&gt; method of &lt;code&gt;android.widget.TextView&lt;/code&gt;, replacing specific text values at runtime. The technique demonstrates how UI manipulation can enhance application testing and highlight potential vulnerabilities.&lt;/p&gt;

    &lt;h3&gt;Implementation&lt;/h3&gt;
    &lt;p&gt;The script attaches to all overloads of the &lt;code&gt;setText&lt;/code&gt; method, replacing occurrences of &lt;span class=&quot;highlight&quot;&gt;&quot;Password rejected!&quot;&lt;/span&gt; with &lt;span class=&quot;highlight&quot;&gt;&quot;Access granted!&quot;&lt;/span&gt;. This ensures a seamless user experience modification, allowing us to bypass textual restrictions dynamically.&lt;/p&gt;

    &lt;pre&gt;
&lt;code&gt;Java.perform(function () {
    console.log(&quot;Starting text replacer...&quot;);

    var TextView = Java.use(&quot;android.widget.TextView&quot;);

    TextView.setText.overloads.forEach(function (overload) {
        overload.implementation = function (arg1) {
            if (arg1 &amp;amp;&amp;amp; arg1.toString) {
                var originalText = arg1.toString();
                console.log(&quot;Original Text: &quot; + originalText);

                // Prevent modifying already modified text
                if (!originalText.includes(&quot;Access granted&quot;)) {
                    var replacedText = originalText.replace(&quot;Password rejected!&quot;, &quot;Access granted!&quot;);
                    console.log(&quot;Replaced Text: &quot; + replacedText);

                    // Ensure correct type
                    var javaString = Java.use(&quot;java.lang.String&quot;).$new(replacedText);
                    return overload.call(this, javaString);
                }
            }
            return overload.call(this, arg1);
        };
    });

    console.log(&quot;Text replacer installed.&quot;);
});&lt;/code&gt;
    &lt;/pre&gt;

    &lt;h3&gt;Execution and Output&lt;/h3&gt;
    &lt;p&gt;Running the script outputs detailed logs of original and replaced text values:&lt;/p&gt;

    &lt;pre&gt;
&lt;code&gt;Starting text replacer...
Text replacer installed.
Original Text: Password rejected!
Replaced Text: Access granted!
Original Text: Access granted!
Original Text: Value NOT found.
Replaced Text: Value NOT found.
Original Text: Value stored!
Replaced Text: Value stored!&lt;/code&gt;
    &lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center; padding: 1em 0;&quot;&gt;
    &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig52wFGIAc8quphm4JlmU57-PznouWBWqds3w2aM0yJlG9FBomzA6xfriRFTX6YCSruzU-okX_yyqxo78oQd5OzAi6Wxikbzr8mopmBLXtRaLQwlqMgZuMGadMJ_rWmQidNF0vFbaLlJZLtDmlpsYW3B3nTgr63G6Hp6PT1FpH2LamYTHVmngg_e-rrdze/s1600/Screenshot%202024-12-21%20at%202.25.50%E2%80%AFPM.png&quot; target=&quot;_blank&quot;&gt;
        &lt;img 
            alt=&quot;Screenshot&quot; 
            border=&quot;0&quot; 
            src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig52wFGIAc8quphm4JlmU57-PznouWBWqds3w2aM0yJlG9FBomzA6xfriRFTX6YCSruzU-okX_yyqxo78oQd5OzAi6Wxikbzr8mopmBLXtRaLQwlqMgZuMGadMJ_rWmQidNF0vFbaLlJZLtDmlpsYW3B3nTgr63G6Hp6PT1FpH2LamYTHVmngg_e-rrdze/s1600/Screenshot%202024-12-21%20at%202.25.50%E2%80%AFPM.png&quot; 
            style=&quot;max-width: 300px; height: auto; display: inline-block; border: 2px solid #ddd; border-radius: 5px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);&quot;
        /&gt;
    &lt;/a&gt;
&lt;/div&gt;

    &lt;p&gt;This demonstrates how text replacement can be applied selectively based on predefined rules, ensuring critical user feedback remains unaltered while bypassing unnecessary restrictions.&lt;/p&gt;

    &lt;h2&gt;Conclusion&lt;/h2&gt;
    &lt;p&gt;Dynamic analysis using Frida provides unparalleled insights into Android application security. These techniques uncover potential vulnerabilities and highlight the importance of secure coding practices in native libraries and sensitive storage operations.&lt;/p&gt;

    &lt;h3&gt;Ethical Disclaimer&lt;/h3&gt;
    &lt;p&gt;These methodologies are intended solely for educational and ethical use. Ensure compliance with all legal regulations and obtain proper authorization before applying these techniques.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</description><link>http://jgardnerla.blogspot.com/2024/12/dynamic-hooking-with-frida-body-font.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhsK5FKMFBsUiH92dsLM-qSs75gc7Geg_SGyBnMugCiO3N_b4CW8M3DwPnGsX95mvBoP3Z23MxF78RVqLqtXjWVQUlTTDxkuMPSC8Wn9do35nTQNFrzGTI79tgTCODvU7BXdj3w8OTtFDonq46Nsc1mNtbsHShXVJ-xBGEioxlB8JYfVNiHTrLBiBoAzX7/s72-c/Screenshot%202024-12-20%20at%203.04.52%E2%80%AFAM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-4909816032719669654</guid><pubDate>Fri, 29 Nov 2024 08:12:00 +0000</pubDate><atom:updated>2024-12-22T09:09:19.021-08:00</atom:updated><title>Advanced Detection and Mitigation of Rogue Base Stations Using RayHunter &amp; a Rooted 4G Hotspot </title><description>
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;&lt;/meta&gt;
    &lt;meta content=&quot;width=device-width, initial-scale=1.0&quot; name=&quot;viewport&quot;&gt;&lt;/meta&gt;
    &lt;title&gt;Advanced Detection and Mitigation of Rogue Base Stations Using RayHunter &amp; a Rooted 4G Hotspot&lt;/title&gt;
&lt;style&gt;
    body {
        font-family: monospace;
        background-color: #000;
        color: #0f0; /* Bright green text */
        padding: 20px;
        line-height: 1.5;
    }

    .divider {
        border-top: 2px solid #0f0;
        margin: 20px 0;
        width: 100%;
    }

    .content-box {
        border: 1px solid #0f0;
        padding: 10px;
        margin: 20px 0;
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-x: auto;
        background: #101010; /* Dark background for the content box */
        color: #0f0; /* Bright green text inside content boxes */
    }

    img {
        display: block;
        margin: 10px auto;
        border: 2px solid #0f0;
        max-width: 100%;
        height: auto;
    }

    h2, ol {
        color: #0f0; /* Bright green headers and ordered lists */
    }

    pre {
        background: #101010; /* Dark background for code blocks */
        color: #0f0; /* Bright green text for code */
        padding: 10px;
        border: 1px solid #0f0;
    }
&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;pre class=&quot;content-box&quot;&gt;
////////////////////////////////////////////////////////////////////////////
// As mobile networks become increasingly sophisticated, so do the tools  //
// and techniques used by adversaries to exploit them.                    //
//                                                                        //
// Rogue base stations, also known as IMSI catchers or stingrays,         //
// pose a critical threat to mobile networks. They are capable of         //
// intercepting communications, tracking devices, and even launching      //
// denial-of-service attacks.                                             //
//                                                                        //
// Tools like RayHunter are invaluable for detecting such threats         //
// by analyzing LTE paging messages and other signaling activities.       //
////////////////////////////////////////////////////////////////////////////
&lt;/pre&gt;

&lt;div class=&quot;divider&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;divider&quot;&gt;&lt;/div&gt;

&lt;h2&gt;Rogue Base Stations: The Threat&lt;/h2&gt;
&lt;div class=&quot;content-box&quot;&gt;
A rogue base station masquerades as a legitimate cell tower, tricking nearby devices 
into connecting to it. Once connected, these devices can be exploited in several ways:

-------------------------------------------------------------------------------------
- IMSI Harvesting: Requests devices to reveal their IMSI, compromising user privacy.
- Tracking and Surveillance: Tracks devices&#39; movement using temporary identifiers 
  like m-TMSI or identifies repeat users.
- Data Interception: Intercepts and manipulates traffic, compromising sensitive 
  communications.
-------------------------------------------------------------------------------------
&lt;/div&gt;

&lt;img alt=&quot;Rooted Orbic for Rogue Base Station Passive Detection&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUOLYHqhQmic8solWXZaFPh9bJ_uHZDz-I5QUbhH0uLdPC6yBK_pRGf_fMKmraAQ1l4Tgz-3MmtjgZm0OTvCLg5pPXXrw3hzvkh3mGdNQzcUwjt9J1HjwkxhY2egjWfDw6RW5iCil1D-IjlRvDAjEemfX86EBOWOaVDWgVjrvghO28l6eceCvy8cLqOCib/s1200/image_123655411%284%29.JPG&quot; width=&quot;1200&quot; /&gt;

&lt;div class=&quot;divider&quot;&gt;&lt;/div&gt;

&lt;h2&gt;How RayHunter Helps&lt;/h2&gt;
&lt;div class=&quot;content-box&quot;&gt;
RayHunter monitors and analyzes LTE traffic, providing visibility into critical 
signaling activities. It identifies the fingerprints of rogue base stations by 
detecting patterns such as:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[1] Unusual Paging Patterns:  
    Rogue stations generate atypical paging requests (e.g., frequent/simultaneous paging).  

[2] Suspicious MMEC and m-TMSI Values:  
    Legitimate base stations frequently randomize these, but rogue stations may fail to.  

[3] Anomalous Signal Levels:  
    Rogue stations often overpower legitimate towers with stronger signal levels.  
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
&lt;/div&gt;

&lt;div class=&quot;divider&quot;&gt;&lt;/div&gt;

&lt;h2&gt;MMEC and m-TMSI in Detection&lt;/h2&gt;
&lt;div class=&quot;content-box&quot;&gt;
MMEC (Mobility Management Entity Code)

- What It Is:  
  Identifies the MME managing a device. Each legitimate network operator has a 
  predictable range of MMEC values.  

- Rogue Station Red Flag:  
  Detection of MMEC values outside the operator&#39;s range may indicate rogue activity.

m-TMSI (Temporary Mobile Subscriber Identity)

- What It Is:  
  A temporary identifier used to protect IMSI over the air.  

- Rogue Station Red Flags:  
  * Static or reused m-TMSI values over time (failure to randomize).  
  * m-TMSI values inconsistent with MMEC (illegitimate pairing).  
&lt;/div&gt;

&lt;img alt=&quot;RayHunter GUI Example&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPLpc6Slu_Tjtv9bMeKH6UUJjClZCZiy_qBxbfeP5jwaJS_J-maz9rMMyD1KF_kqzpVmnVqF39ntb5bMBTLSlM3PgZLcXTIeCrYO_ggGPvPbnPiRKnTEWYPX3-arlva6HmWUepgok5N-lcPkiszvuStrKReThWrETa2tYqlWNHWZVgTCiWjqefv5-TkT8Q/s1200/rayhunterGUI%282%29.png&quot; width=&quot;1200&quot; /&gt;

&lt;div class=&quot;divider&quot;&gt;&lt;/div&gt;

&lt;h2&gt;Example from RayHunter&lt;/h2&gt;
&lt;div class=&quot;content-box&quot;&gt;
Captured messages from RayHunter flagged anomalies:  

&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
[+] MMEC: c3 (195), m-TMSI: c4685385 (3295171461)  
[+] MMEC: 8c (140), m-TMSI: c2891c10 (3263765520)  
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;/div&gt;

&lt;img alt=&quot;RayHunter Packet Review&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPQXok70qdjG2PN9KINxBoB2-UvSGss1D4wpZjtZMA0GeXGSnECRzs60OJhXhD2USY1ZfjHpmis9vJzB73wodwgVmCFry-DO2STK44sv5lPAUb_7GX16UmtrUMy9wvMlYh4PvXPLKVjnm25I4OidUcchVerLfImnEom6Sxg26JE0cSeU3V4rKWGMqR2Byf/s1200/packetreview1.png&quot; width=&quot;1200&quot; /&gt;

&lt;div class=&quot;divider&quot;&gt;&lt;/div&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;content-box&quot;&gt;
Rogue base stations represent a significant threat to user privacy and network security.  

Tools like RayHunter provide invaluable insights by analyzing LTE paging activity, 
particularly patterns in MMEC and m-TMSI values. By leveraging these tools, mobile 
security engineers can detect and deter rogue base stations, ensuring safer mobile 
environments for users.
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</description><link>http://jgardnerla.blogspot.com/2024/11/advanced-detection-and-mitigation-of.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUOLYHqhQmic8solWXZaFPh9bJ_uHZDz-I5QUbhH0uLdPC6yBK_pRGf_fMKmraAQ1l4Tgz-3MmtjgZm0OTvCLg5pPXXrw3hzvkh3mGdNQzcUwjt9J1HjwkxhY2egjWfDw6RW5iCil1D-IjlRvDAjEemfX86EBOWOaVDWgVjrvghO28l6eceCvy8cLqOCib/s72-c/image_123655411%284%29.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-4872658278252612375</guid><pubDate>Mon, 22 Apr 2024 18:25:00 +0000</pubDate><atom:updated>2024-04-22T11:25:16.556-07:00</atom:updated><title>Automated Exploitation of a Bluetooth vulnerability that leads to 0-click code execution</title><description>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT_o9FW8HMRVMGsjgLvemY1jS89rAjIADKzcWjavWZJGoN-RYiHbD2O0XAX6Ux6Xcgk62qyQuUOZEOe3Rv4eAeUAxqPDd_yRcbSU1JcPSZ0yFQ4hpSrcBMBNcOKwEKdHWryZN4KQAZDBWe_fZqdueIxcQFclx2jqZrq_XJ2B20x6_bEg6G-oDLQPIVwTOf/s883/IMG-7538.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;584&quot; data-original-width=&quot;883&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT_o9FW8HMRVMGsjgLvemY1jS89rAjIADKzcWjavWZJGoN-RYiHbD2O0XAX6Ux6Xcgk62qyQuUOZEOe3Rv4eAeUAxqPDd_yRcbSU1JcPSZ0yFQ4hpSrcBMBNcOKwEKdHWryZN4KQAZDBWe_fZqdueIxcQFclx2jqZrq_XJ2B20x6_bEg6G-oDLQPIVwTOf/w640-h424/IMG-7538.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;This blog post covers an interesting vulnerability that was just discovered earlier this year and an open source free tool that was created to automate testing for this vulnerability in Bluetooth devices.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;I will preface this with the warning that this is of course done in my personal testing lab environment with my own devices for learning and demonstration purposes. I am in no way encouraging that these tools, snippets of code or techniques be used maliciously as there can be very serious legal consequences for those that use these hacking tricks nefariously. However, in a personal testing lab environment I think this is great for learning and allows someone to quickly be able to confirm or deny if their personal devices are truly standing up to the &lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2023-45866&quot;&gt;Bluetooth CVE of CVE-2023-45866&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;CVE-2023-45866 is described as an issue where the &quot;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline; float: none; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;Bluetooth HID Hosts in BlueZ may permit an unauthenticated Peripheral role HID Device to initiate and establish an encrypted connection, and accept HID keyboard reports, potentially permitting injection of HID messages when no user interaction has occurred in the Central role to authorize such access&quot;. So in the photo above we see a device that has been sent the commands to open a new incognito browser pointing to my website at thejasongardner.com. This as you can see is done with 0-clicks or user interaction and the device is unfortunately vulnerable to the attack just by being in proximity to the attacking Bluetooth device with Bluetooth enabled. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline; float: none; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;Variations of this attack can affect Android, Linux, MacOS, iOS and Windows. The BlueDucky tool works because &lt;/span&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline; float: none; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;&quot;&lt;/span&gt;&lt;a href=&quot;https://github.com/skysafe/reblog/blob/main/cve-2024-0230/README.md&quot;&gt;The Bluetooth stacks in multiple operating systems allow an attacker to pair a virtual Bluetooth keyboard without authentication or user confirmation. The attacker can then inject keystrokes to perform actions as the user, so long as those actions do not require password or bio-metric authentication.&quot;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;So, basically, if you have paired a Bluetooth device such as a keyboard to your tablet, now an attacker can pretend that they are using that same exact keyboard and type in commands into your device. This is a big problem because there are many situations where you may be exposed to this attack and you would have no way of physically stopping the attack from occurring. The best defense is to make sure your devices are patched to the latest versions of their operating systems and if possible try to only enable Bluetooth when you really need to use it. In the example here a browser is opened without the user doing anything and then the phone&#39;s browser seems to have someone typing in the URL and then the device opens my website. My website is just used as an example page but a malicious attacker could direct the device to download malware, a virus or anything else a hacker may want which could lead to the device being compromised after it has left the vicinity of the attacker.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline; float: none; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;To simplify here the issue is that the pairing can be forced and then keystroke injection is possible where an attacker can emulate a device using HID or the Human Interface Device. As discussed more in detail in this article (&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;a href=&quot;https://www.howtogeek.com/713565/what-is-a-human-interface-device-hid/&quot;&gt;What Is a Human Interface Device (HID)? (howtogeek.com)&lt;/a&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline; float: none; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;)&quot;&lt;/span&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline; float: none; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;The biggest advantage of HID is being able to simply connect almost any peripheral to your device and have it start working immediately.&lt;/span&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline; float: none; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;&quot;. So here this universal usage and simplicity is misused when there are three criterium that were covered in the skysafe repo mentioned above and they are that:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; box-sizing: border-box; color: #1f2328; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 16px; margin-top: 0px; padding-left: 2em; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;the host is connectable/discoverable&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;the host supports pairing without authentication via the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted)); border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space: break-spaces;&quot;&gt;NoInputNoOutput&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;pairing capability&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;the attacker can connect to L2CAP ports 17 and 19 on the host&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;So there is some mitigating criteria to begin with and after the device is patched this attack should result in an error and no unauthenticated pairing or injection should occur. I hope you learned a little more about something interesting and can use this information to be a little safer and more secure with your personal devices.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;715&#39; height=&#39;595&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dzzTG35BNtjn0InN5oHegn0Hih_Gug78fU_peZLTC2hHFwaBUMQILncb2sQ6Qb83eRvlXjVoAx__s7DmBRhww&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://jgardnerla.blogspot.com/2024/04/automated-exploitation-of-bluetooth.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT_o9FW8HMRVMGsjgLvemY1jS89rAjIADKzcWjavWZJGoN-RYiHbD2O0XAX6Ux6Xcgk62qyQuUOZEOe3Rv4eAeUAxqPDd_yRcbSU1JcPSZ0yFQ4hpSrcBMBNcOKwEKdHWryZN4KQAZDBWe_fZqdueIxcQFclx2jqZrq_XJ2B20x6_bEg6G-oDLQPIVwTOf/s72-w640-h424-c/IMG-7538.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-9001792903742409034</guid><pubDate>Wed, 31 May 2023 00:09:00 +0000</pubDate><atom:updated>2023-06-22T15:36:19.719-07:00</atom:updated><title>Sniffing GSM traffic on a private cellphone network </title><description>&lt;p&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; font-family: courier;&quot;&gt;Legal Disclaimer: GSM Research and Passive Traffic Monitoring&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;‘The information provided in this blog is for educational and informational purposes only. The author and publisher of this blog are not responsible for any misuse, illegal activities, or damages that may arise from the use of the information provided herein.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;The author conducted research using two Samsung phones and a BladeRF with YateBTS to create a small-scale GSM network for the purpose of analyzing and intercepting traffic. It is important to note that intercepting or tampering with wireless communication without proper authorization is illegal in many jurisdictions. The author undertook this research within a controlled and lawful environment, and any techniques or findings described in this blog should not be replicated or applied in unauthorized or illegal activities.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;The author strongly advises against engaging in any illegal activities, including but not limited to intercepting or tampering with wireless communications, without the express permission and authorization of the relevant authorities and stakeholders. Unauthorized interception of wireless communications violates privacy laws, regulations, and individual rights. Engaging in such activities may lead to severe legal consequences, including criminal charges and civil liabilities. It is always recommended to consult with legal professionals or authorized experts before conducting any research or experiments in the field of wireless communication.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;The author disclaims any liability or responsibility for any damages, losses, or legal implications arising directly or indirectly from the use, misuse, or interpretation of the information provided in this blog.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;By reading and using the information in this blog, you agree to the terms of this legal disclaimer and accept the risks associated with unauthorized interception or tampering with wireless communications.’&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 17px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;-webkit-text-size-adjust: auto; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;In this blog post I will be taking a look at cellular traffic and analyzing the GSM packets in Wireshark. However, I will also show how I have created a personal and portable, private cell phone network that I will use for this exercise. I created a portable cell phone network to ensure that I am operating and testing on frequencies that are not interfering or overlapping with any licensed operators in my area. I do not recommend that you attempt to follow along unless you understand how to properly do everything to stay within the bounds of your local laws, rules and regulations. It is illegal to interfere with licensed operators or to sniff the private traffic of individuals. To avoid these issues everything here is done in a private cell phone network I have created for this exercise with my own devices and cellular base station.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjvjfKZ83TRCxiLcyAqmjMVdkCYeZYh38NWLUHBHNikmo3z_83TAgOLmLLXMNefY-Qhtiws5DfoeHTRsEsoBs5O4W7-77iheR8BcmgFdkq8jadyKlHn4UaHo_yOS86kxal-zroCWmhKg9b9feB5AcCwkTnM-aoZC3xLuFzi5XoLkBY8A0nDgmpT-F8Tcw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img alt=&quot;Here are some SIM cards that I programmed&quot; data-original-height=&quot;904&quot; data-original-width=&quot;1022&quot; height=&quot;566&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjvjfKZ83TRCxiLcyAqmjMVdkCYeZYh38NWLUHBHNikmo3z_83TAgOLmLLXMNefY-Qhtiws5DfoeHTRsEsoBs5O4W7-77iheR8BcmgFdkq8jadyKlHn4UaHo_yOS86kxal-zroCWmhKg9b9feB5AcCwkTnM-aoZC3xLuFzi5XoLkBY8A0nDgmpT-F8Tcw=w640-h566&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;The interface for programming the IMSI on the SIM cards was interesting to work with. You also need to specify a KI value as well for authentication . This will come up again when we discuss the Kc value for decoding later on in another post. Here we are going to passively observe gsm network traffic on our own portable cellphone network. The SMS and voice decoding is beyond the scope of this post as for now we will be discussing how to set up a base station, have cellular devices join the private network. Then I will demonstrate how you can have the devices call and text one another on your private cellphone network. Additionally, on another machine I will show how the traffic can be observed and analyzed with a HackRF, grgsm_livemon and Wireshark. I programmed the two SIM cards with 15 digit IMSI numbers to be compatible with the Yate base station.&amp;nbsp;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjnD4G-kKEfYYKLFFyxqIUXpTF8s2CFG7cqKz4d1r5je12DezMxEyroeBryrOnxKTD6V5oq7Uir2Jn_kEuYZjh7W5CTGT_xe5LBYihHeMYdUf41XFvjWggw0aveYLrO-4LWxyNSyeiWJYMyR1bRHqtP3KkO0Tf1XFFxHw1KsiMG6cAZUGW02z4GqlFtpQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;2353&quot; data-original-width=&quot;3765&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjnD4G-kKEfYYKLFFyxqIUXpTF8s2CFG7cqKz4d1r5je12DezMxEyroeBryrOnxKTD6V5oq7Uir2Jn_kEuYZjh7W5CTGT_xe5LBYihHeMYdUf41XFvjWggw0aveYLrO-4LWxyNSyeiWJYMyR1bRHqtP3KkO0Tf1XFFxHw1KsiMG6cAZUGW02z4GqlFtpQ=w640-h400&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Here is the interface for writing IMSI and KI values to the custom SIM cards&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhH8ZHM8SxHzwzOh6vEei1ztcuzblTc9ulv26bhXDQWFrb7oYQCP-fkhFlPulNS5Cr6eMC7yY0tMWNWmOgauNHG3G9WPzEMULTOyU7u2Rs_luxLDdCVVEHiWm70XtcVA2ARstZd5oZMhBb7ZUgwaWTPKLtOUU5E7OMYQDhbeiKqRy1D4jWw_I3gtGHW2w&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;4032&quot; data-original-width=&quot;3024&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhH8ZHM8SxHzwzOh6vEei1ztcuzblTc9ulv26bhXDQWFrb7oYQCP-fkhFlPulNS5Cr6eMC7yY0tMWNWmOgauNHG3G9WPzEMULTOyU7u2Rs_luxLDdCVVEHiWm70XtcVA2ARstZd5oZMhBb7ZUgwaWTPKLtOUU5E7OMYQDhbeiKqRy1D4jWw_I3gtGHW2w=w480-h640&quot; title=&quot;Here the SIM card reader/writing is writing to a SIM card&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Writing to a SIM card&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;Here is what the SIM card reader/writer looks like in action. It&#39;s useful for setting up the devices with the YateBTS as I have read that although you can perhaps have your base station freely adopt new subscribers within certain IMSI ranges that at least with the BladeRF there seems to be better performance if the base station is programmed to add specific subscribers with IMSI numbers that are put directly into the backend interface. I did this to get ahead of any connectivity issues and found that the connectivity and service worked quite well and consistently.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjjJokO-t-ZjpLad0qOeus2CwBHcx--L9wNyKnYvLiIK6fKGieN-1KtMcUvthInjhb5YUBGDo42k2tAWb76a5mBWK6hKZrqu9v9zFtf2k_Js-WV7SETV1JW74J0mi5NYJljGr6mRUb_4yfDKMg2LjI54dXF7STZJNuTmtgPu4YtoiXK4m26ccQ2HjTQSw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;2541&quot; data-original-width=&quot;2805&quot; height=&quot;580&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjjJokO-t-ZjpLad0qOeus2CwBHcx--L9wNyKnYvLiIK6fKGieN-1KtMcUvthInjhb5YUBGDo42k2tAWb76a5mBWK6hKZrqu9v9zFtf2k_Js-WV7SETV1JW74J0mi5NYJljGr6mRUb_4yfDKMg2LjI54dXF7STZJNuTmtgPu4YtoiXK4m26ccQ2HjTQSw=w640-h580&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Loading the custom SIM cards&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;So at this point, the devices have been loaded with custom programmed SIM cards. They have the appropriate IMSI values needed for the Yate base station. Next I will show how I setup the base station before we get everything connected.&amp;nbsp;I was able to run the YateBTS of a USB running DragonOS focal that has precompiled versions of the base station software that really helps to get up and running quickly. I flashed a USB with an ISO of the DragonOS focal software. Since it comes pre loaded with all the necessary files compiled and ready to roll thanks to ‘@cemaxecuter’ that helped cut down on setup time tremendously. I will show the GUI interface in a moment. Here is where we start the backend Apache server and load the FPGA files to the BladeRF.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg7DxBpC7EcQqyKiJqOw-LFcZIwGvEbmJyw5FLIRLgudhZVvUue5d5EpNRshMjZ-5zT_Yg7RuXwMuNXYJXoIQvpMtQuziDn6ttVMyaTIiVz3XrsIiQmBhEDERSi4w7cZNnThfrEX0IvNdSzE29z1rp1i_ipVQLQZ6yZd9ILQoo6VB6iXhKt17KoZup0Iw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;1699&quot; data-original-width=&quot;4031&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg7DxBpC7EcQqyKiJqOw-LFcZIwGvEbmJyw5FLIRLgudhZVvUue5d5EpNRshMjZ-5zT_Yg7RuXwMuNXYJXoIQvpMtQuziDn6ttVMyaTIiVz3XrsIiQmBhEDERSi4w7cZNnThfrEX0IvNdSzE29z1rp1i_ipVQLQZ6yZd9ILQoo6VB6iXhKt17KoZup0Iw=w640-h270&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;Loading FPGA bitstream to the BladeRF&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Since I created custom SIM cards I knew what the IMSI number was that I needed to put for the subscribers I wanted to add to my base station.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj2cTOxCeCDfZ1Kbs-cuKMvRghr8MlVLlhaBU7baLu8ZVTGZyWFSJuNZ_5QpsVSUPYgadxKFHNvzCC4wjyjDjU_8FTNe3bRxEZz8xyXFJK_5blDsTn_CAjDeAYm8YQtYQDvcM9xWRSTxQuiMkTuf0C5vvkd-7rC8XHixEUP3Ox89jyCctwwOf7tPGijZw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;2273&quot; data-original-width=&quot;2965&quot; height=&quot;491&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj2cTOxCeCDfZ1Kbs-cuKMvRghr8MlVLlhaBU7baLu8ZVTGZyWFSJuNZ_5QpsVSUPYgadxKFHNvzCC4wjyjDjU_8FTNe3bRxEZz8xyXFJK_5blDsTn_CAjDeAYm8YQtYQDvcM9xWRSTxQuiMkTuf0C5vvkd-7rC8XHixEUP3Ox89jyCctwwOf7tPGijZw=w640-h491&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Adding subscribers manually with IMSI numbers&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;After a little bit more configuration in regards to the frequencies being used the BTS will be ready to start. You need to be careful to not transmit at frequencies that can interfere with licensed operators in your area. I chose to create a 2G network on frequencies that definitely are not overlapping with other devices in my area. Additionally also at run time I use an RF enclosure to ensure that my transmissions are not unintentionally affecting anyone else in my area.&lt;br /&gt;&lt;br /&gt;There are quite a few steps to get up and running but we have basically everything we need at this point. We created custom SIM cards to put on our devices, we have configured our local base station and loaded the appropriate FPGA bitstream to the BladeRF. Since I want to also see what is going on I will also at this point setup the observing machine with the HackRF. For this purpose I setup another laptop with DragonOS software. I initially scanned the area to see my base station and then since I created the base station I already had the exact transmission frequency that would normally need to be found at this step. Using a tool called grgsm_livemon I am able to monitor a single channel at a time. I additionally started up Wireshark to start monitoring for the GSMTAP packets to be able to later analyze them and learn about the test portable cell phone network I have setup.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Now that the cellular base station is up and running as well and we have another machine observing the traffic and pulling it into Wireshark we are ready to have our devices join the network and see what they&#39;re doing in granular detail. Here my network has a generic name of 00101.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiWMtmtSrv8CIwuw0qfsTkqeiB-dIC7pqRM1h6yoPfT3tfrfTnjBjqTZrtgRE6NySVs_iw_Py3tjpnHh2-zGleGPvkTeg1G1UxOYmF1DOfQ_na_r1PZ_mrofm9wHC98dlpd76n1wSo0TYlx2mxpVq8Gnq6SVtTTygJe5ufaYqtAXpXfQ8CeWiVyIZT1PQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;2129&quot; data-original-width=&quot;2365&quot; height=&quot;576&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiWMtmtSrv8CIwuw0qfsTkqeiB-dIC7pqRM1h6yoPfT3tfrfTnjBjqTZrtgRE6NySVs_iw_Py3tjpnHh2-zGleGPvkTeg1G1UxOYmF1DOfQ_na_r1PZ_mrofm9wHC98dlpd76n1wSo0TYlx2mxpVq8Gnq6SVtTTygJe5ufaYqtAXpXfQ8CeWiVyIZT1PQ=w640-h576&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Selecting our custom network&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Upon joining the network a test message is sent to the device alerting it that it has joined our special network and letting the user know what their new number is on our little private, portable network. For this device below it has now been allocated the phone number of &#39;56789&#39;. If another user needs to contact this user they would text or call &#39;56789&#39; on their device as you would normally dial or text anyone.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi_U9vcBsdFtTZ-kWHI2GLg28np7P3n3Nw8zC8NYkOvph_RjSqTqqI0Hqmgb54DMy0Yn-IPzQTPV_Ynmi_LAvoAjaqQ_93YZReJsJgVpTL6N6SvSqsJXIwldaPCOJLuQ09f_hwyf3sUBbrFA64I_KNzKEjeG6MM-3ETaIRfn8I0Gh1jDbOxm5IJCmgpFw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;3664&quot; data-original-width=&quot;2480&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi_U9vcBsdFtTZ-kWHI2GLg28np7P3n3Nw8zC8NYkOvph_RjSqTqqI0Hqmgb54DMy0Yn-IPzQTPV_Ynmi_LAvoAjaqQ_93YZReJsJgVpTL6N6SvSqsJXIwldaPCOJLuQ09f_hwyf3sUBbrFA64I_KNzKEjeG6MM-3ETaIRfn8I0Gh1jDbOxm5IJCmgpFw=w432-h640&quot; width=&quot;432&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Joining the custom network&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;I decided to do a quick QA test on my network and tested to see if texts and calls were working properly.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh1RXrnV76V7PRqOHFkwfJcU6HjxXkKy4NAKyNxcNj1kgmMcIzPI3G346TMP_9_JpOkR7t9h3pe_dxpA9lw1r6u7JmOz9kGlTeq-Qd-HgxSUY7_8ebBtLuRY8Oh8agMDezZMDe-OppBqsfS4aOzuoDPOXe9FDNyKDSrKVwND8PgfOXrYvt-v8vMG4yQzA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;3873&quot; data-original-width=&quot;5593&quot; height=&quot;444&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh1RXrnV76V7PRqOHFkwfJcU6HjxXkKy4NAKyNxcNj1kgmMcIzPI3G346TMP_9_JpOkR7t9h3pe_dxpA9lw1r6u7JmOz9kGlTeq-Qd-HgxSUY7_8ebBtLuRY8Oh8agMDezZMDe-OppBqsfS4aOzuoDPOXe9FDNyKDSrKVwND8PgfOXrYvt-v8vMG4yQzA=w640-h444&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;Texting devices on the network works&lt;/div&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Also calls between devices across the network worked well. This is really cool because you can use cellphones on your own private network as you normally would use a much larger company such as AT&amp;amp;T, T-Mobile or Verizon. And best of all, it&#39;s free. The software is completely open source and there are no paid per use limits or any fees whatsoever. Once you are up and running you can use your private cell phone network on a private island or very large ranch to communicate privately with your friends on your own portable cell phone network. I found this to be a really neat project to work on and this is a lot of fun once I got it all setup and working properly. It also helps for security research as I can now investigate things on my own network, with my own devices on my own frequencies so that I am definitely not interfering with any systems, channels or frequencies I am not supposed to be.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgP1htWad2AUKprKsB7IaxPZE9dbr_V9aWbE_iZ4vdh7f9l2wsOWQaP_odZi4pEBNxOf1tAAIgvtD74v1TTqDxP-e1wn7HVxpXVpN6uOZrchRpK8cbdaBTc6rW1JN55hGSOcWT8-g_h7AhLpRoDgB4JqFnDjzR0fH9IHwX9Gxjhdb7zoLDf_jnUEIv3NQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;2689&quot; data-original-width=&quot;2825&quot; height=&quot;610&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgP1htWad2AUKprKsB7IaxPZE9dbr_V9aWbE_iZ4vdh7f9l2wsOWQaP_odZi4pEBNxOf1tAAIgvtD74v1TTqDxP-e1wn7HVxpXVpN6uOZrchRpK8cbdaBTc6rW1JN55hGSOcWT8-g_h7AhLpRoDgB4JqFnDjzR0fH9IHwX9Gxjhdb7zoLDf_jnUEIv3NQ=w640-h610&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;Our first call on our private, portable cellphone network&amp;nbsp;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;And at this point we can definitely see the traffic flowing on our observation machine. As you can see below gr-gsm livemon is working well and is seeing everything from our base station and what is going on between our devices.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg6Kpt0A1MughyV-OzbY8uy-Rg_pw2r4kW5Ei7BEH4wUB8eyYEbmxTqgpXqiiQoQ89RyO8d76xVIHN18_ShusMqRAc2ng0rks3_pRJ2LpThSaBP7GpSyZv87RUhGTURsF7MHa1gWJxtiG9qoOCfSD53ZhS6X5bp_Kem1lvcoQAiKiENE58zFyKv3QPMvg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;3024&quot; data-original-width=&quot;4032&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg6Kpt0A1MughyV-OzbY8uy-Rg_pw2r4kW5Ei7BEH4wUB8eyYEbmxTqgpXqiiQoQ89RyO8d76xVIHN18_ShusMqRAc2ng0rks3_pRJ2LpThSaBP7GpSyZv87RUhGTURsF7MHa1gWJxtiG9qoOCfSD53ZhS6X5bp_Kem1lvcoQAiKiENE58zFyKv3QPMvg=w640-h480&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;gr-gsm livemon traffic&amp;nbsp;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh4ofHOEKvc3gCKhT39nK-Tks1MgDvODjgYmUh0HnxV8poJK9zHp_BOC6l3xEePatzNZcW5Ww52m7_vChQmbTh34FG6wuLzZJp51J_XmfZyDASo3h4rudoa68Kh1ziHv0sGdYaAg0BkwrdbuMpMpZA2V_QGZTWvrtRZVu8Kzh9JFRLvMBNtMRHwANHByw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;2497&quot; data-original-width=&quot;3209&quot; height=&quot;499&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh4ofHOEKvc3gCKhT39nK-Tks1MgDvODjgYmUh0HnxV8poJK9zHp_BOC6l3xEePatzNZcW5Ww52m7_vChQmbTh34FG6wuLzZJp51J_XmfZyDASo3h4rudoa68Kh1ziHv0sGdYaAg0BkwrdbuMpMpZA2V_QGZTWvrtRZVu8Kzh9JFRLvMBNtMRHwANHByw=w640-h499&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;gr-gsm livemon and Wireshark&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiOsljql62CpQQCMGrV65ojL0V6-Cur28jrMGuxh6p4TFE45sUX0Oro2m1cK3NIhe4uqexG9MozoIFPUDbbamrWEBRPVGTKppx4myBjQVFMmPIf-3A2aGz_XE9XNhHnWM0ZNZDOYxc4W7KQOaQN6Gqbo8Rc6FTp6_uLSCBrKMbPJQRGf3uHhfHqaMqRrw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;633&quot; data-original-width=&quot;1753&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiOsljql62CpQQCMGrV65ojL0V6-Cur28jrMGuxh6p4TFE45sUX0Oro2m1cK3NIhe4uqexG9MozoIFPUDbbamrWEBRPVGTKppx4myBjQVFMmPIf-3A2aGz_XE9XNhHnWM0ZNZDOYxc4W7KQOaQN6Gqbo8Rc6FTp6_uLSCBrKMbPJQRGf3uHhfHqaMqRrw=w640-h232&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Here is a packet from our private network&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjfniTjGp9rsDN1lMuy--3WtGsa93VGL_S-yM5KLAt6mLcV20yK9hrlsVFDsZRl9Y0_efIcVDL0JvrTJDvd-cp9AKCjn1mm8xLIj_qrWZ9Ghg9ZbPIvBHo7vlMEqbOeq7VpH29fF2akoeqROLrO177qmy5Gr1P5sdGcA3MEuA2J5NNOvFG4lIZ5y30-eQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;2133&quot; data-original-width=&quot;3369&quot; height=&quot;406&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjfniTjGp9rsDN1lMuy--3WtGsa93VGL_S-yM5KLAt6mLcV20yK9hrlsVFDsZRl9Y0_efIcVDL0JvrTJDvd-cp9AKCjn1mm8xLIj_qrWZ9Ghg9ZbPIvBHo7vlMEqbOeq7VpH29fF2akoeqROLrO177qmy5Gr1P5sdGcA3MEuA2J5NNOvFG4lIZ5y30-eQ=w640-h406&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Here we see the IMSI for one of our test devices&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;As you can see there is GSM packet with some system information above and below there is one with specific user IMSI information. The first packet shows our &#39;Unknown&#39; network and a unique location area code that clearly does not really exist anywhere. In the packet below that we have been able to find an IMSI associated with one of our test devices. Additionally, below we see that with a tool called GSMEvil we are even able to intercept SMS messages in addition to being able to observe IMSIs.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiqlPCK8Al10XyGhmUBDreQtZJXaZveLKgVWsn6pWH33MDfl549dfw3kFnBNqxR_vMqXKqfzRwlqcRnd-DHn-ZMHKEOssWMEBaG-Ay-_4Vhcz4AfC0BTLLeuDhHbrKgKgLXYPMISyYcYX40vHS-LHMSJ3Q9ir5ZrvF636ORmU0czcYqVpi3OhgZMztF2A&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;1581&quot; data-original-width=&quot;4031&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiqlPCK8Al10XyGhmUBDreQtZJXaZveLKgVWsn6pWH33MDfl549dfw3kFnBNqxR_vMqXKqfzRwlqcRnd-DHn-ZMHKEOssWMEBaG-Ay-_4Vhcz4AfC0BTLLeuDhHbrKgKgLXYPMISyYcYX40vHS-LHMSJ3Q9ir5ZrvF636ORmU0czcYqVpi3OhgZMztF2A=w640-h252&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Viewing SMS messages on our own network with GSMEvil&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;I hope you have found this little deep dive into cellular traffic to be interesting and informative. It has been fun to learn how to create a private, portable cellphone network. Also, if you decide to try anything I have discussed above please be mindful of any local rules, laws or regulations. It is best to double check anything you are unsure about before you actually begin any testing, observing, monitoring or transmitting.&lt;/span&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2023/05/learning-about-gsm-on-private-cellphone.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEjvjfKZ83TRCxiLcyAqmjMVdkCYeZYh38NWLUHBHNikmo3z_83TAgOLmLLXMNefY-Qhtiws5DfoeHTRsEsoBs5O4W7-77iheR8BcmgFdkq8jadyKlHn4UaHo_yOS86kxal-zroCWmhKg9b9feB5AcCwkTnM-aoZC3xLuFzi5XoLkBY8A0nDgmpT-F8Tcw=s72-w640-h566-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-7705019714559797029</guid><pubDate>Sat, 10 Jul 2021 19:56:00 +0000</pubDate><atom:updated>2021-07-10T12:56:05.212-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ap</category><category domain="http://www.blogger.com/atom/ns#">cyber</category><category domain="http://www.blogger.com/atom/ns#">cybersecurity</category><category domain="http://www.blogger.com/atom/ns#">deception</category><category domain="http://www.blogger.com/atom/ns#">detection</category><category domain="http://www.blogger.com/atom/ns#">honeypot</category><category domain="http://www.blogger.com/atom/ns#">internet</category><category domain="http://www.blogger.com/atom/ns#">internet of things</category><category domain="http://www.blogger.com/atom/ns#">new</category><category domain="http://www.blogger.com/atom/ns#">rogue</category><category domain="http://www.blogger.com/atom/ns#">security</category><category domain="http://www.blogger.com/atom/ns#">VPN</category><category domain="http://www.blogger.com/atom/ns#">wifi</category><title>What&#39;s a Pumpkin Honeypot and why you should probably be using a VPN when you&#39;re on free Wi-Fi</title><description>So to start off I repurposed the first &lt;a href=&quot;https://jgardnerla.blogspot.com/2021/03/raspberry-pi-wifi-honeypot.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a&gt;honeypot I had created a couple of months ago.&lt;/a&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKto-1d6hvu_kQ1CeTnYkc519ONCrMPgBM5aAQRlMJVT-GnrGOjw28Jn8da7eW8e-ZENgfHFUNoAw9VRuLOVmkqGU5A3AGLrL7jExNj9l1WlnIMCf61PNZvgAjiRX1J0zq57sULu_JTdIH/s2048/kali_portable_hacking_machine_blogger.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;1214&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKto-1d6hvu_kQ1CeTnYkc519ONCrMPgBM5aAQRlMJVT-GnrGOjw28Jn8da7eW8e-ZENgfHFUNoAw9VRuLOVmkqGU5A3AGLrL7jExNj9l1WlnIMCf61PNZvgAjiRX1J0zq57sULu_JTdIH/s320/kali_portable_hacking_machine_blogger.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;This was quite similar to flashing the microSD the first time so I won&#39;t go into the details again. You can read more about Kali for Raspberry PI &lt;a href=&quot;https://www.kali.org/docs/arm/raspberry-pi-4/&quot;&gt;here&lt;/a&gt;. This is really cool because once you flash the Kali image onto the SSD with the addition of a battery pack you have now created a portable Kali machine that is ready to take with you on all sorts of adventures. Please remember to only test on things that you have permission to do so. An easy way is to just test against your own devices and I will show a few examples below of some fun things I found going a little deeper into my security research on Wi-Fi.
  
So in the first honeypot I created before I had simple logging capabilities if a rogue device where to connect to my access point. I had at least a mac address and minimal information about the device. So that was interesting but I wanted to go a bit further and see what else you could do. I decided for this next example to not try and reinvent the wheel but rather to see what are some cool tools I could find to help me further understand how this whole Wi-Fi thing works more in depth.
  
There are many tools to explore still but I found this one in particular to be very interesting. It is called &lt;a href=&quot;https://github.com/P0cL4bs/wifipumpkin3&quot;&gt;WiFiPumpkin3&lt;/a&gt; and you can take a look by grabbing a free copy over on github. They have done away with the graphical user interface which has given way to the command line based version. This makes its use slightly more technical but does allow for more granular control, automation and custom configurations. 
  
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN2S0amOYG3MSyszJxuuATBCS9Pzgf-0sfFqJ2Vwat5WZzPYTX1V-xdXBEpuFiQXL5zvd2JDS_uBR2I_yro35568kElgR6dAoXifZDcqsDyJv6QquW7ZMj5tOXJ5TMd0hOA8PxwzaFH3fl/s236/old_apple_being_proxied_sniffkin2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;220&quot; data-original-width=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN2S0amOYG3MSyszJxuuATBCS9Pzgf-0sfFqJ2Vwat5WZzPYTX1V-xdXBEpuFiQXL5zvd2JDS_uBR2I_yro35568kElgR6dAoXifZDcqsDyJv6QquW7ZMj5tOXJ5TMd0hOA8PxwzaFH3fl/s0/old_apple_being_proxied_sniffkin2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And to start off you can name your WiFi any emoji you want which is fun. So now that I connected to the newly created access point nothing really seems off. I went and visited my website at jasongardner.us and started clicking around. Great, we were able to spin up a new wifi access point with the raspberry pi in a minute once wifipumpkin3 was loaded on the Raspberry Pi. However, that&#39;s not all that just happened.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6X_hm1EDMwwckvFELbI-vv1nQux9HYupRN2aIJTq0kQq06ASvcI7wGd9XnKs4omqJjdErap7YkuvHa7TbwXG6PZjEBZHBGyooz5c0iyIB6IHVWLxZ6WTezQC5zJNPWfvcnFj42FxcgjWc/s294/looking_at_proxied_traffic2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;172&quot; data-original-width=&quot;294&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6X_hm1EDMwwckvFELbI-vv1nQux9HYupRN2aIJTq0kQq06ASvcI7wGd9XnKs4omqJjdErap7YkuvHa7TbwXG6PZjEBZHBGyooz5c0iyIB6IHVWLxZ6WTezQC5zJNPWfvcnFj42FxcgjWc/w346-h203/looking_at_proxied_traffic2.jpg&quot; width=&quot;346&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;So within wifipumpkin3 there is &#39;sniffkin&#39; which is sniffing the traffic flowing through the honeypot. Here the rogue access point we have created is now allowing devices to connect and browse the web but we are also logging what websites and IP addresses the device is connecting to. That&#39;s probably not what you expected when you were just connecting to a free Wi-Fi now is it. Here is another module within wifipumpkin3 that I thought was very interesting. Here this is creating a captive portal so when a device connects to the rogue access point users are greeted with a portal requesting a username and password. You may have seen this on a campus, hotel or even at a Starbucks. The danger here is that this page can be made to look like any login portal anywhere. So when users connect and enter their usernames and passwords then they are not putting those where they think they are.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwwUq2zzL-sydtJ8extq47tI9cfgLk8MC4Qn-EKBcTjRNlDBuBboDEC_hwCbHRpBG2Tx_1E6eTh9nALvJoWZ7jHEtfK6IpWZxwWDTMto12ucZzwylZ25vT9YaX4oqyXVqfvRxspXbXNEWc/s2436/fake_login_portal_captive.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;2436&quot; data-original-width=&quot;1125&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwwUq2zzL-sydtJ8extq47tI9cfgLk8MC4Qn-EKBcTjRNlDBuBboDEC_hwCbHRpBG2Tx_1E6eTh9nALvJoWZ7jHEtfK6IpWZxwWDTMto12ucZzwylZ25vT9YaX4oqyXVqfvRxspXbXNEWc/s320/fake_login_portal_captive.jpg&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSQlxtXEHqkFVYhp2xhP0BDifGhYedXESJVSNrOVQdEl3HUUSfTn7Dy-9tVrqIkvpNQTl6q09Z6rg9i9VJwEEcoyPDou5YsFXB2nySO6Ge_F2GEUAcnLx8qrztwANk-r3LwZIWezaYJ5Al/s2436/fake_success_login_through_captive_portal.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;2436&quot; data-original-width=&quot;1125&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSQlxtXEHqkFVYhp2xhP0BDifGhYedXESJVSNrOVQdEl3HUUSfTn7Dy-9tVrqIkvpNQTl6q09Z6rg9i9VJwEEcoyPDou5YsFXB2nySO6Ge_F2GEUAcnLx8qrztwANk-r3LwZIWezaYJ5Al/s320/fake_success_login_through_captive_portal.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;So here you see that the user has successfully logged into the captive portal on their iPhone. They have unwittingly entered their credentials on a fake login page to use the free Wi-Fi.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7662wE1AmqHc2ignpdWqO9_erax_JMwrpWBY8j6Xxo-JM2Ypxpg91ne_TNTOA9NwuYK3KLyWuRNdILepNfKDJ75_MKpHIbCd0gfsC7NT-Ye-1j0skXBTwtekPJ_5WBavbCE6m1lSrtyMf/s2048/captive_portal_with_creds.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1536&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7662wE1AmqHc2ignpdWqO9_erax_JMwrpWBY8j6Xxo-JM2Ypxpg91ne_TNTOA9NwuYK3KLyWuRNdILepNfKDJ75_MKpHIbCd0gfsC7NT-Ye-1j0skXBTwtekPJ_5WBavbCE6m1lSrtyMf/s320/captive_portal_with_creds.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;As you can see this is just an example and the user &#39;Admin&#39; with a a password of &#39;test&#39; is logged in the system. Now the user will connect and not only have the credentials they use to access the local free wifi were logged then any subsequent internet browsing will be logged as well. Well, why am I telling you this? This all seems a bit troubling and makes me think that I shouldn&#39;t use free Wi-Fi anymore anywhere. I&#39;m saying that more so that you can be aware of what&#39;s out there. I think that by being aware, you can take the proper steps to protect yourself and safeguard your usage of the internet and keep some of your privacy intact from attackers. Sometimes you have to think like an attacker to protect yourself from an attacker. So what can you do? Should you really just leave your phone off the next time you&#39;re at the airport or at a hotel? Of course not. Just use a VPN. A VPN will create a tunnel of sorts for your data to travel across the internet safely, securely and privately. All someone would be able to see even if they are sitting right there in the middle of your connection would be scrambled messages and that perhaps you are connecting to a VPN. I decided to investigate this a bit further to see how encrypted or protected my internet usage was with a VPN. Here I am using NordVPN on an iPhone.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;You can grab the latest version of Wireshark &lt;a href=&quot;https://www.wireshark.org/download/&quot;&gt;here&lt;/a&gt;. Wireshark allows you to analyze and look at network traffic. Here we are looking at the interface wlan0 which is the Wi-Fi interface where the rogue access point is broadcasting from. By looking at interface wlan0 we are able to see everything going to and from the iPhone and the honeypot. One unexpected thing I found here is that although most of my internet traffic was being routed through the VPN and was therefore encrypted not all app data was going through the VPN tunnel. In fact an observer could see that I&#39;m also listening to music on Spotify. However, at least the important internet traffic like emails and banking are protected which is good. So although the VPN may not work 100% correctly all the time, you are getting an infinitely greater amount of privacy by using the VPN when traveling or visiting new places that you are unfamiliar with where there could be a rogue access point. Again, though to clarify you should not do this against devices you do not own or have the permission to test against. I am showing you this more as a warning of what is out there and why you should be careful when connecting to unknown Wi-Fi and to use a VPN whenever you can.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDFdgG2VhMHP9zDEZZKDFoyFErywZr64WeSGhXUavS5ZzsDS2D0ZNCfBFpnmr1p5TxHV52GZoRSavfmEMPIl9vn_wzsdpmnv1HMcm59iyUSAKrf9AEqmqEWdhXrzIU9pb2mo2aliFdfH-b/s2048/spotify_gettingthrough_nordvpn.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1536&quot; data-original-width=&quot;2048&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDFdgG2VhMHP9zDEZZKDFoyFErywZr64WeSGhXUavS5ZzsDS2D0ZNCfBFpnmr1p5TxHV52GZoRSavfmEMPIl9vn_wzsdpmnv1HMcm59iyUSAKrf9AEqmqEWdhXrzIU9pb2mo2aliFdfH-b/w640-h480/spotify_gettingthrough_nordvpn.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;So is there anything else you can do. Yes, there is one more thing I thought of in this analysis that I don&#39;t think it would be complete without and that is - location. Yes, what is the real point of detecting a nefarious device that is connecting if you are then not able to localize yet. Find it? How, it is invisible? Not really. I found another very interesting tool for android phones. This doesn&#39;t exist for iOS yet, but I hope that is in the works somewhere. This app is called &lt;a href=&quot;https://play.google.com/store/apps/details?id=net.wigle.wigleandroid&amp;amp;hl=en_US&amp;amp;gl=US&quot;&gt;WiGLE WIFI Wardriving&lt;/a&gt;. With this app using the phones GPS and maps we are able to do wireless site surveys that show us precisely where a device is based on an SSID or mac address. This can even help you locate Bluetooth devices. So here I wanted to confirm that my device was indeed correctly connected to the Wi-Fi honeypot and the location is correct and I can confirm I&#39;m connected to the right device. This can also be used to find the device by mac address that was initially logged in our first honeypot. So we have also gone a layer deeper with the wireless site surveys and can now not only identify nefarious devices that have connected but we have a way of finding the location of the devices.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoegyhqKn4yy3LT9Krx9BWeBtHu8GyDiZDY1LQJ2dxz582vPMbNvvtUy6UhRUCnNiC-FLNBT8AEnhkEyPKzgvhEHtHgesq6X5aaaZPb8Eld-LcYOXmSBXYHGCQQ9k3FJq03_1h4ycbMVrS/s2048/wigle_net_wifi.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;2048&quot; data-original-width=&quot;1536&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoegyhqKn4yy3LT9Krx9BWeBtHu8GyDiZDY1LQJ2dxz582vPMbNvvtUy6UhRUCnNiC-FLNBT8AEnhkEyPKzgvhEHtHgesq6X5aaaZPb8Eld-LcYOXmSBXYHGCQQ9k3FJq03_1h4ycbMVrS/w300-h400/wigle_net_wifi.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;

</description><link>http://jgardnerla.blogspot.com/2021/07/whats-pumpkin-honeypot-and-why-you.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKto-1d6hvu_kQ1CeTnYkc519ONCrMPgBM5aAQRlMJVT-GnrGOjw28Jn8da7eW8e-ZENgfHFUNoAw9VRuLOVmkqGU5A3AGLrL7jExNj9l1WlnIMCf61PNZvgAjiRX1J0zq57sULu_JTdIH/s72-c/kali_portable_hacking_machine_blogger.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Los Angeles International Airport (LAX), 1 World Way, Los Angeles, CA 90045, USA</georss:featurename><georss:point>33.9415889 -118.40853</georss:point><georss:box>19.46426497753513 -135.98665499999998 48.418912822464868 -100.830405</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-6669960663847757403</guid><pubDate>Thu, 18 Mar 2021 20:29:00 +0000</pubDate><atom:updated>2021-03-18T13:29:57.837-07:00</atom:updated><title>Raspberry Pi WiFi Honeypot 🍯</title><description>&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;This was a fun project to work on and build out. I learned a few new interesting tricks along the way. I started with this tutorial from 2013 by &lt;a href=&quot;https://andrewmichaelsmith.com/2013/08/raspberry-pi-wi-fi-honeypot/&quot;&gt;Andy Smith&lt;/a&gt;. However, a few things have changed with hostapd that I had to figure out through debugging. Also, the configuration of the nginx server as well as dnsmasq were slightly different for me using the new Raspbian Buster for Raspberry Pi 4.&amp;nbsp; This should save you some time if you follow my trick tips later on in the article that I found by searching through various message boards and googling error messages as I did debugging to get this working properly.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;I have gone over &lt;a href=&quot;https://www.blogger.com/blog/post/edit/469193354808242650/8999636226988786540&quot;&gt;setting up nginx&lt;/a&gt; servers in previous articles so if you need help with getting started these may be helpful.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;So first things first. I started with a canakit and assembled the raspberry pi with the appropriate heat sinks and a little fan set to a standard speed. The speed is adjusted by how you install the wiring. If you haven&#39;t done this before you can follow the manufacturers documentation to get rolling with that.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6SqVsLIdIeLPpM6MkShUhDp57V8omX_3h4YfaA1h2fgYdYcV7ZNjqvpNQAY6iQXeFO5pyGnbc7jWqGHHnWGOT4LrJa6GxASajWSACEeYGzVfr1QjN8IuyghFrEdm0FktoXXUcrqYXEBpi/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img alt=&quot;Assembling the Raspberry Pi&quot; data-original-height=&quot;2048&quot; data-original-width=&quot;1536&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6SqVsLIdIeLPpM6MkShUhDp57V8omX_3h4YfaA1h2fgYdYcV7ZNjqvpNQAY6iQXeFO5pyGnbc7jWqGHHnWGOT4LrJa6GxASajWSACEeYGzVfr1QjN8IuyghFrEdm0FktoXXUcrqYXEBpi/w480-h640/image_67221761.JPG&quot; title=&quot;Assembling the Raspberry Pi&quot; width=&quot;480&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Assembling the Raspberry Pi. Hardware assembly is fun if you like puzzles :).&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Next I flashed the micro SD card with Raspbian Buster which is the operating system that will be on this tiny computer. I used a little adapter and balenaEtcher on a mac to flash the micro SD card. This is pretty straight forward so I won&#39;t go into the details since there are plenty of easy tutorials to do this part.&lt;/span&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;2048&quot; data-original-width=&quot;1536&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNYYtWV3rGvQ7xrrP8eeRPMwzoJ5ztlJ1POXR0H1NUBvN1q4FNnOnuQGkoaCOtFC87m4WgutYwG-lxX6aCnuEEmjRodkgxMdTeLhyuF5No_cCOQqEAiEQ0uZDXJ2ZGJgj8x0gN5ToiV74O/w240-h320/image_67148801.JPG&quot; width=&quot;240&quot; /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Success! The card is flashed and we are ready for the next steps.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;At this point I went ahead and added a WiFi dongle that can support running as an access point. Additionally for configuring I went ahead and plugged in a keyboard and mouse with a usb hub so now this is looking very cyberpunk but I promise this will be easy and very efficient as we go along further.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;1536&quot; data-original-width=&quot;2048&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKSDAOuuDCU8kjixnNH-taPQp8bpPLX73KsxYdR9EAPfGwe0Ofu_HfKRmRJv5BehFjcdE1NKQMQxmgWz_QS4YtPr5OmZGSVyjkKl8sdwrrmfkQmIOk93ULnGwSeJELMza8VjD1WP9aIa8V/w400-h300/image_50444801.JPG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Now I did this project over two separate nights so the additional step here is that you will need to briefly connect this to an ethernet cable to grab a few things. Eventually this is not connected to ethernet so we can have a truly sandboxed wifi honeypot that is not connected to the internet and is merely to log attacker activity and attempted access. I plugged in the ethernet cable and grabbed hostapd, nginx, and dnsmasq.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;The honeypot at a high level is a simple but quite interesting concept. We will spin up an access point with hostapd that can be joined from a phone or laptop. Here I called the honeypot network &#39;decepticonNetwork&#39;. Then with a neat little trick dnsmasq will now redirect all requests to our local nginx server which is serving up the little warning page. Getting hostapd up and running is not as easy as it was before but it is more for security that it does not come unmasked out the box so to speak. Through the command line I ran commands to unmask, enable and start and it finally connected properly to both a laptop and a phone.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTY_X5qOdmlaPuuZg0C8yuWW-SEeMYu2oltWx8u7GLIRkWDkiuXUBgaMmNPGQ_0EsAd3aeND3Lg1Ibgm0FvxIhoGdtdRkpExDrwN8Tr_jiHAdzWdUiNQ62ER0wnJW81mrGXXVgGlYa9WY-/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img data-original-height=&quot;2436&quot; data-original-width=&quot;1125&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTY_X5qOdmlaPuuZg0C8yuWW-SEeMYu2oltWx8u7GLIRkWDkiuXUBgaMmNPGQ_0EsAd3aeND3Lg1Ibgm0FvxIhoGdtdRkpExDrwN8Tr_jiHAdzWdUiNQ62ER0wnJW81mrGXXVgGlYa9WY-/w296-h640/image_123986672.JPG&quot; width=&quot;296&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Now you can configure the nginx server to do anything you want when the device that illicitly connected to our untrusted network tries to access a webpage. I redirected all web requests to my nginx server using dnsmasq. So now after connecting to &#39;decepticonNetwork&#39; if I type in any url like somerandomurl.com or blaaaaargh.com my nginx warning page gets served up.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkZZ6C2CTRKNiCHzj-lDL0QxsQakQ1eovovznqxwfn_CUWg04dKBDSDacoIGAZHDkXB3oY5Dc0rCsQdsB02SyK3hWT_UIndqG0RCV0Ts4JKI5g7SFUm2vrogOW_2DpiTDq_TQ3YKBU-OX/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;2048&quot; data-original-width=&quot;1536&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkZZ6C2CTRKNiCHzj-lDL0QxsQakQ1eovovznqxwfn_CUWg04dKBDSDacoIGAZHDkXB3oY5Dc0rCsQdsB02SyK3hWT_UIndqG0RCV0Ts4JKI5g7SFUm2vrogOW_2DpiTDq_TQ3YKBU-OX/w480-h640/image_123923953.JPG&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Also a fun extra here is that now all users who access the WiFi honeypot are now logged in a dnsmasq.log file for later analysis and review. This was a fun learning experience. Obviously this is just the beginning as you can then get a lot more advanced with your logging and blue team analysis and defense. However, this is a great introductory start to the world of WiFi honeypots and cyber defense.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><link>http://jgardnerla.blogspot.com/2021/03/raspberry-pi-wifi-honeypot.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6SqVsLIdIeLPpM6MkShUhDp57V8omX_3h4YfaA1h2fgYdYcV7ZNjqvpNQAY6iQXeFO5pyGnbc7jWqGHHnWGOT4LrJa6GxASajWSACEeYGzVfr1QjN8IuyghFrEdm0FktoXXUcrqYXEBpi/s72-w480-h640-c/image_67221761.JPG" height="72" width="72"/><thr:total>1</thr:total><georss:featurename>Bermuda Triangle</georss:featurename><georss:point>25 -71</georss:point><georss:box>-3.4082613935512107 -106.15625 53.408261393551214 -35.84375</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-3562119086907340030</guid><pubDate>Thu, 03 Dec 2020 20:57:00 +0000</pubDate><atom:updated>2020-12-03T13:00:57.868-08:00</atom:updated><title>Hack The Box - Swagshop - CTF writeup </title><description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2LRrCyXEuuTrn8tFtnCJCDWHNrreAwQ-7aI3PGtpBmLqP1dh7tiSTec1u9cWyXx3PGe6E__ck3_uGKWQEFBa0P8Okg59Be4hYeiC8D2W842MXSRcjJkyQ-Dx-2U2ZKxzE5UaS5c8JjZAR/s367/title_snapshot_0.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;112&quot; data-original-width=&quot;367&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2LRrCyXEuuTrn8tFtnCJCDWHNrreAwQ-7aI3PGtpBmLqP1dh7tiSTec1u9cWyXx3PGe6E__ck3_uGKWQEFBa0P8Okg59Be4hYeiC8D2W842MXSRcjJkyQ-Dx-2U2ZKxzE5UaS5c8JjZAR/s320/title_snapshot_0.png&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;So in preparation for the OSCP and to get better at understanding security vulnerabilities I have been doing what are commonly referred to as capture the flag challenges. Here I will go over a unique vulnerability that allows remote access to a &quot;user.txt&quot; file and a &quot;root.txt&quot; file. The root.txt file can only be acquired remotely if I can gain remote command execution as the root or system user. Since this is a Linux based system I will be trying to escalate my privileges up to root so I can control the system and do the file retrieval.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;The biggest and initial step is enumeration. So far I just know there is a box with an IPv4 address of 10.10.10.140. From the name I can assume perhaps that this is a shop of some kind but that is all the initial information given. In essence this CTF is mirroring what you would refer to as black box testing in a security or penetration testing job. Here perhaps a shop owner is concerned about their security and would like to see what if anything bad could happen if an attacker targeted their site so they can know what to patch or fix ASAP. Let&#39;s proceed with initial enumeration. I&#39;ll start with Nmap.&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNLLVOROg215BQOyEjBLe0GdLuIj31GtcbIznvPJvJfM_FpNx6b0SR_WGagAIzuPgmTciXqBeC4kfWV6yPWdCmERQB2kNRobCWua0AJBDdUj6nT6UJC0RH_RXjQwv38uWsD8CxfI0tfqHo/s767/swagshop_nmap_1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;368&quot; data-original-width=&quot;767&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNLLVOROg215BQOyEjBLe0GdLuIj31GtcbIznvPJvJfM_FpNx6b0SR_WGagAIzuPgmTciXqBeC4kfWV6yPWdCmERQB2kNRobCWua0AJBDdUj6nT6UJC0RH_RXjQwv38uWsD8CxfI0tfqHo/w640-h307/swagshop_nmap_1.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;The initial Nmap scan reveals a common setup. There are two ports open. The service known as ssh or secure shell is open on port 22 which is operating with the tcp or transmission control protocol and is using OpenSSH 7.2p2. This allows an admin to remotely control the machine but without a password I would have to check the version to see if it is a vulnerable or patched version. Next I see that port 80 is open running from an Apache/2.4.18 Ubuntu server.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcUXi4vUplAEKKNf_L8kvaAXgZYtCFtATQse2no4bemBoCf1LY_1ypgX7vW-MdOO5-SwADK2oN0cyvkyBY8b9bWq1Y1oJQfxvGx7MX6FPMLA649WUsCzTh3w0Qj-RjNcUsb6rm6okL9a7x/s897/notconnecting.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;600&quot; data-original-width=&quot;897&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcUXi4vUplAEKKNf_L8kvaAXgZYtCFtATQse2no4bemBoCf1LY_1ypgX7vW-MdOO5-SwADK2oN0cyvkyBY8b9bWq1Y1oJQfxvGx7MX6FPMLA649WUsCzTh3w0Qj-RjNcUsb6rm6okL9a7x/w640-h428/notconnecting.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Well that is rather strange. Our initial scan revealed what appears to be a common web server but we are unable to connect on port 80. Perhaps let me try some DNS rebinding by adding this IPv4 address to my etc/hosts files so my local machine will resolve to the proper address.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEwEhxrAKX1qDddH8OJBJwuuxW2ASVh3vejGJdLuJtf2mp2XQ_nBz5cfoguAYhz1ETlNr-6ebOSK8JX-rY4eWh3pTUr_VJXiSOV7IYVSBJWD3pucnUEnXEQBu4tguAQR-Umg6j2uqVgbyP/s657/etchosts.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;657&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEwEhxrAKX1qDddH8OJBJwuuxW2ASVh3vejGJdLuJtf2mp2XQ_nBz5cfoguAYhz1ETlNr-6ebOSK8JX-rY4eWh3pTUr_VJXiSOV7IYVSBJWD3pucnUEnXEQBu4tguAQR-Umg6j2uqVgbyP/w640-h220/etchosts.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier; text-align: left;&quot;&gt;It is still not loading. To double check to see if there is data and that it&#39;s not an issue from how I am browsing I like to get manual and use the command line. I used a simple cURL request to see the page.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMC9vIH9PP7nJxec3PewwWpOJSTZkoZFibtw-f_1whzrcMVhS9l2yVqENOob3u0m8nOjcEGRhEgGFMywjK8siyTn_6azFtXwF6LkPMT-GTsITzRKCJYfxfbBQeqltb3Gso9tMrzRMQHWKC/s937/curl_magento.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;495&quot; data-original-width=&quot;937&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMC9vIH9PP7nJxec3PewwWpOJSTZkoZFibtw-f_1whzrcMVhS9l2yVqENOob3u0m8nOjcEGRhEgGFMywjK8siyTn_6azFtXwF6LkPMT-GTsITzRKCJYfxfbBQeqltb3Gso9tMrzRMQHWKC/w640-h338/curl_magento.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Nice, now we are getting somewhere. This looks more like what I was expecting to be hosted on port 80. There is a webpage and I can see the store is running Magento and we are indeed looking at an e-commerce site.&amp;nbsp;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;It was a proxy issue I needed to configure this since in the background I am also using burpsuite to intercept and analyze requests. This just basically means I am routing all the traffic from the site through this tool that allows for more manual analysis and testing.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi64U2bFBmJbeKlQUW_5l0m_2FvQ4mV43q1PJ8fN-_YENW5YiZCh6-Q5k9ZjpWG4S1xV7FS36yHVAklkHZ0jzYHQzcEL4LelcRi1jHOxCQI9pJQJ6VJWxIoA78ArjhDUTDp_SYeUM5rSWWf/s830/proxy_configuration.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;707&quot; data-original-width=&quot;830&quot; height=&quot;546&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi64U2bFBmJbeKlQUW_5l0m_2FvQ4mV43q1PJ8fN-_YENW5YiZCh6-Q5k9ZjpWG4S1xV7FS36yHVAklkHZ0jzYHQzcEL4LelcRi1jHOxCQI9pJQJ6VJWxIoA78ArjhDUTDp_SYeUM5rSWWf/w640-h546/proxy_configuration.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Sometimes, trial and error is the best teacher. So in fact the site was actually not resolving because I was going to https://10.10.10.140 and not http://10.10.10.140. Since this is for practice the site does not have proper security certificates and therefore when trying to access via https the web browser by default tries to access port 443 which is unavailable. A request in a browser to http goes to port 80 which is open and now here we are at the store.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiKvfqAiC29Rlo8dJ9tEVHEePeUKAPMvV-s0ZR0H0IF0zDUPnAYdwVkBCUutRMWYwCxnvsrrGxdyF7ijT4UUi-Uxqv9XF1xumyTZ3ZqDF573CZrafI3Vzfs5-O7pXn1BpyZo-M8FJcWDy7/s1046/magento_store.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;683&quot; data-original-width=&quot;1046&quot; height=&quot;418&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiKvfqAiC29Rlo8dJ9tEVHEePeUKAPMvV-s0ZR0H0IF0zDUPnAYdwVkBCUutRMWYwCxnvsrrGxdyF7ijT4UUi-Uxqv9XF1xumyTZ3ZqDF573CZrafI3Vzfs5-O7pXn1BpyZo-M8FJcWDy7/w640-h418/magento_store.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Now when I go to see the login page I see an interesting behavior in how the server is handling the request. It is common to see a login just served from a web root directory but here I see that there are path parameters in the URL which for a Magento site makes sense since these links are interacting with a database on the backend. So the URL I get sent to when I attempt to login is:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;http://10.10.10.140/index.php/customer/account/login/. The index.php before the /customer/account/login is of particular interest. Let&#39;s keep that in our notes and move forward.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;I now want to see what else is on this server so I will use &quot;gobuster&quot; as follows:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEN5KR2LO3Wai18EqhsoScFs1XN05XrwT6sPwrL19MHXMXrGKLyx6Zq2UsKg_00c2GYMVLexsz0fLVKBcociv-g76MiBzGILZzaaIzJ88HYBzdePGliAMylBWZoKrDsrlqtksjexUSR7SH/s720/gobuster.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;533&quot; data-original-width=&quot;720&quot; height=&quot;474&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEN5KR2LO3Wai18EqhsoScFs1XN05XrwT6sPwrL19MHXMXrGKLyx6Zq2UsKg_00c2GYMVLexsz0fLVKBcociv-g76MiBzGILZzaaIzJ88HYBzdePGliAMylBWZoKrDsrlqtksjexUSR7SH/w640-h474/gobuster.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Ok, /app with a 301 is interesting to me so I went and explored that folder. Within it I found /etc/local.xml. This config file has an install date and a key so I&#39;ll add that to my notes because keys are usually important if you find them lying around.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqLm5NPwSBnSI-bZfw1WmOri1Fdl3RLtGeAdirkCQTASkuIDCzf5x6VTrXB-Dv01qyVw1wU8hQxo8i2ZtJeRivkL8LSJuzBzj8jM3sgoPGpK22TFve2dgIWO7jD34lxA6akq7pUI7OlPiX/s727/app_xml.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;706&quot; data-original-width=&quot;727&quot; height=&quot;622&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqLm5NPwSBnSI-bZfw1WmOri1Fdl3RLtGeAdirkCQTASkuIDCzf5x6VTrXB-Dv01qyVw1wU8hQxo8i2ZtJeRivkL8LSJuzBzj8jM3sgoPGpK22TFve2dgIWO7jD34lxA6akq7pUI7OlPiX/w640-h622/app_xml.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Also, the site is using Mage with a copyright date of 2008. Let&#39;s check the site to see what version of Magento they are running. Wow, just as I suspected they are running a very old version of Magento. This store is being setup with a 2014 version of Magento. It is always important to use the latest versions of software to have the latest patches against dangerous vulnerabilities. This got me thinking I should perhaps see if I don&#39;t have to reinvent the wheel here. Ok, this is good, there appear to be quite a few exploits within Metasploit for Magento. Perhaps what we are looking for already exists which will make this engagement a lot easier than having to code some exploits from scratch. The one that first stands out in the list of potential exploits is the authenticated remote code execution. However we will have to create an admin user to use that one. Upon doing some quick googling I come to find that there is also an exploit that allows me to create an admin user. Perfect. So this will be two steps to get the initial shell. I will have to create an admin account I can use and then run the following exploit with authenticated credentials to have the remote machine connect back to my testing(attacker) box. Here below I am looking at the exploit to create a new admin user. A few points to note are that the default username:password combination will now be forme:forme. In a real penetration test or red team engagement from a public IP you would want to change this to be secure so an attacker from the outside doesn&#39;t inadvertently use the backdoor you have just created. Here I am just on a VPN and this is a practice box so this is fine. Also, upon trying to navigate to the&amp;nbsp;/admin/Cms_Wysiwyg/directive/index/ directory I see that this is not allowed.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFvZj0ghAFDy9zJtdiTR_EYdk2ObothXQJ6eIX_rx17kGjd5Hf-lVLdUgXcVazfUDk0h9Tqv7t1IAwi48tCWM64__8v5iZ7x3dyWUp2YBIBufg6v5LQdE-E_KP8at6vfzQwgl_PW5WJiKO/s861/createadminexploit.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;642&quot; data-original-width=&quot;861&quot; height=&quot;478&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFvZj0ghAFDy9zJtdiTR_EYdk2ObothXQJ6eIX_rx17kGjd5Hf-lVLdUgXcVazfUDk0h9Tqv7t1IAwi48tCWM64__8v5iZ7x3dyWUp2YBIBufg6v5LQdE-E_KP8at6vfzQwgl_PW5WJiKO/w640-h478/createadminexploit.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Well this is rather strange. The directory in the exploit doesn&#39;t seem to be accessible in this version of Magento on this particular Apache server. This is going to create a big problem because without that working we won&#39;t be able to create the new admin account. But then I remembered something critical.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT_Di8vntJ1gMRdQiPOQnboSy9_Y8pjD9LTqRYMTbHETXjNwg8KsY-A4UfEecu1tWFTYcnSXphSKDjxHGw9CMJD1CIkWb0qy1VLhoKVuymx5n_197aRlesPY77R8_gdq7qW31pxizTYVWX/s721/magento_admin_panel.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;488&quot; data-original-width=&quot;721&quot; height=&quot;434&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT_Di8vntJ1gMRdQiPOQnboSy9_Y8pjD9LTqRYMTbHETXjNwg8KsY-A4UfEecu1tWFTYcnSXphSKDjxHGw9CMJD1CIkWb0qy1VLhoKVuymx5n_197aRlesPY77R8_gdq7qW31pxizTYVWX/w640-h434/magento_admin_panel.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Do you remember the path parameters from the initial reconnaissance? I tried including index.php before the directory in the url being requested in the exploit and am now granted access to an admin panel. This is great because now that we have a path to access the admin panel we can attempt to run the exploit without it just getting 403 errors from the server.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Ok, so here is a quick overview of the python exploit code I will run against this Magento server. Like I said before you would want to modify the password for security on a real red team engagement. However, here for the purpose of this exercise I am going to just set the target URL and include the path parameter of /index.php.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgemJl58W0-3cHCBfj9J9BRUj3__G_fn_oqb6kUQdTBsrbYeJGKJN6dX4ioD4eWIdyz-trZrsqlmbgDcxbY-JU3fSacH3-m8613OE8hKiMWMyyjPvis6ethRLnOYRwLhzEN5AK5Q9eK16y8/s1162/magneto_create_admin.py.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;882&quot; data-original-width=&quot;1162&quot; height=&quot;486&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgemJl58W0-3cHCBfj9J9BRUj3__G_fn_oqb6kUQdTBsrbYeJGKJN6dX4ioD4eWIdyz-trZrsqlmbgDcxbY-JU3fSacH3-m8613OE8hKiMWMyyjPvis6ethRLnOYRwLhzEN5AK5Q9eK16y8/w640-h486/magneto_create_admin.py.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Now it&#39;s time for the rubber to meet the road. Let&#39;s see if this exploit works.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh0ZpG8zwvGXtOeK6Ukdro4CN8kxl0L_6S54ejGPi7UXpfV2bsHABwyFTm8y1mDr79H7GP83LcyAnv9dyqhmjM_0s8108jee2nAxDepNNaDdNnZvk_zQcn1HzAhzWGyYnCGxaIpKewdBg1/s536/exploit_createadmin.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;392&quot; data-original-width=&quot;536&quot; height=&quot;468&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh0ZpG8zwvGXtOeK6Ukdro4CN8kxl0L_6S54ejGPi7UXpfV2bsHABwyFTm8y1mDr79H7GP83LcyAnv9dyqhmjM_0s8108jee2nAxDepNNaDdNnZvk_zQcn1HzAhzWGyYnCGxaIpKewdBg1/w640-h468/exploit_createadmin.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Excellent! The exploit worked and the first piece of this puzzle is finally falling into place. Let&#39;s test it out. We are now successfully logged in as user &quot;forme&quot;. There used to be another exploit that could be run within this panel but it has been patched on this version of Magento. So for now let&#39;s log out and return to the authenticated RCE code we had seen above now that we have a way for the program to authenticate with our newly created admin credentials.&amp;nbsp;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNFXb4-ymkYwegt4RdB3Qv2Dx6TeVWL_l9SSCMS3i1mnJz67kL57R3ipo3h0-A5C1BqYDNrzj4TCm8nUwbcH-0StskEEfTU-Yldyo-qMdjmHsCyuzHHLNs5ldSLlyzqVe0Z870NIXTC1dF/s1050/magento_admin_panel_loggedin1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;417&quot; data-original-width=&quot;1050&quot; height=&quot;254&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNFXb4-ymkYwegt4RdB3Qv2Dx6TeVWL_l9SSCMS3i1mnJz67kL57R3ipo3h0-A5C1BqYDNrzj4TCm8nUwbcH-0StskEEfTU-Yldyo-qMdjmHsCyuzHHLNs5ldSLlyzqVe0Z870NIXTC1dF/w640-h254/magento_admin_panel_loggedin1.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Now I will move onto the other python exploit and see what needs to be modified for this particular scenario. Interestingly enough it looks like there is a php function with an argument of &#39;system&#39; which will allow for the code execution. I configured it with the newly created credentials. And this highlights the importance of reconnaissance in addition to good note taking. I need the exact install date but I have that from the xml file I had found at the beginning in that /app folder. Perfect, this is the missing piece that this exploit needs to work against this particular version of Magento. The exact date and time of install are needed to proceed. Here below you can see how I modified the code:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyQwTwlK0r9Zckf-IgkMcWUCGvxCj87BqX6GzrDy75qDfcSmcKGrtef8qlVc1pnELrgy9wCAcSVbdtUjBvipD6Mw8P7c_s4bHY5eoSHAIn-hBeqcdYEKJtIN0Dk0ZE3sSfYhoVZrnYUFUt/s748/magento_call_pivot.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;442&quot; data-original-width=&quot;748&quot; height=&quot;378&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyQwTwlK0r9Zckf-IgkMcWUCGvxCj87BqX6GzrDy75qDfcSmcKGrtef8qlVc1pnELrgy9wCAcSVbdtUjBvipD6Mw8P7c_s4bHY5eoSHAIn-hBeqcdYEKJtIN0Dk0ZE3sSfYhoVZrnYUFUt/w640-h378/magento_call_pivot.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Well, that is not what was expected. It doesn&#39;t run and python is giving some error about no control matching. I see that the module being used in mechanize so I assume there are some issues with the automated requests being sent by this headless browser of sorts.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3W5jrVS3PK0aYUhsYHwu8Tso9FWRezZcb_mYGGHE_RWKWADpequs76eBX2whsUNoiOkQAtdEXYHNxvQp5TPYVd14KqTobvLQOzZhwt4nIqaNJNXOJ5xYwjm1rB8LZ25yE2CMfkbk_v-mJ/s693/filepathfixedforRCE.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;45&quot; data-original-width=&quot;693&quot; height=&quot;42&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3W5jrVS3PK0aYUhsYHwu8Tso9FWRezZcb_mYGGHE_RWKWADpequs76eBX2whsUNoiOkQAtdEXYHNxvQp5TPYVd14KqTobvLQOzZhwt4nIqaNJNXOJ5xYwjm1rB8LZ25yE2CMfkbk_v-mJ/w640-h42/filepathfixedforRCE.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Unfortunately, that wasn&#39;t it. I tried a few variations of the url, included the /index.php and /admin which seems to have solved that problem. Very cool. I don&#39;t want to get into all the debugging details but suffice it to say there were a few more variations to get this code running with the newer version of mechanize than when this box was first created. However, moving forward, when I tested with the system command of &#39;whoami&#39; I see that I am getting remote code execution on this system as &#39;www-data&#39;. This is good because now I can see if I can establish a foothold with a shell even if it is a low level shell like the one assigned to www-data. For good measure I want to make sure the script is executing on the server correctly so I try to retrieve the /etc/passwd file.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvJ2aLvbew3h8IlaULZbBAxDjBbejJ8QIjktgJ0dx7cBAQlvsKCEMS_bX7TMiAP1z9UfF5M0mOVwuZAot3oNcSSyC9wxhRI7JxkoopBjUanzpx4aVsXFRAwh6GMfSoQcOp9eXiyzaeNzVz/s742/cat_etc_passwd.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;450&quot; data-original-width=&quot;742&quot; height=&quot;388&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvJ2aLvbew3h8IlaULZbBAxDjBbejJ8QIjktgJ0dx7cBAQlvsKCEMS_bX7TMiAP1z9UfF5M0mOVwuZAot3oNcSSyC9wxhRI7JxkoopBjUanzpx4aVsXFRAwh6GMfSoQcOp9eXiyzaeNzVz/w640-h388/cat_etc_passwd.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;This is great because at this point I am able to do remote code execution on the remote machine. Now to have more control and possibly escalate my privileges I will need an initial shell which is an interactive prompt that allows me to control the machine remotely. I setup a simple netcat listener but had trouble. The issue was that it seems that a firewall was blocking all my attempts except on port 443. There was also something particular with the bash nesting for this to work. However, as you can see in the screenshots below I got the first shell and was able to upgrade it to a proper shell using &quot;python3 -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39;. Then you pause the session, modify it and return to an interactive prompt that now allows more editing without freezing or hanging.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4pVrTMROahEN6xlNYdYbwwp8VZOOCYoT2q-l7F1daCZ5Am90Ongn9C6tjSAX_xgWLBkJE32sNzZQhWpPRZvqNAU0XUOEiVx5gCU8jQ7_ILP7ScN_AbU28UTsmDcMjN03sxD6K9O6Q_0L_/s667/shell_w_upgrade.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;357&quot; data-original-width=&quot;667&quot; height=&quot;342&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4pVrTMROahEN6xlNYdYbwwp8VZOOCYoT2q-l7F1daCZ5Am90Ongn9C6tjSAX_xgWLBkJE32sNzZQhWpPRZvqNAU0XUOEiVx5gCU8jQ7_ILP7ScN_AbU28UTsmDcMjN03sxD6K9O6Q_0L_/w640-h342/shell_w_upgrade.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;At this point this solves the first challenge and from here it&#39;s a matter of just navigating to the user&#39;s desktop. In this case the user is named &#39;haris&#39; and the &#39;user.txt&#39; file is on their desktop.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP3OFuM_1VtODXpCHLgsxa73jtmGveMPX5XwzH9mKgzu5Ampr24H7OmdfGtBOD-nfq5RLNUzkaUE37-XQB9tZzcTxep5eETR6iCgHsx8wJKJ_NS7AWyyntR6FjQMpMvpIdvEpEvwO6yLEG/s767/sudo_l_swagshop.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;382&quot; data-original-width=&quot;767&quot; height=&quot;318&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP3OFuM_1VtODXpCHLgsxa73jtmGveMPX5XwzH9mKgzu5Ampr24H7OmdfGtBOD-nfq5RLNUzkaUE37-XQB9tZzcTxep5eETR6iCgHsx8wJKJ_NS7AWyyntR6FjQMpMvpIdvEpEvwO6yLEG/w640-h318/sudo_l_swagshop.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Now from the output above when checking for sudo privileges I see that this user has access to run /usr/bin/vi and appears to have wildcard editing access on /var/www/html/*.&amp;nbsp; I go ahead and open index.php in vi which is a process that I am now running as root. I then, instead of doing :wq! to exit do :!/bin/bash and I am dropped right into the root user&#39;s command prompt with full system control and privileges.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9keyjdTatP6DS3OH7frCpZKukDrEixr965w77iU7tKRI2Vu7marZMZH8MunF3DLRWRjBNr_IMIpnjETQX1BGKKhviK4hFLs_jxW8sbrnCfUc0ULAqdK_tjSDKQ9_l22dgz6Pq7wnsRB_3/s628/swagshop_root.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;226&quot; data-original-width=&quot;628&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9keyjdTatP6DS3OH7frCpZKukDrEixr965w77iU7tKRI2Vu7marZMZH8MunF3DLRWRjBNr_IMIpnjETQX1BGKKhviK4hFLs_jxW8sbrnCfUc0ULAqdK_tjSDKQ9_l22dgz6Pq7wnsRB_3/w640-h230/swagshop_root.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;From here it is a matter of just navigating to the correct folder to retrieve the &#39;root.txt&#39; flag. This was a fun box with some tricky little challenges in regards to path parameters in the url, python module debugging and finally an interesting privilege escalation at the end there. I have been learning a lot doing these challenges and I find that there are few things as exciting as getting to be &quot;root&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMI2wLAPN9JDdOFczGCtYvnfMVdQuNp3u12H86BzPhh2wWVmyuK6tQ246VksTdkx1bFLp0v0nxKcVX44VEUJ4nQPeq2WyXgJQ7S0SrI7eE2htnFCRnBcSo7bu4eLfBto6yR5QNu6nNrMWS/s422/root_removed_flag.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;231&quot; data-original-width=&quot;422&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMI2wLAPN9JDdOFczGCtYvnfMVdQuNp3u12H86BzPhh2wWVmyuK6tQ246VksTdkx1bFLp0v0nxKcVX44VEUJ4nQPeq2WyXgJQ7S0SrI7eE2htnFCRnBcSo7bu4eLfBto6yR5QNu6nNrMWS/w640-h350/root_removed_flag.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/12/hack-box-swagshop-ctf-writeup.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2LRrCyXEuuTrn8tFtnCJCDWHNrreAwQ-7aI3PGtpBmLqP1dh7tiSTec1u9cWyXx3PGe6E__ck3_uGKWQEFBa0P8Okg59Be4hYeiC8D2W842MXSRcjJkyQ-Dx-2U2ZKxzE5UaS5c8JjZAR/s72-c/title_snapshot_0.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-690770251863902036</guid><pubDate>Wed, 10 Jun 2020 00:40:00 +0000</pubDate><atom:updated>2020-06-09T17:42:20.396-07:00</atom:updated><title>PHP - Sending e-mail data from a server&#39;s localhost</title><description>&lt;div class=&quot;separator&quot;&gt;&lt;div style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot;&gt;This is a fun example I created from following some tutorials on YouTube. I have built SMTP servers in previous examples, but this can be used to send e-mails from a webpage to a server for contracts or something as simple as a guestbook where an admin would like to have a system send automated e-mails to marketing, sales or management teams.&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;I used the PHPMailer library found on GitHub for the backend processing. For the front page I just made a simple form where the user can send a resume to a recruiter.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;img border=&quot;0&quot; data-original-height=&quot;952&quot; data-original-width=&quot;862&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjytdzRrpXEVXSKvrueL1z1JmITN6z0oKDt6gOh5CP_YJyCmgb1iIwILQJf_vRikcQbzB4PoiQvZ3vraz98bihfjdTiy_LJ2nvr4I04vKp5czt_WBBnVLK0LhfupGhQH9CazG3f2L3RTqLA/w580-h640/Screen+Shot+2020-06-08+at+4.43.53+PM.png&quot; width=&quot;580&quot; /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;And don&#39;t worry this won&#39;t just let you put any name in the email text box. The e-mails need to come from a legitimate source such as the secured website where this will be hosted in production. The above was rendered from the code below. Nothing fancy here, just a simple form for submitting attachments.&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;460&quot; data-original-width=&quot;1232&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixY7cixTGAj6kJARpcS60oMEL5WHkLCh1hgteBkoiIzmRr1bfkeW4dvesRBcu-xV_jcw69KxGh3CzpSXVaa34AoPbv2_POnd2ZzBnJy77e2AMWHr9GUEApd21rsWK-10DBrDebtMpZZODJ/w640-h238/Screen+Shot+2020-06-08+at+6.10.14+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;Success! The form works as intended and I got the test e-mail in my Gmail inbox from my test server.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9tFPLs43MgztwrZjFmS7vIzxdXSxcW1QZgt0wW3_DOVqMMNkbFmETdfF1P_9P7pKbKdFW-AAjC33TecYNEdZhG2jjchTStqebMgTNzKJrsPPcyOinFbYBbHQ8jsdBXlI9lVtSjBy2gm_c/s1534/phpmail_shot1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;427&quot; data-original-width=&quot;1534&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9tFPLs43MgztwrZjFmS7vIzxdXSxcW1QZgt0wW3_DOVqMMNkbFmETdfF1P_9P7pKbKdFW-AAjC33TecYNEdZhG2jjchTStqebMgTNzKJrsPPcyOinFbYBbHQ8jsdBXlI9lVtSjBy2gm_c/w640-h178/phpmail_shot1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/06/php-sending-e-mail-data-from-servers.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjytdzRrpXEVXSKvrueL1z1JmITN6z0oKDt6gOh5CP_YJyCmgb1iIwILQJf_vRikcQbzB4PoiQvZ3vraz98bihfjdTiy_LJ2nvr4I04vKp5czt_WBBnVLK0LhfupGhQH9CazG3f2L3RTqLA/s72-w580-h640-c/Screen+Shot+2020-06-08+at+4.43.53+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-7413723323366672186</guid><pubDate>Wed, 03 Jun 2020 16:21:00 +0000</pubDate><atom:updated>2020-06-03T09:26:40.922-07:00</atom:updated><title>PHP &amp; jQuery - File/image uploader</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;For this example I created a page where a user can upload files &amp;amp; images to a web server. The items are stored and reflected so the user can see their multiple uploads. With PHP below I am handling the uploads and if the file already exists the user is notified that they are trying to do a duplicate upload.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPwbBmOzYiqa3ZQzMSlURLogT5MqcFBMJvjVAUNDEgUWVf0xlw_4bdTaAU3-73FrC84aOoazBOHq2mP8ZkIu3CuWXrNOknqoQ6qeQFIqgz_7rlOPWu0VV9tLDULnfJwxyrTL9TM6wqrDVC/&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;374&quot; data-original-width=&quot;1150&quot; height=&quot;208&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPwbBmOzYiqa3ZQzMSlURLogT5MqcFBMJvjVAUNDEgUWVf0xlw_4bdTaAU3-73FrC84aOoazBOHq2mP8ZkIu3CuWXrNOknqoQ6qeQFIqgz_7rlOPWu0VV9tLDULnfJwxyrTL9TM6wqrDVC/w640-h208/Screen+Shot+2020-06-02+at+4.17.41+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;And here this is defining the main work being done by this page. This is handling the file type to only allow images with extensions of: .gif, .jpg, .png, .jpeg. The size is also restricted to 500KB.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhifxyoZJmrRTpAx9kg0MW4e9H-n6O_jphBz2UV7IATbNNNzB3sEN77oCYhioXw4fjhKcCfuvMw9nqG1tuzQVEjkyyw0Ac9jizE7wPwydWT6FmF6BqaN_kDGinhagGZu85-sLGp-upYWMhf/&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1056&quot; data-original-width=&quot;936&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhifxyoZJmrRTpAx9kg0MW4e9H-n6O_jphBz2UV7IATbNNNzB3sEN77oCYhioXw4fjhKcCfuvMw9nqG1tuzQVEjkyyw0Ac9jizE7wPwydWT6FmF6BqaN_kDGinhagGZu85-sLGp-upYWMhf/w568-h640/Screen+Shot+2020-06-02+at+4.19.06+PM.png&quot; width=&quot;568&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;This is what the page looks like below with a little formatting. The alert below was triggered by trying to upload a file without one of the allowed extensions.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWQq2sHJY4-AMK75-p6HIdL2iqiQFBzt1X9YBrMl4JO3-RiZtOBm8PILnd-aFApKuaZ49y3k3bAxqaRGde33EspNStnNlPYP3gLWq2oUmgJXUlpqVcRiYKFsGcKb38qTb3aO0claaXYJFR/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;888&quot; data-original-width=&quot;1694&quot; height=&quot;336&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWQq2sHJY4-AMK75-p6HIdL2iqiQFBzt1X9YBrMl4JO3-RiZtOBm8PILnd-aFApKuaZ49y3k3bAxqaRGde33EspNStnNlPYP3gLWq2oUmgJXUlpqVcRiYKFsGcKb38qTb3aO0claaXYJFR/w640-h336/Screen+Shot+2020-06-02+at+3.41.30+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot;&gt;This is now echoing back to the screen the file size restrictions because an excessively large file was being uploaded.&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH8KQhGTxKRLlIOvcAgcnJQJ8VRVaxisZFz1tvCBmCBnnCb1LUvTxCLXi9Hw7rhJ9F2DvRBv2bYpM4nCoWyF1x3ZP1PaBKruXmaavpZPb9a4g6OXUSGwKPJm31fJSpYJO5asl7WVzgmf6Q/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1010&quot; data-original-width=&quot;1760&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH8KQhGTxKRLlIOvcAgcnJQJ8VRVaxisZFz1tvCBmCBnnCb1LUvTxCLXi9Hw7rhJ9F2DvRBv2bYpM4nCoWyF1x3ZP1PaBKruXmaavpZPb9a4g6OXUSGwKPJm31fJSpYJO5asl7WVzgmf6Q/w640-h368/Screen+Shot+2020-06-02+at+3.53.43+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;In this block I create the div tags for the &quot;dropZone&quot; above and set the input type to handle the multiple attachments as an array.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1m-UcK9YuPnOd_tcB31K-Fsfhju1vpGbu-B0JDFRyQ3SLrhXSq7ji9eumTucqfqZgcFwRfvNhXudvH4qJ3BQdRRkqB7I4nvaJlpOGcfgJUjuz63Qivdo5_W4lQV3BzQXEYiD61GDCVmoS/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;276&quot; data-original-width=&quot;872&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1m-UcK9YuPnOd_tcB31K-Fsfhju1vpGbu-B0JDFRyQ3SLrhXSq7ji9eumTucqfqZgcFwRfvNhXudvH4qJ3BQdRRkqB7I4nvaJlpOGcfgJUjuz63Qivdo5_W4lQV3BzQXEYiD61GDCVmoS/w640-h202/Screen+Shot+2020-06-02+at+4.18.23+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot;&gt;And now below you can see what the page looks like after multiple successful image file uploads. The completion stage of the file uploads are shown during the upload. With this a user can upload images to a CRM system for sales, a profile picture for social media or a variety of other systems. The file types and sizes here were customized so this same format can be used to upload any file type of any size.&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmezxev8V35RaY_O2PySr9NDkKg68DYqcspoq2qweEpXLKpEkAh64-IPXCaHOvKeSan96-x2cCBGureBst0UCzKf7XPI6Vgw-bEf0Izmz3qy77ESa55hFeb_iu_XqKtxBdLbbH1XIsXwUi/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1096&quot; data-original-width=&quot;1314&quot; height=&quot;534&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmezxev8V35RaY_O2PySr9NDkKg68DYqcspoq2qweEpXLKpEkAh64-IPXCaHOvKeSan96-x2cCBGureBst0UCzKf7XPI6Vgw-bEf0Izmz3qy77ESa55hFeb_iu_XqKtxBdLbbH1XIsXwUi/w640-h534/Screen+Shot+2020-06-02+at+4.17.18+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/06/php-jquery-fileimage-uploader.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPwbBmOzYiqa3ZQzMSlURLogT5MqcFBMJvjVAUNDEgUWVf0xlw_4bdTaAU3-73FrC84aOoazBOHq2mP8ZkIu3CuWXrNOknqoQ6qeQFIqgz_7rlOPWu0VV9tLDULnfJwxyrTL9TM6wqrDVC/s72-w640-h208-c/Screen+Shot+2020-06-02+at+4.17.41+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-3051256021884352574</guid><pubDate>Mon, 01 Jun 2020 21:54:00 +0000</pubDate><atom:updated>2020-06-01T14:54:11.817-07:00</atom:updated><title>Using Google reCAPTCHA v2</title><description>&lt;font face=&quot;courier&quot;&gt;What is a reCAPTCHA? You have seen them online and perhaps have been wondering how they work. I know I have been seeing these for years but didn&#39;t really understand them until I saw the process. In this example I don&#39;t go into the creation of the system behind reCAPTCHA&#39;s, but rather here I am just showing how to use the Google reCAPTCHA v2. I have seen these used ubiquitously all over the internet and I decided to learn what they are and how I can implement them on my own sites to verify that my site&#39;s users are indeed people and not bots.&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;The PHP is pretty standard. I send the API a user&#39;s name, Key, response Key and IP address. Then I get the file contents, decode the JSON and verify a user&#39;s authenticity.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;PHP CODE:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwYpsYTMQbkcd9jPPY6AZ_ldpMjLlWwV1r1CY1K1bW0_k6KkVFqffOFNyOLS1oInHlTVbwE9Drb5i8NIME-D_Z17ET97PDG-4s3wuncZIg7vBC_C6grV-IljwTV2rUT3tQSTMtiGLdnuns/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;510&quot; data-original-width=&quot;1030&quot; height=&quot;316&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwYpsYTMQbkcd9jPPY6AZ_ldpMjLlWwV1r1CY1K1bW0_k6KkVFqffOFNyOLS1oInHlTVbwE9Drb5i8NIME-D_Z17ET97PDG-4s3wuncZIg7vBC_C6grV-IljwTV2rUT3tQSTMtiGLdnuns/w640-h316/Screen+Shot+2020-06-01+at+1.29.57+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;HTML CODE:&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;The HTML code for this example is just a simple sample text box form for a user&#39;s name, this can be for a username, email or even to verify if a survey is being taken by a human rather than by a bot. The uses for this are endless and that is why you can find these all over the internet.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBW9GPb2Qzyzc35IyCItUAJVqtrd2QvX8MTtzniwtqGpp1g1lsUJGGBjJTVhS37jXg6Ctzc2h_6nDkEbBfnI6wiqBXTfYFHQSMIi1uPPhfXtujfpr48-3jdvDFvRVgiOZNgNU8K5EJnOx1/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;988&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBW9GPb2Qzyzc35IyCItUAJVqtrd2QvX8MTtzniwtqGpp1g1lsUJGGBjJTVhS37jXg6Ctzc2h_6nDkEbBfnI6wiqBXTfYFHQSMIi1uPPhfXtujfpr48-3jdvDFvRVgiOZNgNU8K5EJnOx1/w640-h262/Screen+Shot+2020-06-01+at+2.21.44+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;This next part had me stuck for a moment, I had been referencing some old tutorials and now Google has buttoned down their security for this a bit. To get the correct responses the site needs to be served over HTTPS. I quickly added an SSL cert with Let&#39;s Encrypt and now it works properly. Here in this screenshot you can see a simple form box where you can enter your name. Once a user clicks the reCAPTCHA and it verifies that they are not a bot the request is accepted and I am just echoing back the user input. For an application or website I would just pipe the output to whatever database or other page rather than the echo which is done here for illustrative purposes below.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfr5D8b-Zeg2Ijr_6Ooh5jaa-v0IqiVoKNzLKQoivW-nwx-QjUedyxwXukfySpVKE0HyFOiDPuCcHt_aTT_Ti9zWD4RgEhdKNywNjdPprUbfAtJKm1yulzvfzOltzrBi-Atp-uL9LSb1r/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;312&quot; data-original-width=&quot;668&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfr5D8b-Zeg2Ijr_6Ooh5jaa-v0IqiVoKNzLKQoivW-nwx-QjUedyxwXukfySpVKE0HyFOiDPuCcHt_aTT_Ti9zWD4RgEhdKNywNjdPprUbfAtJKm1yulzvfzOltzrBi-Atp-uL9LSb1r/w640-h298/Screen+Shot+2020-06-01+at+2.36.39+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot;&gt;I included this to show the flow of reCAPTCHA although most people have probably seen this as they explore the internet.&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn0h03O70z29xy9yKCXRKsChAgRyMr5gRCLmyrgb1f2AD96h90JylkbmscgbtF-l0BC-a8fW_jvZ2tbqc5oIvFBP2Yy7CkdrgBYnzFjCt2WOFKtFy3pDBNgoHzhnpc-GVD832S2C2jrua3/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1280&quot; data-original-width=&quot;998&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn0h03O70z29xy9yKCXRKsChAgRyMr5gRCLmyrgb1f2AD96h90JylkbmscgbtF-l0BC-a8fW_jvZ2tbqc5oIvFBP2Yy7CkdrgBYnzFjCt2WOFKtFy3pDBNgoHzhnpc-GVD832S2C2jrua3/w313-h400/Screen+Shot+2020-06-01+at+1.23.23+PM.png&quot; width=&quot;313&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;Upon successful completion of the above little exercise the system authenticates that a user is authentic or not. Here since the reCAPTCHA was completed successfully and I entered my name as &#39;J&#39;, the system tells me it verified that I&#39;m not a bot and that is has captured my name as &#39;J&#39;. This system is particularly interesting because its initial purpose was to help digitize illegible books and now it&#39;s used to verify users as humans. So not only did I learn some cool PHP tricks while learning how to do this, I also learned a little more about internet history.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkjIOQWCHvCZzvjWCsPODMROuu1d2iBHxTw0VChp9So8h8wlLlobnq2DQjTbXqTK5gbndD7ox3m-yIq_pzWzD1-CPBN1J8pw18Onuj_3pnlNdUwp7CzpgU36eX1dSY3Vs3knwl4RYD6XP/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;362&quot; data-original-width=&quot;776&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkjIOQWCHvCZzvjWCsPODMROuu1d2iBHxTw0VChp9So8h8wlLlobnq2DQjTbXqTK5gbndD7ox3m-yIq_pzWzD1-CPBN1J8pw18Onuj_3pnlNdUwp7CzpgU36eX1dSY3Vs3knwl4RYD6XP/w640-h298/Screen+Shot+2020-06-01+at+1.23.10+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/06/using-google-recaptcha-v2.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwYpsYTMQbkcd9jPPY6AZ_ldpMjLlWwV1r1CY1K1bW0_k6KkVFqffOFNyOLS1oInHlTVbwE9Drb5i8NIME-D_Z17ET97PDG-4s3wuncZIg7vBC_C6grV-IljwTV2rUT3tQSTMtiGLdnuns/s72-w640-h316-c/Screen+Shot+2020-06-01+at+1.29.57+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-2161715985843794931</guid><pubDate>Thu, 21 May 2020 15:51:00 +0000</pubDate><atom:updated>2020-06-05T21:25:52.673-07:00</atom:updated><title>PHP - CSRF tokens</title><description>&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;In this example I created a simple CSRF token to validate a user&#39;s identity. Obviously the final implementation is going to take more than what I am showing here. But the point here is to understand what CSRF tokens are, how they are created and how they are used.&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;A CSRF token, is unique to each user and is created in a randomized way. It is then used to identify the subsequent HTTP request and make sure the server is communicating the right data with the correct client. Below in PHP I start a session and then you can see that the session key tied to each user is a bin2hex() function which converts a string of characters to hexadecimal values. So that it remains unpredictable it is then multiplied using the random_bytes function. Random_bytes is a function that cryptographically generates pseudo-random bytes.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;396&quot; data-original-width=&quot;660&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZHQjxfA-ejjhsEBJv-j4vQ3Bsu7N9gJzCJ3_C_0DE6JRD4jmgV8YHlltQJb6LRaWqfjIt07kPGwhSVsnM-5jKyPMUjkhAJ79eXCYlTYtwX3BPJbv9FM7rGjG_UlGLXzLNWZjuwXlnr3GY/s320/Screen+Shot+2020-05-20+at+4.46.12+PM.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZHQjxfA-ejjhsEBJv-j4vQ3Bsu7N9gJzCJ3_C_0DE6JRD4jmgV8YHlltQJb6LRaWqfjIt07kPGwhSVsnM-5jKyPMUjkhAJ79eXCYlTYtwX3BPJbv9FM7rGjG_UlGLXzLNWZjuwXlnr3GY/&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;The HTML is a simple submit form where a user enters their name and a CSRF token is then created. Within this code you can see that the CSRF token is created using sha256 encryption. Then when the CSRF token matches the name that is submitted the page will reflect &quot;Your name is: (your name you have submitted)&quot;.&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;Here is what the output looks like when the name matches the token.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFuI5F14yDp79UYcf3hnZMjDerA0zkCo7WrNSoczvMNFo1l4oXRkXm_2RbnhxMjxWW1JP4pf1IGyobGYgDIwkpJ9L5qZvW3_KbK21Ii8kdpwyuMMhYIRA87NVL6MIedJNGxuS8yK-Radgb/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;200&quot; data-original-width=&quot;678&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFuI5F14yDp79UYcf3hnZMjDerA0zkCo7WrNSoczvMNFo1l4oXRkXm_2RbnhxMjxWW1JP4pf1IGyobGYgDIwkpJ9L5qZvW3_KbK21Ii8kdpwyuMMhYIRA87NVL6MIedJNGxuS8yK-Radgb/w640-h188/Screen+Shot+2020-05-21+at+8.33.27+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;Here is a view from the Console to see what the page is doing. You can see the long encoded csrf value that is created when I enter my name &#39;Jason&#39;.&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifgC0zorGgdgUlGkS4zGyt57MD-Dg7yDc32L7Ka4liEBnnUWQhr1pvKdLGYpJwU7GC9uo7alJaW3ICsrWX6u6hpZGYo1piumY4mjctveHQ-bFmthHSva19V4N40M2m2ua6-A868KhERqtB/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;340&quot; data-original-width=&quot;994&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifgC0zorGgdgUlGkS4zGyt57MD-Dg7yDc32L7Ka4liEBnnUWQhr1pvKdLGYpJwU7GC9uo7alJaW3ICsrWX6u6hpZGYo1piumY4mjctveHQ-bFmthHSva19V4N40M2m2ua6-A868KhERqtB/w640-h218/Screen+Shot+2020-05-21+at+8.33.57+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;Here since I haven&#39;t created somewhere to store values I am going to manually change the values for illustrative purposes. Now I put the value as changedValue0101010101. When I click submit this CSRF token will not match my name and the error message will be displayed.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMSFdPwORQ8SbUsL32XCE2AxnWZa7Vo1k7hFObxvxSD-U4X3QbVPnOPdaLiKZDLsDSIiaT-ApXyXuBKUZ_aO-IQWAnp8y-aS_n8XlF7h6fwBmUJOFhXFGHFD0MrCkugRYDm7xzl6Owhz7z/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;382&quot; data-original-width=&quot;1140&quot; height=&quot;214&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMSFdPwORQ8SbUsL32XCE2AxnWZa7Vo1k7hFObxvxSD-U4X3QbVPnOPdaLiKZDLsDSIiaT-ApXyXuBKUZ_aO-IQWAnp8y-aS_n8XlF7h6fwBmUJOFhXFGHFD0MrCkugRYDm7xzl6Owhz7z/w640-h214/Screen+Shot+2020-05-21+at+8.34.31+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Cwj-D6sHQze_Z6wiSICS9cZVUNfyo4BjnPlK0vbGoo2ZHwpfNvEoibWw7O8ZvqEA5fWovGYu7SE7Owi1s-4QkLjDL2ZIrm48Vb9e_H8sKn70xmC1vzo_oqjrrRIUidCLKzYlS4bpJT9v/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;194&quot; data-original-width=&quot;734&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Cwj-D6sHQze_Z6wiSICS9cZVUNfyo4BjnPlK0vbGoo2ZHwpfNvEoibWw7O8ZvqEA5fWovGYu7SE7Owi1s-4QkLjDL2ZIrm48Vb9e_H8sKn70xmC1vzo_oqjrrRIUidCLKzYlS4bpJT9v/w640-h170/Screen+Shot+2020-05-21+at+8.34.41+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;CSRF tokens are used widely around the internet to ensure safety and are a great mechanism for a server to be able to identify users and to verify identities in HTTP requests.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/05/phpcsrftoken.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZHQjxfA-ejjhsEBJv-j4vQ3Bsu7N9gJzCJ3_C_0DE6JRD4jmgV8YHlltQJb6LRaWqfjIt07kPGwhSVsnM-5jKyPMUjkhAJ79eXCYlTYtwX3BPJbv9FM7rGjG_UlGLXzLNWZjuwXlnr3GY/s72-c/Screen+Shot+2020-05-20+at+4.46.12+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-7975650628971320493</guid><pubDate>Wed, 20 May 2020 23:17:00 +0000</pubDate><atom:updated>2020-05-20T16:17:06.491-07:00</atom:updated><title>Mouseflow for understanding customers and visitors</title><description>&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;I found this today and it&#39;s quite interesting. With Mouseflow on a web page I am able to see recorded user sessions. This is particularly interesting because you can fully put yourself in the shoes of your visitors and see exactly how they interacted with a web page. It didn&#39;t seem to capture my particles.js particles I put on the test page, but it captured everything else. So it&#39;s not perfect but it seems to accurately record all the visitor&#39;s movements and actions.&amp;nbsp;&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;This is obviously more useful as you analyze thousands of visitors and then clear patterns can be more visible. So by taking into account what parts of a site people hover a mouse over or what they actually click on it gives a direction for what to focus on based on the site&#39;s user base.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;The installation was quite simple. I included this little javascript tag:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!--Mouseflow Test --&amp;gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; window._mfq = window._mfq || [];&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (function() {&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var mf = document.createElement(&quot;script&quot;);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mf.type = &quot;text/javascript&quot;; mf.defer = true;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mf.src = &quot;//cdn.mouseflow.com/projects/XX.js&quot;;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementsByTagName(&quot;head&quot;)[0].appendChild(mf);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })();&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;I then activated the test page from the Mouseflow owner account and after I visited the page I was able to see my recorded session.&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGUFuQ0vqT-YlmOPIWSMYM2W1QZpNrOJ0HKQNIV1Z87AxEFHT62GcWDzBZG8x1B1mdZG_S0M89J5Jh9Hd4R7KWvxQqD50zfa5SmKQgS2k6GfiwrjkkstgcByHamzf7CJ8RgNRgOmDwuSAp/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1124&quot; data-original-width=&quot;2126&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGUFuQ0vqT-YlmOPIWSMYM2W1QZpNrOJ0HKQNIV1Z87AxEFHT62GcWDzBZG8x1B1mdZG_S0M89J5Jh9Hd4R7KWvxQqD50zfa5SmKQgS2k6GfiwrjkkstgcByHamzf7CJ8RgNRgOmDwuSAp/w640-h338/mouseflow_movement.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/05/mouseflow-for-understanding-customers.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGUFuQ0vqT-YlmOPIWSMYM2W1QZpNrOJ0HKQNIV1Z87AxEFHT62GcWDzBZG8x1B1mdZG_S0M89J5Jh9Hd4R7KWvxQqD50zfa5SmKQgS2k6GfiwrjkkstgcByHamzf7CJ8RgNRgOmDwuSAp/s72-w640-h338-c/mouseflow_movement.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-6759952729760091901</guid><pubDate>Tue, 19 May 2020 20:11:00 +0000</pubDate><atom:updated>2020-05-19T13:18:31.388-07:00</atom:updated><title>Using Memcached to store and retrieve session data</title><description>&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;I started with creating an Ubuntu VPS. I then installed Memcached from the CLI via SSH from my local machine. I secured the &#39;.conf&#39; file by setting it to listen on localhost and disabling UDP. I then configured SASL support for connecting my PHP scripts to the backend SQL database.&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivFZPXXqAreoAWBaOtrPb-I1anyB_44i3eqFcahKhYD_jtTs7L96gOckWmlPxQ3zno-hhPITkksS1gHX8JWCG9B7uMKDUQx0o77hRI_JrmhUOuWW8DNtGQiabQoVT1dDIYp-tHCsw8otBi/&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;124&quot; data-original-width=&quot;1630&quot; height=&quot;48&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivFZPXXqAreoAWBaOtrPb-I1anyB_44i3eqFcahKhYD_jtTs7L96gOckWmlPxQ3zno-hhPITkksS1gHX8JWCG9B7uMKDUQx0o77hRI_JrmhUOuWW8DNtGQiabQoVT1dDIYp-tHCsw8otBi/w640-h48/Screen+Shot+2020-05-18+at+12.12.33+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;I then added Apache and PHP to the server. Next I created a php info page and put it on the server to view the memcached information. I can see that memcached is installed and is communicating with PHP properly.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1172&quot; data-original-width=&quot;1906&quot; height=&quot;394&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-PFNyZFZpeYnAK5x5zYwCb1yhSKr-vVuj2Ent6469Ae7iHMgKocUqc1YHiDM6ry-1LfDR8-ipqB8QC_seq4jV_2vsE_R70eMFcLFrVU_D9oCWfv-zc4iyn27HeiiyWe2tKn9ZLrcpC6L9/w640-h394/Screen+Shot+2020-05-18+at+12.23.09+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;Next to get a simple connection working and some data flowing back and forth I created this simple php page with a key. This script opens a new Memcached instance to the localhost and gets the requested key. If no key is found it adds one. On the next refresh then the newly created key which is a string of text is retrieved from Memcached.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;470&quot; data-original-width=&quot;1550&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUqvo5lXhnE-9Qhw5Io8C4dn1HOx-u5S-RnYRBBOChRhcJFuM-kDvpVPvy49snMfN7DsHC4k70axpzNSgbkodHnJGcEI3oVOgkytXjdTyDXZxffL23rAEAWRGjSJQg9ejongomG64cOHDZ/w640-h194/Screen+Shot+2020-05-18+at+12.26.17+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;224&quot; data-original-width=&quot;1184&quot; height=&quot;122&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiydCPhmFlrxCBE-w6HwFKgloPsFEh4V9hpATpYM5zXsTEYWon48GaL8RsOUObRDi1n6nd1qOQFOOZ-MrKXuRDmFFOvhenXAxzsRxQbWoMrE1f4mGZ6juLobtamS2PQ4MX6vRpMKDNXsqR5/w640-h122/Screen+Shot+2020-05-18+at+12.27.58+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyOkcxZK7y083jH6hxt4Wq1Y_xDMTv7Zu7W3dMX-wemTtVhU_CvwcymuBzOTqLyx_jMQer43VUUxDrUV3e5faShrc70o6t1Eq90-3aovUE8iBjd4AStRd6ceC59DOcd29ftRxqu2HtBacp/&quot; style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;242&quot; data-original-width=&quot;1184&quot; height=&quot;130&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyOkcxZK7y083jH6hxt4Wq1Y_xDMTv7Zu7W3dMX-wemTtVhU_CvwcymuBzOTqLyx_jMQer43VUUxDrUV3e5faShrc70o6t1Eq90-3aovUE8iBjd4AStRd6ceC59DOcd29ftRxqu2HtBacp/w640-h130/Screen+Shot+2020-05-18+at+12.28.05+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/05/using-memcache-to-store-and-retrieve.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivFZPXXqAreoAWBaOtrPb-I1anyB_44i3eqFcahKhYD_jtTs7L96gOckWmlPxQ3zno-hhPITkksS1gHX8JWCG9B7uMKDUQx0o77hRI_JrmhUOuWW8DNtGQiabQoVT1dDIYp-tHCsw8otBi/s72-w640-h48-c/Screen+Shot+2020-05-18+at+12.12.33+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-3039024753417979798</guid><pubDate>Wed, 13 May 2020 15:50:00 +0000</pubDate><atom:updated>2020-05-13T08:50:21.424-07:00</atom:updated><title>Add cPanel &amp; WHM to CentOS VPS (Log Rotation, Configuring BIND nameserver &amp; Backups...)</title><description>&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;For this example I added cPanel &amp;amp; WHM to a CentOS VPS I created. Upon installation of cPanel I did a lot of configurations including setting up the log rotations, a BIND nameserver and backups.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;The installation from the command line is simple. The syntax is just a little different than most of the other posts where I use Ubuntu because that&#39;s my favorite version of Linux. However, I like to use the most efficient tools when I can and in this case it&#39;s CentOS. I have done a fair amount of scripting and automation using CentOS and Vagrant boxes so this was a cinch.&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;To install the latest version of cPanel from the command line the commands are as follows:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;cd /home&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;wget -N http://httpupdate.cpanel.net/latest&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;sh latest&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;/usr/local/cpanel/cpkeyclt&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUhbfbM3pW-m9yxBYoOZCRiLhxs29WnGnUIkvTvBG18NenTAj5gryZ5j7zq-K6vZCKyfAbqMgUERWOZUPGzyqia58uKSIpLkgKyzZfip5HZw4mBDUy7xwCPd5gLqMxE9XJt9MdKwh-Sbys/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;938&quot; data-original-width=&quot;1638&quot; height=&quot;366&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUhbfbM3pW-m9yxBYoOZCRiLhxs29WnGnUIkvTvBG18NenTAj5gryZ5j7zq-K6vZCKyfAbqMgUERWOZUPGzyqia58uKSIpLkgKyzZfip5HZw4mBDUy7xwCPd5gLqMxE9XJt9MdKwh-Sbys/w640-h366/Screen+Shot+2020-05-12+at+4.40.19+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;From here the most difficult parts are done and the rest is quite intuitive if you&#39;ve worked with servers and monitoring systems. I added my email and the nameservers to begin with. As you can see below with cPanel it is more about just knowing how to configure the system and you just select your parameters. For example at the bottom of this screen shot you can even select how you want to receive Apache logs.&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixHTku03661PXSZ07ojV1wI4_8-kLw8QYUcM4FbkW8y-YgrA6WFHEznv7hOZ4D9KE8H9yW5YSC4yNEoJ5tZmdQ-JTyaViGzxXpkS9nIMsKZrYAw14uAZ8uvSp7BCp_iuY-RjVsLlhXOE7z/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;744&quot; data-original-width=&quot;1568&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixHTku03661PXSZ07ojV1wI4_8-kLw8QYUcM4FbkW8y-YgrA6WFHEznv7hOZ4D9KE8H9yW5YSC4yNEoJ5tZmdQ-JTyaViGzxXpkS9nIMsKZrYAw14uAZ8uvSp7BCp_iuY-RjVsLlhXOE7z/w640-h304/Screen+Shot+2020-05-12+at+4.46.12+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;Next I was able to configure the Log Rotation. Log rotation is important to not use up all of a system&#39;s resources. In this automated process log files are compressed and stored within an archive folder for cPanel.&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsjBDNbKnHYmhDvidcStS6azJrJG7o1FOuDGMcGy6JmHN26-Y7au2mcgNO2YJWwSaZfUpRldKoHBDajnxo1n1f1jnl1V5Rzqd_UVhCcZTUlpgqntBSbDg3cPWam_57dkXvCBpDxoHfU_4r/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;478&quot; data-original-width=&quot;610&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsjBDNbKnHYmhDvidcStS6azJrJG7o1FOuDGMcGy6JmHN26-Y7au2mcgNO2YJWwSaZfUpRldKoHBDajnxo1n1f1jnl1V5Rzqd_UVhCcZTUlpgqntBSbDg3cPWam_57dkXvCBpDxoHfU_4r/s320/Screen+Shot+2020-05-12+at+5.03.41+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;The cPanel allows for a lot of customization. In a previous blog post I went over how to manually create Cron Jobs:&amp;nbsp;&lt;a href=&quot;https://jgardnerla.blogspot.com/2020/04/cron-job-daemon-shell-script-to-send.html&quot;&gt;https://jgardnerla.blogspot.com/2020/04/cron-job-daemon-shell-script-to-send.html&lt;/a&gt;. However, with cPanel it&#39;s very simple to just plug in the days and times you want updates and backups to run. The manual process is good because it allows you to do more customization but this is a good solution if you want simple administration from a GUI.&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhelM9EHRu1jgV68sBKejA24OYUhVDDh1io_ygvApbuFERkHDpsKGehigL6q9k0L7aqNKp8ca5IX_Cjr9QoFn55fcCjGjKmWS9HWurqjOX6pCfQ_8yPYH9KSo3rWBJj9WLOkBoWeUi0SZb7/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1116&quot; data-original-width=&quot;1632&quot; height=&quot;438&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhelM9EHRu1jgV68sBKejA24OYUhVDDh1io_ygvApbuFERkHDpsKGehigL6q9k0L7aqNKp8ca5IX_Cjr9QoFn55fcCjGjKmWS9HWurqjOX6pCfQ_8yPYH9KSo3rWBJj9WLOkBoWeUi0SZb7/w640-h438/Screen+Shot+2020-05-12+at+4.49.03+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;As simple as cPanel is to use there is a lot it can do. Here I synchronized the server time which is important when serving requests and handling HSTS.&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDueuXSFvOgWZjBHGmXHEQvyOgqFxR-8WyzsvGqTxJdVBmhHozYAJzcBlthSE2eSjGhJW99H9Za0uhae-J0ioyc-x_EW41Fn71sGyxvsftX1Uk_0tqz3ZcBQe7fEfDrFRWcBvQ9Dze_GCe/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;336&quot; data-original-width=&quot;1054&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDueuXSFvOgWZjBHGmXHEQvyOgqFxR-8WyzsvGqTxJdVBmhHozYAJzcBlthSE2eSjGhJW99H9Za0uhae-J0ioyc-x_EW41Fn71sGyxvsftX1Uk_0tqz3ZcBQe7fEfDrFRWcBvQ9Dze_GCe/s320/Screen+Shot+2020-05-12+at+4.50.07+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;The server is just getting setup but here are the initial server logs. The system is starting up and the daemon&#39;s are beginning to listen on their appropriate ports so that they can spring into action when they are needed.&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUHL0cnVVyU9mt234nAWeNsyg8E3CFd7y9IhTm75tazRX48ZdAvWi1g9uPbG5U8NGPssWKC9AThyphenhyphenCTz6gdY6IkwKXBnm26ebtU1K-7aT17iMj-kUc25nuSxV_xOm0yXKHZWXF_CvzeVu_Q/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;754&quot; data-original-width=&quot;1966&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUHL0cnVVyU9mt234nAWeNsyg8E3CFd7y9IhTm75tazRX48ZdAvWi1g9uPbG5U8NGPssWKC9AThyphenhyphenCTz6gdY6IkwKXBnm26ebtU1K-7aT17iMj-kUc25nuSxV_xOm0yXKHZWXF_CvzeVu_Q/w640-h246/Screen+Shot+2020-05-12+at+4.53.56+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;And here is the BIND nameserver starting up successfully.&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvDM1opxs4t2YDy3V6jWmP4DPig1TOlZmFoaa14GCgcadAe_b00Z94Al_XCnOWuiz4fOyaET5xrbBSABImP-44kizQIwd-_hyG111ZBtMesX9wqFKjSgP2SnFGs7rL5l5b_gr5hosXk4Lf/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1286&quot; data-original-width=&quot;1492&quot; height=&quot;552&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvDM1opxs4t2YDy3V6jWmP4DPig1TOlZmFoaa14GCgcadAe_b00Z94Al_XCnOWuiz4fOyaET5xrbBSABImP-44kizQIwd-_hyG111ZBtMesX9wqFKjSgP2SnFGs7rL5l5b_gr5hosXk4Lf/w640-h552/Screen+Shot+2020-05-12+at+5.17.23+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;Now to administer the cPanel I can just return to the secure portal and begin with any customizations or configurations that are required.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzoM8eM41OpxAl45m1g9FizWcvkAzNQZEtg5Ask99p3JP6pifUHez7zBmwbsxhx5X8hTKLuFqhGrA_ZhaIch-k3rLiCUu9cZsIzO_lbFkhfThvK14ghHG2JOgFZdfb2rq_3tyg9nLfYTF1/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;courier&quot; size=&quot;2&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1160&quot; data-original-width=&quot;1570&quot; height=&quot;295&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzoM8eM41OpxAl45m1g9FizWcvkAzNQZEtg5Ask99p3JP6pifUHez7zBmwbsxhx5X8hTKLuFqhGrA_ZhaIch-k3rLiCUu9cZsIzO_lbFkhfThvK14ghHG2JOgFZdfb2rq_3tyg9nLfYTF1/w400-h295/Screen+Shot+2020-05-12+at+5.22.00+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://jgardnerla.blogspot.com/2020/05/add-cpanel-whm-to-centos-vps-log.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUhbfbM3pW-m9yxBYoOZCRiLhxs29WnGnUIkvTvBG18NenTAj5gryZ5j7zq-K6vZCKyfAbqMgUERWOZUPGzyqia58uKSIpLkgKyzZfip5HZw4mBDUy7xwCPd5gLqMxE9XJt9MdKwh-Sbys/s72-w640-h366-c/Screen+Shot+2020-05-12+at+4.40.19+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-7124439721616556316</guid><pubDate>Mon, 04 May 2020 16:55:00 +0000</pubDate><atom:updated>2020-05-04T09:56:37.130-07:00</atom:updated><title>Certbot server for SSL certificate (Let&#39;s Encrypt) using SHA256withRSA</title><description>&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;This is a really simple way of creating a certbot server for SSL certificates that automatically get renewed using Let&#39;s Encrypt. I just added python-certbot-apache from the command line.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI6bVZt42uo6se4j3ZqAh9g3e9qGUrtW1ajJmuoigutDrHf7Ibg_veNaA6YVKDUkWnAdv8oe_L_g18JRQfWYqvadUhbQrTGJorbDPpugveAJcV-ZHsZ51tS9hkWmC3ZXJv4mHWqJCDDrZ1/s1600/Screen+Shot+2020-04-21+at+3.04.25+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;646&quot; data-original-width=&quot;1342&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI6bVZt42uo6se4j3ZqAh9g3e9qGUrtW1ajJmuoigutDrHf7Ibg_veNaA6YVKDUkWnAdv8oe_L_g18JRQfWYqvadUhbQrTGJorbDPpugveAJcV-ZHsZ51tS9hkWmC3ZXJv4mHWqJCDDrZ1/s640/Screen+Shot+2020-04-21+at+3.04.25+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Then I edited the /etc/apache2/sites-available/(TheTestDomain).conf file to have the proper server name.&amp;nbsp; I kept the default request scheme and port numbers. Now to renew the certificate all I have to do is run &quot;certbot renew&quot; from the command line and a new certificate will be generated and downloaded to my server.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQHUjrlXAiDjmIlE6_DdENnOoIzYJLoxdm34WAoJnFn2HY1sMrcT0i8TrIY9T9qRsqJ_UDkSKLsj8kw4GHMIRgtwaQfhTy-tf1zGkiWAONCeiRPYraSvCV69iMkYLyVC_DRhw8GmIBziO/s1600/Screen+Shot+2020-04-21+at+3.05.45+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;318&quot; data-original-width=&quot;1182&quot; height=&quot;86&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQHUjrlXAiDjmIlE6_DdENnOoIzYJLoxdm34WAoJnFn2HY1sMrcT0i8TrIY9T9qRsqJ_UDkSKLsj8kw4GHMIRgtwaQfhTy-tf1zGkiWAONCeiRPYraSvCV69iMkYLyVC_DRhw8GmIBziO/s320/Screen+Shot+2020-04-21+at+3.05.45+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ENgMHqyxzyrTLo-9YBqnoEsQTXDK3nLZrCSWL80jzTHvdeUVbhJzRoH2FinHYPuzeEG4HMw9R0127QEOCPhz2IWhm_B144SrSs5ZnNHk_pt2i_XB45WRf82WchoxxHqGaAmrWCeefexd/s1600/Screen+Shot+2020-04-21+at+3.12.34+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;644&quot; data-original-width=&quot;1066&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ENgMHqyxzyrTLo-9YBqnoEsQTXDK3nLZrCSWL80jzTHvdeUVbhJzRoH2FinHYPuzeEG4HMw9R0127QEOCPhz2IWhm_B144SrSs5ZnNHk_pt2i_XB45WRf82WchoxxHqGaAmrWCeefexd/s320/Screen+Shot+2020-04-21+at+3.12.34+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Now you can see that upon visiting the domain the connection is deemed secure because there is a proper certificate.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRFRxIODyOBAn6beA1tiaXKsZjpygvVBs9jr9U4LamM57nmmhWvto0FkR0XsfHzX3EiSofpZnYHITqoVtPj_RzehRR1AOCiOGMqI9xEOrdQdKiObjt0KWWIkZ1bP-XS0fFLShUvK9EW3HR/s1600/Screen+Shot+2020-04-21+at+3.14.16+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;626&quot; data-original-width=&quot;1078&quot; height=&quot;185&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRFRxIODyOBAn6beA1tiaXKsZjpygvVBs9jr9U4LamM57nmmhWvto0FkR0XsfHzX3EiSofpZnYHITqoVtPj_RzehRR1AOCiOGMqI9xEOrdQdKiObjt0KWWIkZ1bP-XS0fFLShUvK9EW3HR/s320/Screen+Shot+2020-04-21+at+3.14.16+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Here is more detailed information about the domain and the certificate.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8zMVmdOFQmhxGfL1yDejxIFDqI9tWaJ0bSd9mxUM4Zw8xISXKkr9sIp85BOZzeQ2OmBw4vqicDm7HgzFH98qqTJqNk4p6yGKp5UYLQcn_KlUHlj4nbkqEDzreVpuCJ4PdRPaJ2J_-018V/s1600/Screen+Shot+2020-04-21+at+3.15.18+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;198&quot; data-original-width=&quot;770&quot; height=&quot;82&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8zMVmdOFQmhxGfL1yDejxIFDqI9tWaJ0bSd9mxUM4Zw8xISXKkr9sIp85BOZzeQ2OmBw4vqicDm7HgzFH98qqTJqNk4p6yGKp5UYLQcn_KlUHlj4nbkqEDzreVpuCJ4PdRPaJ2J_-018V/s320/Screen+Shot+2020-04-21+at+3.15.18+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Here is the overview information of the certificate. It is encrypted using SHA256withRSA.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihmfi5sYLzLGs6fdLQM8nOW51_8ChvQkzTFRvLgO2NrTVZaM3hrBQXglmKVA3h85tQuycBJSIgmqx6jPNMD2Rfytbkx9RFLub2yhzcPfxXR_qVBUWg1_urpRIyGWcTaGNdq9PX7bCE6Zkt/s1600/Screen+Shot+2020-04-21+at+3.15.53+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;276&quot; data-original-width=&quot;1184&quot; height=&quot;74&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihmfi5sYLzLGs6fdLQM8nOW51_8ChvQkzTFRvLgO2NrTVZaM3hrBQXglmKVA3h85tQuycBJSIgmqx6jPNMD2Rfytbkx9RFLub2yhzcPfxXR_qVBUWg1_urpRIyGWcTaGNdq9PX7bCE6Zkt/s320/Screen+Shot+2020-04-21+at+3.15.53+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;And now I just quickly double checked that certificates can indeed be renewed succesfully.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz26fC89AH18DJsfj6pINoDPqWMVA9ahgRGjksDpIc_xygo60oKHC6Wyrd0y4oCbUk0MBkwNuI_d6hnCBBVkf0iUX5wgqemdCxLioo6LlXQAA-ToWCbrxXYAocWYfQTnP5sz_VKpOwBYhB/s1600/Screen+Shot+2020-04-21+at+3.19.15+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;70&quot; data-original-width=&quot;1156&quot; height=&quot;38&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz26fC89AH18DJsfj6pINoDPqWMVA9ahgRGjksDpIc_xygo60oKHC6Wyrd0y4oCbUk0MBkwNuI_d6hnCBBVkf0iUX5wgqemdCxLioo6LlXQAA-ToWCbrxXYAocWYfQTnP5sz_VKpOwBYhB/s640/Screen+Shot+2020-04-21+at+3.19.15+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1XDIIwecEzINWo5w79wN8ggIgS18grmDGqGsNfdD2_qGF-Ymv19V6r3IArvkwwC0kLRVx7wGvLb3-hdynf0k0mCZcFVbRB7qROth9L0OBiH7ykT9hH3i7wMMSSG38Dqtofk4u6qBpjrax/s1600/Screen+Shot+2020-04-21+at+3.19.09+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;132&quot; data-original-width=&quot;1138&quot; height=&quot;74&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1XDIIwecEzINWo5w79wN8ggIgS18grmDGqGsNfdD2_qGF-Ymv19V6r3IArvkwwC0kLRVx7wGvLb3-hdynf0k0mCZcFVbRB7qROth9L0OBiH7ykT9hH3i7wMMSSG38Dqtofk4u6qBpjrax/s640/Screen+Shot+2020-04-21+at+3.19.09+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</description><link>http://jgardnerla.blogspot.com/2020/05/certbot-server-for-ssl-certificate-lets.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI6bVZt42uo6se4j3ZqAh9g3e9qGUrtW1ajJmuoigutDrHf7Ibg_veNaA6YVKDUkWnAdv8oe_L_g18JRQfWYqvadUhbQrTGJorbDPpugveAJcV-ZHsZ51tS9hkWmC3ZXJv4mHWqJCDDrZ1/s72-c/Screen+Shot+2020-04-21+at+3.04.25+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-5290770630131924258</guid><pubDate>Mon, 04 May 2020 16:45:00 +0000</pubDate><atom:updated>2020-05-04T09:45:18.153-07:00</atom:updated><title>Disk space utilization monitoring with email alerts - Ubuntu Linux - Apache Server</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;This is very simple but very powerful. Within Linux you can create programs that are always executing or running silently in the background. These are called Daemons and they do everything from wake up a computer when a mouse is moved, automatically backup a server or in this case it can monitor a server 24/7 and send alerts when it notices anything suspicious or out of line.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Below I created a simple Daemon that monitors the disk space utilization and it sends emails to an account at tester@slabj.com which is the domain for the test server this is created on.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;In essence an infinite loop is created and when a predefined threshold is crossed the server sends an email message to alert the administrator. The rest of the process is identical to what I covered in monitoring memory usage in this way so I won&#39;t go over that again but you can look at that article here for more clarity:&amp;nbsp;&lt;a href=&quot;https://jgardnerla.blogspot.com/2020/04/cron-job-daemon-shell-script-to-send.html&quot;&gt;https://jgardnerla.blogspot.com/2020/04/cron-job-daemon-shell-script-to-send.html&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLLkk55G7E-p4AKy_778x1f_8OQ-JwrlpH9dRineAJWgABarTi1fnq0sawafthPYwHEIqokqCHZdS9sHhoIP-N7cs2cmNIvuREzbKVvDRWuafK4X5eax-5RAAyjBtfXS067UIlBswK_0Kl/s1600/Screen+Shot+2020-04-21+at+2.07.23+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;772&quot; data-original-width=&quot;1252&quot; height=&quot;394&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLLkk55G7E-p4AKy_778x1f_8OQ-JwrlpH9dRineAJWgABarTi1fnq0sawafthPYwHEIqokqCHZdS9sHhoIP-N7cs2cmNIvuREzbKVvDRWuafK4X5eax-5RAAyjBtfXS067UIlBswK_0Kl/s640/Screen+Shot+2020-04-21+at+2.07.23+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://jgardnerla.blogspot.com/2020/05/disk-space-utilization-monitoring-with.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLLkk55G7E-p4AKy_778x1f_8OQ-JwrlpH9dRineAJWgABarTi1fnq0sawafthPYwHEIqokqCHZdS9sHhoIP-N7cs2cmNIvuREzbKVvDRWuafK4X5eax-5RAAyjBtfXS067UIlBswK_0Kl/s72-c/Screen+Shot+2020-04-21+at+2.07.23+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-1321907507438072236</guid><pubDate>Mon, 04 May 2020 16:33:00 +0000</pubDate><atom:updated>2020-05-04T09:35:18.190-07:00</atom:updated><title>Create a Samba file share (SMB server) to send and receive files</title><description>&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Samba works in a similar fashion as FTP but it is more robust and can be used as a file sharing and storage system. First I created a Linux Ubuntu virtual machine and installed Samba from the command line. I created a user named tester and added a password.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR8M-8IpcxSfE1uqPsN07hB-5PuXJZYUruhFPj_eWMtz-yAWJV7ZZ1v7-LjpnoM2kxi79lhmH5mfrQfHk09XiZkO4QFx9vNfAKDcxNzkeG6tSuolGTUeH-pUvgXLhtUi55YkVf9WVxAaeQ/s1600/Screen+Shot+2020-04-22+at+10.37.16+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;34&quot; data-original-width=&quot;766&quot; height=&quot;28&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR8M-8IpcxSfE1uqPsN07hB-5PuXJZYUruhFPj_eWMtz-yAWJV7ZZ1v7-LjpnoM2kxi79lhmH5mfrQfHk09XiZkO4QFx9vNfAKDcxNzkeG6tSuolGTUeH-pUvgXLhtUi55YkVf9WVxAaeQ/s640/Screen+Shot+2020-04-22+at+10.37.16+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6-i2_3Ou2hHe1-R1XN0n7dz2LQZJ8HVk7YFMzW9I0PfNaeMojc-V9WyzXqEopGoWgXtapOo7gmC77BDzmc0v6uFKo-iMuOY225p_FOoNrTVJfWJii8CN_qYLsFzFj2w2qQojrWK5-305I/s1600/Screen+Shot+2020-04-22+at+10.37.32+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;146&quot; data-original-width=&quot;792&quot; height=&quot;116&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6-i2_3Ou2hHe1-R1XN0n7dz2LQZJ8HVk7YFMzW9I0PfNaeMojc-V9WyzXqEopGoWgXtapOo7gmC77BDzmc0v6uFKo-iMuOY225p_FOoNrTVJfWJii8CN_qYLsFzFj2w2qQojrWK5-305I/s640/Screen+Shot+2020-04-22+at+10.37.32+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;I next created a user and a directory to be shared (/home/tester/samba). I configured the etc/samba/smb.conf file as below with the samba path and users. This is also not a read only server so files can be uploaded.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwy-7xniAMdnKXGSiBZSaE1q4JZJ-YCvRVO8n_7_P9wq2DziLSZrTydlCoIHHqguhkDyg7OQfRfDrix9xthnJDnEkk0vHaO_aJNED-KdqeG3s8JK2oq5WuxJVj-csNB3CBmW2KrQHKIqSm/s1600/Screen+Shot+2020-04-22+at+10.42.34+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;848&quot; data-original-width=&quot;1050&quot; height=&quot;516&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwy-7xniAMdnKXGSiBZSaE1q4JZJ-YCvRVO8n_7_P9wq2DziLSZrTydlCoIHHqguhkDyg7OQfRfDrix9xthnJDnEkk0vHaO_aJNED-KdqeG3s8JK2oq5WuxJVj-csNB3CBmW2KrQHKIqSm/s640/Screen+Shot+2020-04-22+at+10.42.34+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Next I opened a connection locally from my macbook to the server. The server is at the IP of the VPS I created and samba is located at (&#39;/&#39;).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkRWbweK58yvmrWT_-nea0h8Ik_GYkn3ZNndiHdtz7RT-d8tHfIjnXz3f2JJY151NzJoXcYp3t8589CIfh4gnY_wN-EAhwW5eCrwmO0l-lDrReEJW1Tl2htdWOG9_Ut1mL8I7Bp8tW0U8/s1600/Screen+Shot+2020-04-22+at+10.52.24+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;432&quot; data-original-width=&quot;982&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkRWbweK58yvmrWT_-nea0h8Ik_GYkn3ZNndiHdtz7RT-d8tHfIjnXz3f2JJY151NzJoXcYp3t8589CIfh4gnY_wN-EAhwW5eCrwmO0l-lDrReEJW1Tl2htdWOG9_Ut1mL8I7Bp8tW0U8/s320/Screen+Shot+2020-04-22+at+10.52.24+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Connecting from the mac in this way doesn&#39;t require the CLI. From here it is GUI based and is pretty straight forward. I just connect and then I can drag and drop files into my local samba folder which will write the contents to the web folder.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjF9L9MXT9bxp8B_KUMAnRAuVuw2fVYWvVI4ln0CNR6T0isY2ksxbw2SabYAb4cXH0_qi-NA9C392Jwi4BfJ5uTv0RhyHGEaReumesiTqEylaXxOUpYLCeGlAseS59bcAp9m812-R18_gB/s1600/Screen+Shot+2020-04-22+at+10.52.46+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;562&quot; data-original-width=&quot;872&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjF9L9MXT9bxp8B_KUMAnRAuVuw2fVYWvVI4ln0CNR6T0isY2ksxbw2SabYAb4cXH0_qi-NA9C392Jwi4BfJ5uTv0RhyHGEaReumesiTqEylaXxOUpYLCeGlAseS59bcAp9m812-R18_gB/s320/Screen+Shot+2020-04-22+at+10.52.46+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXcL_YCt1QjCveteneSBtabWzy_6Ptk-vRo0M051lSxRnwGKwpeLj0M5Kv09HzcQTV9qKuUzOMsKi4ilYu-jMhwGfnUycwan4jcOt7wQJKL1fcbc4gy5Zflq7KaPAtyTzLBd-fPJd81iYl/s1600/Screen+Shot+2020-04-22+at+10.52.59+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;876&quot; data-original-width=&quot;1544&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXcL_YCt1QjCveteneSBtabWzy_6Ptk-vRo0M051lSxRnwGKwpeLj0M5Kv09HzcQTV9qKuUzOMsKi4ilYu-jMhwGfnUycwan4jcOt7wQJKL1fcbc4gy5Zflq7KaPAtyTzLBd-fPJd81iYl/s320/Screen+Shot+2020-04-22+at+10.52.59+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here is a sample text file I created in Atom on my macbook that I will send to the server.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwrN2Vq-n7Jtw5nIMqJcI8bx5CetW9KVlkubbojH7MmCVmGTvr8Hgv3f7n16HBkY-siDO54-H4blLf-1AANoNAa-m9sDOv5btNvXof5yst9VI5phpqkZ6eE_aHZFSQQtA0GtYB6YBngqTD/s1600/Screen+Shot+2020-04-22+at+10.54.50+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;206&quot; data-original-width=&quot;792&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwrN2Vq-n7Jtw5nIMqJcI8bx5CetW9KVlkubbojH7MmCVmGTvr8Hgv3f7n16HBkY-siDO54-H4blLf-1AANoNAa-m9sDOv5btNvXof5yst9VI5phpqkZ6eE_aHZFSQQtA0GtYB6YBngqTD/s320/Screen+Shot+2020-04-22+at+10.54.50+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;And here it is on my virtual machine in a text file I opened with nano. Overall SMB creates an easy an efficient way of transferring files from client machines to a main server or vise-a-versa.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigwcrPsqUudDyB7Xf_EtYRX935TeQwS7IKpKqf3lZNQoHqWq6_oAF2E2zVu2x4BlCylMyrxNCDWgsN8SJgOGw7XBOPR1UdXKD3fOVuIVgzHrSiygdiuU5DZs6q4MUjLzaqTlI15JleK9Cb/s1600/Screen+Shot+2020-04-22+at+10.57.50+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;122&quot; data-original-width=&quot;1006&quot; height=&quot;38&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigwcrPsqUudDyB7Xf_EtYRX935TeQwS7IKpKqf3lZNQoHqWq6_oAF2E2zVu2x4BlCylMyrxNCDWgsN8SJgOGw7XBOPR1UdXKD3fOVuIVgzHrSiygdiuU5DZs6q4MUjLzaqTlI15JleK9Cb/s320/Screen+Shot+2020-04-22+at+10.57.50+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMtuuvtZzyDgnf1JyhVQBS7bd2l5eo-iK6Fd1ryN7-V9_d6K4vnKll0ezSWWMJaaJ-7NvdBJ2wtf_M1tlzi25Dyy6-RmUjDeIhpn1BhSZwfEAFLt0apjG_KqH1VV8Xr3PNdwjbfaEEtWmn/s1600/Screen+Shot+2020-04-22+at+10.58.10+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;564&quot; data-original-width=&quot;1376&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMtuuvtZzyDgnf1JyhVQBS7bd2l5eo-iK6Fd1ryN7-V9_d6K4vnKll0ezSWWMJaaJ-7NvdBJ2wtf_M1tlzi25Dyy6-RmUjDeIhpn1BhSZwfEAFLt0apjG_KqH1VV8Xr3PNdwjbfaEEtWmn/s320/Screen+Shot+2020-04-22+at+10.58.10+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</description><link>http://jgardnerla.blogspot.com/2020/05/crete-samba-file-share-smb-server-to.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR8M-8IpcxSfE1uqPsN07hB-5PuXJZYUruhFPj_eWMtz-yAWJV7ZZ1v7-LjpnoM2kxi79lhmH5mfrQfHk09XiZkO4QFx9vNfAKDcxNzkeG6tSuolGTUeH-pUvgXLhtUi55YkVf9WVxAaeQ/s72-c/Screen+Shot+2020-04-22+at+10.37.16+AM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-1767661883677716912</guid><pubDate>Thu, 30 Apr 2020 20:56:00 +0000</pubDate><atom:updated>2020-04-30T14:03:21.434-07:00</atom:updated><title>User management application using Node.js and Redis</title><description>&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here I created a user management application using Redis and Node.js. Here we can simply add and search through user detail records.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;The application consists of a few components. There is the main app.js file which controls much of the application. And I used express for Node.js with handlebars to add users, create details and search through the users.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;In this adduser.handlebars file I create the &quot;POST&quot; method with an action that will send the information below in a post to&amp;nbsp; /user/add which will create the new user in Redis.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-omacjyUd3AIf86ghncf2GZu466_Q8_U5DM0053NQil4jQtuMFYiGwkq34xzxFd8yQkUwOetbBEFmWS7td2x1NVS2sbzjUzpvWNz4i_R0xpJLWFGW1bgjd_kv2H7nqenDJrxi54oBWnpD/s1600/Screen+Shot+2020-04-30+at+1.24.35+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;764&quot; data-original-width=&quot;1068&quot; height=&quot;456&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-omacjyUd3AIf86ghncf2GZu466_Q8_U5DM0053NQil4jQtuMFYiGwkq34xzxFd8yQkUwOetbBEFmWS7td2x1NVS2sbzjUzpvWNz4i_R0xpJLWFGW1bgjd_kv2H7nqenDJrxi54oBWnpD/s640/Screen+Shot+2020-04-30+at+1.24.35+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Next in the details.handlebars file below I set everything up to handle the display of the records that are retrieved from Redis.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE672UKTgnAlz6EJvEuFLmIYCzwnNzNH7M3r13yazRHakTnUAXZrMAb3WyGf2BG9X8clh3npOlQ8SWFTN2qQkL-1DT4OfhFEvH1r7sQZJGnriQneDvi17bQqMuNfd9Un5TRJA9MSdEUrWW/s1600/Screen+Shot+2020-04-30+at+1.28.58+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;184&quot; data-original-width=&quot;954&quot; height=&quot;122&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE672UKTgnAlz6EJvEuFLmIYCzwnNzNH7M3r13yazRHakTnUAXZrMAb3WyGf2BG9X8clh3npOlQ8SWFTN2qQkL-1DT4OfhFEvH1r7sQZJGnriQneDvi17bQqMuNfd9Un5TRJA9MSdEUrWW/s640/Screen+Shot+2020-04-30+at+1.28.58+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Then I have a searchusers.handlebars file which handles the search functionality.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8zPUKhDNOILQQfcjejn1P0HIH4wquykjvhyphenhyphenq3Rnv_O_jT6zkf0s-JkOt4Gme6bH0Nt9frpg5eKNWVnj-kh3O9sosIA-vufljhBAxtvTiRvPHe489cIZO2SBIeQvogr8pk3g0W_CxquF-J/s1600/Screen+Shot+2020-04-30+at+1.30.09+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;255&quot; data-original-width=&quot;1078&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8zPUKhDNOILQQfcjejn1P0HIH4wquykjvhyphenhyphenq3Rnv_O_jT6zkf0s-JkOt4Gme6bH0Nt9frpg5eKNWVnj-kh3O9sosIA-vufljhBAxtvTiRvPHe489cIZO2SBIeQvogr8pk3g0W_CxquF-J/s640/Screen+Shot+2020-04-30+at+1.30.09+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;The main.handlebars file handles the HTML output and is quite similar to any other HTML page with the interesting differentiation of how the body content is handled. The triple curly brackets tell handlebars to display the information from Redis within this container.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm0mTbIZIfNqVysfs-MktKldA8anQtPPtz5hL7tF9EJDrUEW_1zWetOfnbk0yHjtv3ymAkfYsxZqkD_zV9zX5PvEQGQn93hi-CTX-MNxzPPmbXE-ZtRGPnnnPF4grTkZgXr-u0iJ0o6FZe/s1600/Screen+Shot+2020-04-30+at+1.32.31+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;94&quot; data-original-width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm0mTbIZIfNqVysfs-MktKldA8anQtPPtz5hL7tF9EJDrUEW_1zWetOfnbk0yHjtv3ymAkfYsxZqkD_zV9zX5PvEQGQn93hi-CTX-MNxzPPmbXE-ZtRGPnnnPF4grTkZgXr-u0iJ0o6FZe/s1600/Screen+Shot+2020-04-30+at+1.32.31+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;And now that I&#39;ve gone over the files that connect with the main app.js file perhaps it will help clear everything up a bit to focus on how the directives are being initiated. Below I am showing the different constructor variables I setup. This is a Node.js app using express, express-handlebars and I set up a few other parameters that are required.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQ2_cKAaVM2Do0WrQycp1_naUS-jzmvrQKD5jUUQPOSOrAKJD-Z9Sm91QN0BYqFg_W_ez3J4UaVFIrTZ_EkF_2mUmxJsl14dSNFAp1_k-R2NKBS_EeBdqpmTwRpdPoJSUiQbTdXOvkkjU/s1600/Screen+Shot+2020-04-30+at+1.35.50+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;182&quot; data-original-width=&quot;620&quot; height=&quot;185&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQ2_cKAaVM2Do0WrQycp1_naUS-jzmvrQKD5jUUQPOSOrAKJD-Z9Sm91QN0BYqFg_W_ez3J4UaVFIrTZ_EkF_2mUmxJsl14dSNFAp1_k-R2NKBS_EeBdqpmTwRpdPoJSUiQbTdXOvkkjU/s640/Screen+Shot+2020-04-30+at+1.35.50+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;With everything setup it&#39;s simple to create the Redis client from here.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCayxgHNQuElUXTU0Rlfvp73apCGwi-e9Tt8s6lc23qt8-Tv1JGzPgZrEgtl0TW37i6DDKFwr8AAkk4sio0827ayZbdzFtiYi09ilYelf3-qY-diBaSOPMUvXcBvzgDD8jIxi0MBKtXERR/s1600/Screen+Shot+2020-04-30+at+1.37.30+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;198&quot; data-original-width=&quot;514&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCayxgHNQuElUXTU0Rlfvp73apCGwi-e9Tt8s6lc23qt8-Tv1JGzPgZrEgtl0TW37i6DDKFwr8AAkk4sio0827ayZbdzFtiYi09ilYelf3-qY-diBaSOPMUvXcBvzgDD8jIxi0MBKtXERR/s640/Screen+Shot+2020-04-30+at+1.37.30+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;I then set the port and initialize express within the app. I also created some middleware for the body parser, a view engine, setup the MethodOverride function. And then this next part I found interesting because here I am taking the user input from the HTML page and feeding it to Redis in a similar manner as if I as the admin were manually adding users from the command line. Next here is how the search processing is handled. The application sends post request to /user/search and if the object does not exit an error message saying &quot;User does not exist&quot; is returned. In the case that the object exists the instructions below are to render or to show the users the details for a particular obj. In this case I am just searching by user ID&#39;s, but this can be run with any of the fields but a user ID is usually the most unique. There may be two John Smiths within the system but there can only be one user001 and one user002.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhg_PiHC9m1VqGKHdWFfnrcCfGYUY6EzQV208MQ64E5zf_iazvUjmJDHJghJvW5H6u2tzAmXkkK7DHswQmDG0GoMlgMh-JEMyecZHuPagyEL3u43nHhOXbwvrCefl6FKWKMEgMXyvjraGs/s1600/Screen+Shot+2020-04-30+at+1.48.20+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;668&quot; data-original-width=&quot;926&quot; height=&quot;459&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhg_PiHC9m1VqGKHdWFfnrcCfGYUY6EzQV208MQ64E5zf_iazvUjmJDHJghJvW5H6u2tzAmXkkK7DHswQmDG0GoMlgMh-JEMyecZHuPagyEL3u43nHhOXbwvrCefl6FKWKMEgMXyvjraGs/s640/Screen+Shot+2020-04-30+at+1.48.20+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwE_P65W8e0PqhGhjzBM9qfo7J3VLZ-hN4QB2z_mkAYYanUdR89QVncB_fYGF46qhUx_Q-emVEjEnN5PvszfpOJmx9qc-NWaOInZUq-kvTkjOCr63pMEP-h0o8ufQNAJ7PwXHudDlE2ek6/s1600/Screen+Shot+2020-04-30+at+1.40.09+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;532&quot; data-original-width=&quot;632&quot; height=&quot;538&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwE_P65W8e0PqhGhjzBM9qfo7J3VLZ-hN4QB2z_mkAYYanUdR89QVncB_fYGF46qhUx_Q-emVEjEnN5PvszfpOJmx9qc-NWaOInZUq-kvTkjOCr63pMEP-h0o8ufQNAJ7PwXHudDlE2ek6/s640/Screen+Shot+2020-04-30+at+1.40.09+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Next in the &quot;Add User&quot; process I setup the application to create a post request to /user/add with the fields the user is required to enter: id, first_name, last_name, email and phone number. If there is an error it is logged to the console. If everything posts correctly then a new user is created in Redis and the user is redirected to the home page.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4K0wA8DguhDFrd3_IaFSqhziI-m9wQxzdCGXax9rAHCNLzK48rkRbTRIymtlwLgvvjofK7sZ0qtvYDDVg0YE4ODAicDPqrhevyar6gDM11eojpaJrP7_8ldySC9AJ5aq1Z_mTVw5i7Uhd/s1600/Screen+Shot+2020-04-30+at+1.45.10+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;680&quot; data-original-width=&quot;610&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4K0wA8DguhDFrd3_IaFSqhziI-m9wQxzdCGXax9rAHCNLzK48rkRbTRIymtlwLgvvjofK7sZ0qtvYDDVg0YE4ODAicDPqrhevyar6gDM11eojpaJrP7_8ldySC9AJ5aq1Z_mTVw5i7Uhd/s640/Screen+Shot+2020-04-30+at+1.45.10+PM.png&quot; width=&quot;574&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij0d8sbqR-jrysl7w7Fa7EOGvMnXsuXnKnjdOwy6s0Oe8uYA1ElIbN0T5MGrZ7tVc7ZQRBzdBdMq0hr62tfZUrQGgrBzeMfK5aZKwZakmDh9mPDRYM5fWFjCRkjIqV-gZ8UhmneFp8KGfQ/s1600/Screen+Shot+2020-04-30+at+1.49.07+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1298&quot; data-original-width=&quot;751&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij0d8sbqR-jrysl7w7Fa7EOGvMnXsuXnKnjdOwy6s0Oe8uYA1ElIbN0T5MGrZ7tVc7ZQRBzdBdMq0hr62tfZUrQGgrBzeMfK5aZKwZakmDh9mPDRYM5fWFjCRkjIqV-gZ8UhmneFp8KGfQ/s640/Screen+Shot+2020-04-30+at+1.49.07+PM.png&quot; width=&quot;368&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Now I can search through the records and add users from this Redis/Node.js application that I can access from the internet.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidmakAx6fGQj7P-4FFGt1OAakKaDm5M_o1xnmVoEXmS1CBzDpOD3SBO7ZEaSV2Llu5clu_TfzlOtDYl_iSre6oO2H8oHw5WqlurfSkTrtj5fCwXJBeoBzeOaoQXTYG-vzlq8n0YXq6hE8w/s1600/Screen+Shot+2020-04-30+at+1.49.27+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;628&quot; data-original-width=&quot;1280&quot; height=&quot;314&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidmakAx6fGQj7P-4FFGt1OAakKaDm5M_o1xnmVoEXmS1CBzDpOD3SBO7ZEaSV2Llu5clu_TfzlOtDYl_iSre6oO2H8oHw5WqlurfSkTrtj5fCwXJBeoBzeOaoQXTYG-vzlq8n0YXq6hE8w/s640/Screen+Shot+2020-04-30+at+1.49.27+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://jgardnerla.blogspot.com/2020/04/user-management-application-using.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-omacjyUd3AIf86ghncf2GZu466_Q8_U5DM0053NQil4jQtuMFYiGwkq34xzxFd8yQkUwOetbBEFmWS7td2x1NVS2sbzjUzpvWNz4i_R0xpJLWFGW1bgjd_kv2H7nqenDJrxi54oBWnpD/s72-c/Screen+Shot+2020-04-30+at+1.24.35+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-1480199014349698604</guid><pubDate>Tue, 28 Apr 2020 18:12:00 +0000</pubDate><atom:updated>2020-04-28T11:12:11.862-07:00</atom:updated><title> Cron job - Daemon - Shell script to send email alert to admins when RAM utilization hits critical levels</title><description>&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;In this example I am creating a daemon to run a cron job. Cron jobs are scheduled tasks that can be setup to run in an automated fashion on particular, days, weeks or even yearly quarters. And daemons are silent processes that are running in the background constantly in an alert state ready to spring into action.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;First, I checked to see how much ram is free on this server at any given time. The server is an Ubuntu LAMP stack on a cloud. In this particular instance 265MB of ram are free.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ_NKKHq5CSmkscYxYz-CHfDQby7nUN-Kd81spepDDZnJSc09OxPmSZNjdbi9rjm6-lHaWY-1abdmPA_zS49UhMmTxX_m5fBWrDJHNlFAuCsFV8UIFBiujTgky_1r1OFgIjtImwMWC-RLk/s1600/Screen+Shot+2020-04-21+at+12.41.19+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;66&quot; data-original-width=&quot;686&quot; height=&quot;59&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ_NKKHq5CSmkscYxYz-CHfDQby7nUN-Kd81spepDDZnJSc09OxPmSZNjdbi9rjm6-lHaWY-1abdmPA_zS49UhMmTxX_m5fBWrDJHNlFAuCsFV8UIFBiujTgky_1r1OFgIjtImwMWC-RLk/s640/Screen+Shot+2020-04-21+at+12.41.19+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This command returns the exact value for comparisons and is what I will plug into my program later on:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgKUh9TP9vcbwrtjVtw2aZo2CTba1CNP4a9dN1PM8wYbWbiJMKqD_siXkEoGn590NqThktjV2phNEqmOtFaM280GuCoDzbRzZYhcWDCDLDJis4-8W8FecUU8RwA6U7jxFohWIgqPasJHKY/s1600/Screen+Shot+2020-04-21+at+12.43.09+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;68&quot; data-original-width=&quot;928&quot; height=&quot;46&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgKUh9TP9vcbwrtjVtw2aZo2CTba1CNP4a9dN1PM8wYbWbiJMKqD_siXkEoGn590NqThktjV2phNEqmOtFaM280GuCoDzbRzZYhcWDCDLDJis4-8W8FecUU8RwA6U7jxFohWIgqPasJHKY/s640/Screen+Shot+2020-04-21+at+12.43.09+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;So now that I know my parameters for where I want my RAM to be running and when I want to be emailed about any alarming spikes in usage. The alerts.sh program I created below sends emails to tester@slabj.com whenever the free ram is less than or equal to 267MB. I set the threshold really low to test my script.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh81KlKUeAnAH2XYiDaoT3XzluPpcGksmPxdCIEegAxtkaTHkiVRfkmVETijZAW31k8yXW5Z7-l-iie4LgrU1cEJaN2lb9oWY9e-i-NlRQ68DepcM7N25hEdKurAcInw_pb6ZpLBRMMKNmS/s1600/Screen+Shot+2020-04-21+at+12.55.54+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;344&quot; data-original-width=&quot;956&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh81KlKUeAnAH2XYiDaoT3XzluPpcGksmPxdCIEegAxtkaTHkiVRfkmVETijZAW31k8yXW5Z7-l-iie4LgrU1cEJaN2lb9oWY9e-i-NlRQ68DepcM7N25hEdKurAcInw_pb6ZpLBRMMKNmS/s640/Screen+Shot+2020-04-21+at+12.55.54+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Cool. It&#39;s working now and I got an email telling me that the RAM is low. That was expected since I set normal usage as low to check my script.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnKao2UkRUOgln2-VWJMJfoEojyD1PPK6fgxf3p4vH9_tP06RpyntPP6NfptQV89SA1PiKRi_yA9PLnd5QMwY7NeW4TA00i4q63rsyC5i0ca54MOYx1iMjAvYqDQhXx1DMphFhNUnQczBJ/s1600/Screen+Shot+2020-04-21+at+12.57.41+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;150&quot; data-original-width=&quot;1146&quot; height=&quot;82&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnKao2UkRUOgln2-VWJMJfoEojyD1PPK6fgxf3p4vH9_tP06RpyntPP6NfptQV89SA1PiKRi_yA9PLnd5QMwY7NeW4TA00i4q63rsyC5i0ca54MOYx1iMjAvYqDQhXx1DMphFhNUnQczBJ/s640/Screen+Shot+2020-04-21+at+12.57.41+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;And here is the email in a little more detail. You can see that I am having &quot;root&quot; email me whenever the RAM free size is &quot;LOW&quot; which is an arbitrary parameter that can be set however I choose.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIeXOgdE2yy7EXIUAZ5hREqoqanu519BF7oQRxfUI0UKzd25Lpi1TaT5uYfI6s3NTu7h4eFjpa4QN8extAk56Fec9EeHCexoYYWgm5KDOFUxqli1cGpS5HK5J_GS9B9TJdk3GcKJ05L_ez/s1600/Screen+Shot+2020-04-21+at+12.57.49+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;320&quot; data-original-width=&quot;1170&quot; height=&quot;174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIeXOgdE2yy7EXIUAZ5hREqoqanu519BF7oQRxfUI0UKzd25Lpi1TaT5uYfI6s3NTu7h4eFjpa4QN8extAk56Fec9EeHCexoYYWgm5KDOFUxqli1cGpS5HK5J_GS9B9TJdk3GcKJ05L_ez/s640/Screen+Shot+2020-04-21+at+12.57.49+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Here I&#39;m having the script echo back what it is doing to the console. This is for illustrative purposes as daemons are not to be seen nor heard from unless they are taking action.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPttE780n75ndM4MMLpbFlWWvGiK6fGtoqVSPONFbavzh-RJaEXAW7mwKTLyXOR8MCSXGctsI5iYmJztcY9C2FgbKwk0WBw7iprrhbmCFCTM3wBTfkWZDLrMN_Td3UMOTjQjnyDbn7T_ql/s1600/Screen+Shot+2020-04-21+at+12.57.55+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;61&quot; data-original-width=&quot;584&quot; height=&quot;64&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPttE780n75ndM4MMLpbFlWWvGiK6fGtoqVSPONFbavzh-RJaEXAW7mwKTLyXOR8MCSXGctsI5iYmJztcY9C2FgbKwk0WBw7iprrhbmCFCTM3wBTfkWZDLrMN_Td3UMOTjQjnyDbn7T_ql/s640/Screen+Shot+2020-04-21+at+12.57.55+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;With the addition of a while loop, this now becomes infinite. The process will start running now and won&#39;t stop unless I tell it to.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMco7MEFEHV7Bj3o4_r727iyqYJEVdfrPm2hKuPBQoCwfyYcRpTcrOjvuWyHFPwWcbS8uwQNrRGEerZ6xdjheBglTyw6u37coXno7Mpt2oIYx-Iyu28zYOsy_mnVUnITGIP0mK0gBtHtal/s1600/Screen+Shot+2020-04-21+at+1.01.49+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;449&quot; data-original-width=&quot;976&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMco7MEFEHV7Bj3o4_r727iyqYJEVdfrPm2hKuPBQoCwfyYcRpTcrOjvuWyHFPwWcbS8uwQNrRGEerZ6xdjheBglTyw6u37coXno7Mpt2oIYx-Iyu28zYOsy_mnVUnITGIP0mK0gBtHtal/s640/Screen+Shot+2020-04-21+at+1.01.49+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;To make it more clear here I am echoing responses for either state the machine is in.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrUXEm98ODTiqoQl_9O1BgS85Lo0wz23iYMl2IhsODN0N83HNC60hTRrj2v8MX6-RcCeWjxJ99eGe8aDwf0JD4QmRBVYfp6MskYz22kdhDwrXhQjyLIH8RXIXrvD-TuMVV8hjn0FVp3e3p/s1600/Screen+Shot+2020-04-21+at+1.03.11+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;482&quot; data-original-width=&quot;1008&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrUXEm98ODTiqoQl_9O1BgS85Lo0wz23iYMl2IhsODN0N83HNC60hTRrj2v8MX6-RcCeWjxJ99eGe8aDwf0JD4QmRBVYfp6MskYz22kdhDwrXhQjyLIH8RXIXrvD-TuMVV8hjn0FVp3e3p/s640/Screen+Shot+2020-04-21+at+1.03.11+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;As you can see, with the Daemon running constantly the alerts are constant. This is not necessarily ideal. I could easily just exclude the echos and have my daemon run all the time without the average user noticing. However, once there are many daemons I don&#39;t want them all running in the background eating up memory space or using up CPU power.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiaundz4w2aJCQ636qe7Zv4P4oAnx5pcbqLwvwZrj28TdGkHm6E9Ky0N1sX1R1MbbozHxiZhclDp2vvRXSCcj_J5pZGeH4WYhhoXhvuzn1ImGO3Y5jWbn2vzMEyeoeP_aAG_jMlCEiHkdQ/s1600/Screen+Shot+2020-04-21+at+1.04.09+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;746&quot; data-original-width=&quot;926&quot; height=&quot;514&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiaundz4w2aJCQ636qe7Zv4P4oAnx5pcbqLwvwZrj28TdGkHm6E9Ky0N1sX1R1MbbozHxiZhclDp2vvRXSCcj_J5pZGeH4WYhhoXhvuzn1ImGO3Y5jWbn2vzMEyeoeP_aAG_jMlCEiHkdQ/s640/Screen+Shot+2020-04-21+at+1.04.09+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Fortunately Linux has a cool tool just for this particular situation. Cron jobs are scheduled tasks that run at assigned dates and times. In this instance I scheduled a Cron job to check the RAM usage every Tuesday at 9:20am. Ideally you&#39;d want to check at different intervals but since I initially created this on Tuesday a little after 9am I decided it would be wise to set the first Cron job to run in the next few minutes to test it out.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxIEnnfACT3qOARhPy70aOQVyPtVQpS3zlxk4v5rPx45kvT5F9W48k64DYV0DG2n8el1AK8U-dnP9BY9_CZWK5z6k1gJTHa4aKCD-JsQD6p27q6F6p2EZ24BhPwlhH12T-Ws7cnUGqJLMe/s1600/Screen+Shot+2020-04-21+at+1.18.19+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;572&quot; data-original-width=&quot;1190&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxIEnnfACT3qOARhPy70aOQVyPtVQpS3zlxk4v5rPx45kvT5F9W48k64DYV0DG2n8el1AK8U-dnP9BY9_CZWK5z6k1gJTHa4aKCD-JsQD6p27q6F6p2EZ24BhPwlhH12T-Ws7cnUGqJLMe/s640/Screen+Shot+2020-04-21+at+1.18.19+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;And that is it in a nutshell. I now have a program that is automated and chronologically scheduled to run at specific intervals to check system RAM utilization. Additionally, the system sends email alerts to the appropriate individuals if any administration intervention is needed to keep everything running smoothly.&lt;/span&gt;</description><link>http://jgardnerla.blogspot.com/2020/04/cron-job-daemon-shell-script-to-send.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ_NKKHq5CSmkscYxYz-CHfDQby7nUN-Kd81spepDDZnJSc09OxPmSZNjdbi9rjm6-lHaWY-1abdmPA_zS49UhMmTxX_m5fBWrDJHNlFAuCsFV8UIFBiujTgky_1r1OFgIjtImwMWC-RLk/s72-c/Screen+Shot+2020-04-21+at+12.41.19+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-182008320335754140</guid><pubDate>Tue, 28 Apr 2020 17:18:00 +0000</pubDate><atom:updated>2020-04-28T10:22:14.414-07:00</atom:updated><title>JWT Tokens with Node.js and Express</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: right;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;In this example I show how to create access tokens for an application using Node.js and express. JSON Web Tokens are a standard type of token that is used widely to certify user identity by a server before sending data back to the client machine.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;First I sign JWT with a secret token from the client. Then the server verifies the token and reads the information if the token is valid. I also created the ability to have the tokens expire or be refreshed as is needed.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;For the initial setup I just needed to make sure Node.js and express were installed and up to date. Then I added a package called nodemon to monitor for any changes and to react accordingly. To handle the authentication in a secure manner I also created a separate server for handling the main request and one that is used purely for authentication.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBVO8uyqZ-pQeepA4-WJZmAcoh8D2HQ7hv8682FLSGjbAPK5GVCE7wx8YOru8AJCq5XEIUTsKIQVIdcOhY8QkLW5WlY5qiywRQ6LYRRNuc4NLBX1zE8S7C2AFlBxKbmVp3QfxhpMa6cEfC/s1600/Screen+Shot+2020-04-19+at+1.56.55+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;100&quot; data-original-width=&quot;1116&quot; height=&quot;56&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBVO8uyqZ-pQeepA4-WJZmAcoh8D2HQ7hv8682FLSGjbAPK5GVCE7wx8YOru8AJCq5XEIUTsKIQVIdcOhY8QkLW5WlY5qiywRQ6LYRRNuc4NLBX1zE8S7C2AFlBxKbmVp3QfxhpMa6cEfC/s640/Screen+Shot+2020-04-19+at+1.56.55+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Additionally, in a rest file I am creating the parameters for the /posts and /login requests. The application type is json hence the name JSON Web Tokens.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMOC6uEyiqadysXWelB9AddBPhHT7STpAq4PlPuFA9RqrX1xvakeeoGbOIrB13crMD3iShIYk392f2kXVG1XXqK9meWpXLrmNvlOHi-Glr8XfT-JjtL7cc0GV5iT0hBg0i2mwW6Mmc2Yph/s1600/Screen+Shot+2020-04-19+at+2.12.04+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;556&quot; data-original-width=&quot;722&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMOC6uEyiqadysXWelB9AddBPhHT7STpAq4PlPuFA9RqrX1xvakeeoGbOIrB13crMD3iShIYk392f2kXVG1XXqK9meWpXLrmNvlOHi-Glr8XfT-JjtL7cc0GV5iT0hBg0i2mwW6Mmc2Yph/s320/Screen+Shot+2020-04-19+at+2.12.04+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;The initial test to the server returns a 200 code along with the &quot;accessToken&quot; so I know everything is working up to this point. The access tokens are being generated.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6nbOL-PqfiFdNmvuZ8sxlJCI3vhIYT7jvEUplTKubdiTtN-zQtO6yeJ96nuIg0-2JV0bbc3vW9wAldJpPIdA71H1e4Cvzqw-O3BAXy5t9HTfZZpxDN1L94xuTjvnizTs_n9saU38KIaaf/s1600/Screen+Shot+2020-04-19+at+2.12.13+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;514&quot; data-original-width=&quot;766&quot; height=&quot;214&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6nbOL-PqfiFdNmvuZ8sxlJCI3vhIYT7jvEUplTKubdiTtN-zQtO6yeJ96nuIg0-2JV0bbc3vW9wAldJpPIdA71H1e4Cvzqw-O3BAXy5t9HTfZZpxDN1L94xuTjvnizTs_n9saU38KIaaf/s320/Screen+Shot+2020-04-19+at+2.12.13+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;I next modified the code to return a refresh token so that the initial token can be expired and I can give users new tokens to continue to verify user identity but I don&#39;t just have one token that can be used over and over. This is for safety too, because it helps me lock the server in essence every time a token expires.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR9zN3Xlk8Y-pJQ39E4mM3enlatRRRhvwp96k_YeLDLWFRdrAUyjQJ-RmshE3fTqx0MBcCPqYP5E8sGHwkuoyuVEvUM7iKaWt2ixg8WQd1GEuGJOySrVVdx62G3YFUXUhlRsLzlm9GDCuM/s1600/Screen+Shot+2020-04-19+at+2.49.36+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;923&quot; data-original-width=&quot;1600&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR9zN3Xlk8Y-pJQ39E4mM3enlatRRRhvwp96k_YeLDLWFRdrAUyjQJ-RmshE3fTqx0MBcCPqYP5E8sGHwkuoyuVEvUM7iKaWt2ixg8WQd1GEuGJOySrVVdx62G3YFUXUhlRsLzlm9GDCuM/s640/Screen+Shot+2020-04-19+at+2.49.36+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Ok, so now that I have tokens and refresh tokens generating, I need to use those to access data. I now am getting back specific user data based on their token. Here the first post is returned for the username &quot;Jason&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ0XV72wu7o5mE6CCgGPfKslQolrg-oJacj7onrjHEhh0SB12F0jATeIhlTNkgWp7l2_KUV0wl2QdNgZ0Qab98vpd2RBxQo91QRfW7zKUNfUwDE0S6BIJJCKP2x7R9L_wU1zf2EPnVgOno/s1600/Screen+Shot+2020-04-19+at+2.52.11+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;627&quot; data-original-width=&quot;1600&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ0XV72wu7o5mE6CCgGPfKslQolrg-oJacj7onrjHEhh0SB12F0jATeIhlTNkgWp7l2_KUV0wl2QdNgZ0Qab98vpd2RBxQo91QRfW7zKUNfUwDE0S6BIJJCKP2x7R9L_wU1zf2EPnVgOno/s640/Screen+Shot+2020-04-19+at+2.52.11+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here below you can see that a token will expire and eventually the server is locked again. Any additional requests will return a &quot;403 Forbidden&quot; error.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLiTOWMm3QO3w21ryFVLHvoZDkDzuctZ8AV0SLWR9hcecj2Jus4AAIDcEH3r9GWLObgfW4DuVTxXZeCfad9Ya26AQu5Rt0pLv8FhlBQLaAk7-7gBJSbgy1jNdgAlm-QrGAU8iY96Y0JU8n/s1600/Screen+Shot+2020-04-19+at+3.01.54+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;603&quot; data-original-width=&quot;1600&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLiTOWMm3QO3w21ryFVLHvoZDkDzuctZ8AV0SLWR9hcecj2Jus4AAIDcEH3r9GWLObgfW4DuVTxXZeCfad9Ya26AQu5Rt0pLv8FhlBQLaAk7-7gBJSbgy1jNdgAlm-QrGAU8iY96Y0JU8n/s640/Screen+Shot+2020-04-19+at+3.01.54+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;This process is actually only part of the equation. JWT tokens are used in tandem for additional security with user passwords. It is in interesting process because it allows granular control of user access to server data in a way which access can be granted, extended or restricted in an accurate and efficient manner.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;</description><link>http://jgardnerla.blogspot.com/2020/04/jwt-tokens-with-nodejs-and-express.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBVO8uyqZ-pQeepA4-WJZmAcoh8D2HQ7hv8682FLSGjbAPK5GVCE7wx8YOru8AJCq5XEIUTsKIQVIdcOhY8QkLW5WlY5qiywRQ6LYRRNuc4NLBX1zE8S7C2AFlBxKbmVp3QfxhpMa6cEfC/s72-c/Screen+Shot+2020-04-19+at+1.56.55+AM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-1608930713238031858</guid><pubDate>Wed, 08 Apr 2020 17:35:00 +0000</pubDate><atom:updated>2020-04-08T15:04:55.296-07:00</atom:updated><title>Gathering and saving eSignatures from an HTML form with Ajax, PHP &amp; jQuery</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;For this example I show how to create an e-signature form where users can sign a form and then the signature is sent back to the database or server. I used HTML to construct the form and javascript to do AJAX calls with jQuery and the help of PHP. Below is the Javascript code that gets the image from the first location and saves it with the use of another php file called &#39;save_sign.php&#39;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRncDTvuZ0iYnCgiXCDh09deW_paYcId84d3ZIxUURhYPet7x_dpwYjPI6u0pmU6Wwo6O7rdaIU3rwsYhWMeoXbL9qUi5cZbWIW0-6Skd1hcKG06r7g-FJ1nqQgo6wkmlJY3qf-bR2a8Cu/s1600/Screen+Shot+2020-04-08+at+10.27.40+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;508&quot; data-original-width=&quot;1096&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRncDTvuZ0iYnCgiXCDh09deW_paYcId84d3ZIxUURhYPet7x_dpwYjPI6u0pmU6Wwo6O7rdaIU3rwsYhWMeoXbL9qUi5cZbWIW0-6Skd1hcKG06r7g-FJ1nqQgo6wkmlJY3qf-bR2a8Cu/s640/Screen+Shot+2020-04-08+at+10.27.40+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here in &#39;save_sign.php&#39;&amp;nbsp; I get the image, decode it and save the signature snapshot image as a .png file in a folder I created called doc_signs.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK83ql7PsW93jnkpqVbiMMKLlY0O2o0Nf6MFmQWhc9gJKR8893TS2WhgEWc67VeNFrGApPInAX2Ikq71eKQNf2wcIOqUFpTCoh8oTdE88is-rPalpitlhTHIWDwO13Yv-UcJnTSD9udSxN/s1600/Screen+Shot+2020-04-08+at+10.27.55+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;380&quot; data-original-width=&quot;702&quot; height=&quot;346&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK83ql7PsW93jnkpqVbiMMKLlY0O2o0Nf6MFmQWhc9gJKR8893TS2WhgEWc67VeNFrGApPInAX2Ikq71eKQNf2wcIOqUFpTCoh8oTdE88is-rPalpitlhTHIWDwO13Yv-UcJnTSD9udSxN/s640/Screen+Shot+2020-04-08+at+10.27.55+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEaV9Ah3R6Zx0-rllKYbGPW-RAQYbj2Fx9T6Oe4rEon8dEkFG3gtkb9DavG-RpOKvT0g_R27A72qqUxXfq4ZBurcqDzVtnL69Gihah4R1phZN9EwuATwSdd7V56paOsncbstZqqRgzhWcq/s1600/Screen+Shot+2020-04-08+at+10.21.17+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;486&quot; data-original-width=&quot;1600&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEaV9Ah3R6Zx0-rllKYbGPW-RAQYbj2Fx9T6Oe4rEon8dEkFG3gtkb9DavG-RpOKvT0g_R27A72qqUxXfq4ZBurcqDzVtnL69Gihah4R1phZN9EwuATwSdd7V56paOsncbstZqqRgzhWcq/s640/Screen+Shot+2020-04-08+at+10.21.17+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here I have the output being reflected from the database. Every time a new signature is saved they are put in that document signature folder. So here for showing the concept, I am reflecting the signatures as they get saved right back onto the page. In a production app from here the only thing left to do is to know where the specific project wants to route the signatures. It may suffice to just save the document signatures along with the other customer sign-up or purchasing data.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFLLLNpsZSIkMwMW6qvl5rxKo3k68fNU51N3PzEg0774VSIQX1DohmWcZRiruIRHgfUTEbqRvPnKaAndBIlZYkR-TezgYi58yqfYL3kEAxNHRByZGJI-AbulHhWbmNjmSWil5pHeJhAhTw/s1600/Screen+Shot+2020-04-08+at+10.23.04+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;620&quot; data-original-width=&quot;1600&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFLLLNpsZSIkMwMW6qvl5rxKo3k68fNU51N3PzEg0774VSIQX1DohmWcZRiruIRHgfUTEbqRvPnKaAndBIlZYkR-TezgYi58yqfYL3kEAxNHRByZGJI-AbulHhWbmNjmSWil5pHeJhAhTw/s640/Screen+Shot+2020-04-08+at+10.23.04+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>http://jgardnerla.blogspot.com/2020/04/gathering-and-saving-esignatures-from.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRncDTvuZ0iYnCgiXCDh09deW_paYcId84d3ZIxUURhYPet7x_dpwYjPI6u0pmU6Wwo6O7rdaIU3rwsYhWMeoXbL9qUi5cZbWIW0-6Skd1hcKG06r7g-FJ1nqQgo6wkmlJY3qf-bR2a8Cu/s72-c/Screen+Shot+2020-04-08+at+10.27.40+AM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-7441910694486257008</guid><pubDate>Fri, 03 Apr 2020 17:09:00 +0000</pubDate><atom:updated>2020-05-07T13:09:23.069-07:00</atom:updated><title>Setting up and configuring an entire email server in the cloud on Ubuntu(Linux) for a website</title><description>&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;So for this example I setup an email server in Ubuntu on a cloud for a testing website I created. The process builds upon previous examples. So for this I started with installing Apache and PHP on the virtual machine to begin the installation and configuration of all the additional components.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;First I installed Postfix which serves as the MTA(mail transfer agent). This is the software responsible for delivering and receiving the emails. Then I installed Dovecot as an MDA(mail delivery agent) which then more specifically delivers the emails to/from the mail server. At this point I now have an IMAP/POP3 email server and am going to install SquirrelMail on the email server to have a simple interface to manage emails on my server.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh96gFU2X2iSHBdOjZJmzVMkVJU8PLwnG6HNvOyW29EzAv0iIwsbgF9VmCAD4WrMxDIDH2utbQeRUk3n3k2DPJvajuoggWucPdZz0HemCnneWjU21R6ESjeB7iRkeAxKPyNAIab1vHobhwW/s1600/Screen+Shot+2020-04-02+at+1.20.49+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1366&quot; data-original-width=&quot;1446&quot; height=&quot;377&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh96gFU2X2iSHBdOjZJmzVMkVJU8PLwnG6HNvOyW29EzAv0iIwsbgF9VmCAD4WrMxDIDH2utbQeRUk3n3k2DPJvajuoggWucPdZz0HemCnneWjU21R6ESjeB7iRkeAxKPyNAIab1vHobhwW/s400/Screen+Shot+2020-04-02+at+1.20.49+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9mC3_zMCGW9j9OWkcDaDKKSgcMRkex2MRZoBkJtl9YLPMJ3cdQs4pQP5lexUmOTInatE3Qt1fIyoPH_lZ_i6281HknCBoXXMdxNAXZGt_J5U2oQ8OJL3mAhwTZloHJ1NfgP-xfYBnPzTM/s1600/Screen+Shot+2020-04-02+at+1.30.43+PM.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1061&quot; data-original-width=&quot;1600&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9mC3_zMCGW9j9OWkcDaDKKSgcMRkex2MRZoBkJtl9YLPMJ3cdQs4pQP5lexUmOTInatE3Qt1fIyoPH_lZ_i6281HknCBoXXMdxNAXZGt_J5U2oQ8OJL3mAhwTZloHJ1NfgP-xfYBnPzTM/s640/Screen+Shot+2020-04-02+at+1.30.43+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;Here I added postfix to the server above and below I am confirming the service status. Everything looks good for the next steps.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtRBVeLcL-fj6xpbNnWyQz_hG5QtIS2F_QIdKRi28MAEkv6ZJbQ_gXQz7AfF9p5YI8-npxN41aFoRP-6uOl8lW1FVrHAC_OuMNLawUQ78PDcZqkAq8Vdf2mLYKoqeear_q7JxYS-dXU3mM/s1600/Screen+Shot+2020-04-02+at+1.32.00+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;286&quot; data-original-width=&quot;1166&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtRBVeLcL-fj6xpbNnWyQz_hG5QtIS2F_QIdKRi28MAEkv6ZJbQ_gXQz7AfF9p5YI8-npxN41aFoRP-6uOl8lW1FVrHAC_OuMNLawUQ78PDcZqkAq8Vdf2mLYKoqeear_q7JxYS-dXU3mM/s640/Screen+Shot+2020-04-02+at+1.32.00+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;Below I now have confirmation that Dovecot is active and running. The email server is up at this point.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyzDv84B3N9lqNG7fSM35s8k-1oQnkOdYO8sIdJc_c7fE8ughA1daMSu-i1gBdVb5-pOnWs81bNmN2FcVFbqY66Fj8tBHptav8ppAUMr7YQxwQS8qPt599f5vZblsM6yrjRx15eUw6Kpk/s1600/Screen+Shot+2020-04-02+at+1.35.59+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;514&quot; data-original-width=&quot;1318&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyzDv84B3N9lqNG7fSM35s8k-1oQnkOdYO8sIdJc_c7fE8ughA1daMSu-i1gBdVb5-pOnWs81bNmN2FcVFbqY66Fj8tBHptav8ppAUMr7YQxwQS8qPt599f5vZblsM6yrjRx15eUw6Kpk/s640/Screen+Shot+2020-04-02+at+1.35.59+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi88mf3gqM5WmQ43VVVZ0Hx1iiTtRm_sGRyX7cO9-vpZ97QuAzFlf3KDg9NGatox-9cBJibrKju_G0KT1IRsXciqfAwv9k4Du3YaIDgacY-UHtDvQma1rmT7dqa48zQF6rXz3YYm-8tsIpO/s1600/Screen+Shot+2020-04-02+at+1.41.06+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1470&quot; data-original-width=&quot;964&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi88mf3gqM5WmQ43VVVZ0Hx1iiTtRm_sGRyX7cO9-vpZ97QuAzFlf3KDg9NGatox-9cBJibrKju_G0KT1IRsXciqfAwv9k4Du3YaIDgacY-UHtDvQma1rmT7dqa48zQF6rXz3YYm-8tsIpO/s640/Screen+Shot+2020-04-02+at+1.41.06+PM.png&quot; width=&quot;418&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;I did a code review on SquirrelMail to make sure the configurations are correct for my server. I just had to add a few read/write access modifications to the server for this to work correctly. Also for now since this is a private email service random users can not sign themselves up. I as the admin create users directly on the server as you would normally have for a company&#39;s external email login for employees.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi14xu5pkB1v_noptZBITduGgypMWzceIzb5HxeyDnXvN_RVSMGHgPevs8_aYarjHIIQfNxc-8tLFeK9Kn0_Kt6pdYhjeHcB5enpjyB4KNF3NzNVe8D8us-cdSwPxrqaCIjuQdbqWbg9CiO/s1600/Screen+Shot+2020-04-02+at+1.44.37+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;672&quot; data-original-width=&quot;1286&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi14xu5pkB1v_noptZBITduGgypMWzceIzb5HxeyDnXvN_RVSMGHgPevs8_aYarjHIIQfNxc-8tLFeK9Kn0_Kt6pdYhjeHcB5enpjyB4KNF3NzNVe8D8us-cdSwPxrqaCIjuQdbqWbg9CiO/s640/Screen+Shot+2020-04-02+at+1.44.37+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;I then tested to confirm that I can receive emails from my gmail account and I am also able to send emails to other users with accounts on my server. I created a test account of &#39;tester&#39; and another of &#39;squirrelone&#39;. Their respective email addresses are now tester@slabj.com and squirrelone@slabj.com. Here &#39;squirrelone&#39; has received test messages from &#39;tester&#39; and myself from my gmail address.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrtIqdvsialMqwaORpmIYgPrMpF6IH8mz9bQmBvh6DOumJEa31hR8a50aCubsTAS4-8OrKDmLiUqsDsJ9IB2pN0PGrcI2ly8RwCEzpNXXhD-bGqJ1BaX17Vp4NEmz0EEpsmhj5U1Wv7exI/s1600/Screen+Shot+2020-04-02+at+2.42.36+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;678&quot; data-original-width=&quot;1600&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrtIqdvsialMqwaORpmIYgPrMpF6IH8mz9bQmBvh6DOumJEa31hR8a50aCubsTAS4-8OrKDmLiUqsDsJ9IB2pN0PGrcI2ly8RwCEzpNXXhD-bGqJ1BaX17Vp4NEmz0EEpsmhj5U1Wv7exI/s640/Screen+Shot+2020-04-02+at+2.42.36+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5b_R7gP5h_J1Qbp087zVSdMs02Blsik4Cn-2qgiyLEV0z-RL37OmqfCZNfCj6oe_r8vF4fyF0Zur_hZ8Q-GR4FrJXWDBOn4Ms7NMqbLfEBDbxK0ss4GRV-2J1OVXpddBKScMcLYCgHpIj/s1600/Screen+Shot+2020-04-02+at+2.42.49+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;831&quot; data-original-width=&quot;1600&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5b_R7gP5h_J1Qbp087zVSdMs02Blsik4Cn-2qgiyLEV0z-RL37OmqfCZNfCj6oe_r8vF4fyF0Zur_hZ8Q-GR4FrJXWDBOn4Ms7NMqbLfEBDbxK0ss4GRV-2J1OVXpddBKScMcLYCgHpIj/s640/Screen+Shot+2020-04-02+at+2.42.49+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLM72687rAIGm8Pv8BEOAREHomrx4dIBC87RNJhNM46SQ3AG-FWxwoV2VtcaxlltnRBZbQow7OaiyM8CWqk6eKsRJaIYmB39UJ7OrqYRqgFoRs7oY0ywBiOG8pOw5L7y4QI_Aw_HQW4tls/s1600/Screen+Shot+2020-04-02+at+2.43.11+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;706&quot; data-original-width=&quot;1600&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLM72687rAIGm8Pv8BEOAREHomrx4dIBC87RNJhNM46SQ3AG-FWxwoV2VtcaxlltnRBZbQow7OaiyM8CWqk6eKsRJaIYmB39UJ7OrqYRqgFoRs7oY0ywBiOG8pOw5L7y4QI_Aw_HQW4tls/s640/Screen+Shot+2020-04-02+at+2.43.11+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;And that&#39;s it. I have an Ubuntu cloud based email server correctly setup and configured for a specific domain I created where people or even other servers are now able to send and receive emails.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
</description><link>http://jgardnerla.blogspot.com/2020/04/ubuntu-email-server.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh96gFU2X2iSHBdOjZJmzVMkVJU8PLwnG6HNvOyW29EzAv0iIwsbgF9VmCAD4WrMxDIDH2utbQeRUk3n3k2DPJvajuoggWucPdZz0HemCnneWjU21R6ESjeB7iRkeAxKPyNAIab1vHobhwW/s72-c/Screen+Shot+2020-04-02+at+1.20.49+PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-2465010151457084160</guid><pubDate>Wed, 01 Apr 2020 17:18:00 +0000</pubDate><atom:updated>2020-04-01T11:23:23.047-07:00</atom:updated><title>Testing TCP/UDP baseline functionality with Netcat &amp; Curl through CLI(SSH)</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here I am showing how to setup a simple Netcat listening server to test baseline functionality of TCP/UDP connections. I create a simple document and save it as technical.txt that I will send to my server I am testing.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOoM0XvPpp2m00lUXeCIE8xYS5klx2tmbxpHorNgiRtw_jF2aHWvvntYGdNItRnOB4jeKGmna4Nyz9sbW-wMX9R46FJJ1BdYHvyypacNlDE2T0romMZAqmpTf-LF640HIl0-EvYzHaD8lT/s1600/Screen+Shot+2020-03-26+at+11.53.03+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;158&quot; data-original-width=&quot;1104&quot; height=&quot;90&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOoM0XvPpp2m00lUXeCIE8xYS5klx2tmbxpHorNgiRtw_jF2aHWvvntYGdNItRnOB4jeKGmna4Nyz9sbW-wMX9R46FJJ1BdYHvyypacNlDE2T0romMZAqmpTf-LF640HIl0-EvYzHaD8lT/s640/Screen+Shot+2020-03-26+at+11.53.03+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Here I create the simple document.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;On the server for phub.info I setup a Netcat listener at port 8888 that is ready to receive the specific document.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNpwFTsC11wL8Wq3gdaeOqTWqWxPYzPrhVqzDNc_m3_qAfBJFGnJ_KimWoHLGXC_4_47VvtoyBRKN4JockVHfqI36scagJ9E89Cb1nwDAisVMPTdRB4KfxuD561Hv6b2vWj1tyEl2xNzMv/s1600/Screen+Shot+2020-03-26+at+11.54.15+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;78&quot; data-original-width=&quot;1040&quot; height=&quot;48&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNpwFTsC11wL8Wq3gdaeOqTWqWxPYzPrhVqzDNc_m3_qAfBJFGnJ_KimWoHLGXC_4_47VvtoyBRKN4JockVHfqI36scagJ9E89Cb1nwDAisVMPTdRB4KfxuD561Hv6b2vWj1tyEl2xNzMv/s640/Screen+Shot+2020-03-26+at+11.54.15+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Now from the &#39;HQ-cloud-green&#39; server I get ready to receive the document with another Netcat server.&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdOkLTZlnzOX8UVfO7U87zCZb93JVBDSKWICpLinlmrdCDWJu9vVPPBNzY-QARp8WYCtPExLkUVoUCr5TPDBvXwk8hL2mMsj56omvVrDwdGwZFFMeqB4mfDITqUG27m4Ss3idQS9p5Nj2Z/s1600/Screen+Shot+2020-03-26+at+11.58.26+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;76&quot; data-original-width=&quot;982&quot; height=&quot;48&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdOkLTZlnzOX8UVfO7U87zCZb93JVBDSKWICpLinlmrdCDWJu9vVPPBNzY-QARp8WYCtPExLkUVoUCr5TPDBvXwk8hL2mMsj56omvVrDwdGwZFFMeqB4mfDITqUG27m4Ss3idQS9p5Nj2Z/s640/Screen+Shot+2020-03-26+at+11.58.26+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;To confirm receipt of the file I open it and view the contents from the terminal.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw_-7Wy8swMygp1wMloIYbyb-C23u6euRMK14KSfd9BXbnaPQ8jQagVNgVwKLwdmRhnZErtHGlAXEhY2ewscyv9A8c_pEczWxRkFRjicVCxRGxdtB4XE9rJVjTDn4NyW9ndbh8Mm0Z_s3b/s1600/Screen+Shot+2020-03-26+at+11.59.58+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;298&quot; data-original-width=&quot;990&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw_-7Wy8swMygp1wMloIYbyb-C23u6euRMK14KSfd9BXbnaPQ8jQagVNgVwKLwdmRhnZErtHGlAXEhY2ewscyv9A8c_pEczWxRkFRjicVCxRGxdtB4XE9rJVjTDn4NyW9ndbh8Mm0Z_s3b/s640/Screen+Shot+2020-03-26+at+11.59.58+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Great so now I can send messages back and forth but I want to test things a little further. I want to know how this connection port and the data being sent through it will be interpreted by browsers. With Netcat I can create a simple HTTP server to serve up content to browsers to see if my server is configured correctly. Here I pulled the data from the URL with cURL and you can see the HTML for the test page I am serving from the Netcat server.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPQGXf-pg7H8xOxVESsJZ3VRrL2iXkrSbJQXaKJFiX3983mrIMbV8-Bf-7aPN5ZqonkI4bp4VL94NI0vP_siUGu2fN5s5bnn3WCvtn2ckf0eOPS72GW8s7DcAIABwi4XN7F9KhLLwv5lat/s1600/Screen+Shot+2020-03-26+at+12.53.36+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;638&quot; data-original-width=&quot;942&quot; height=&quot;432&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPQGXf-pg7H8xOxVESsJZ3VRrL2iXkrSbJQXaKJFiX3983mrIMbV8-Bf-7aPN5ZqonkI4bp4VL94NI0vP_siUGu2fN5s5bnn3WCvtn2ckf0eOPS72GW8s7DcAIABwi4XN7F9KhLLwv5lat/s640/Screen+Shot+2020-03-26+at+12.53.36+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;And now when I visit port 8888 at my IP for phub.info (this is just a cloud droplet I spun up and destroyed after this example) I get the following output below and can confirm correct functionality of TCP &amp;amp; UDP.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIRZaT8Dic3fc9nZrPcjpoii88dl_zgiIUIPBeOCId8edMvcBzBDWm4PBMP7THoNzwG00NR7jvqWt4P2FSautgPuDLLaOpbjRqpuSf5xa4dh5T5yt6YGQX7Aq8xhcT1-W_W0qls4Hc1Bal/s1600/Screen+Shot+2020-03-26+at+12.55.11+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;412&quot; data-original-width=&quot;798&quot; height=&quot;329&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIRZaT8Dic3fc9nZrPcjpoii88dl_zgiIUIPBeOCId8edMvcBzBDWm4PBMP7THoNzwG00NR7jvqWt4P2FSautgPuDLLaOpbjRqpuSf5xa4dh5T5yt6YGQX7Aq8xhcT1-W_W0qls4Hc1Bal/s640/Screen+Shot+2020-03-26+at+12.55.11+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>http://jgardnerla.blogspot.com/2020/04/testing-tcpudp-baseline-functionality.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOoM0XvPpp2m00lUXeCIE8xYS5klx2tmbxpHorNgiRtw_jF2aHWvvntYGdNItRnOB4jeKGmna4Nyz9sbW-wMX9R46FJJ1BdYHvyypacNlDE2T0romMZAqmpTf-LF640HIl0-EvYzHaD8lT/s72-c/Screen+Shot+2020-03-26+at+11.53.03+AM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-469193354808242650.post-6383489157094061615</guid><pubDate>Wed, 01 Apr 2020 16:55:00 +0000</pubDate><atom:updated>2020-04-01T10:03:03.453-07:00</atom:updated><title>Using a GPG Keychain to encrypt emails and any text messages</title><description>&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;One of the most straightforward methods for integrating PGP keys with e-mails is with Apple e-mail using GPG Keychain. You just put in your e-mail, generate a key and add your e-mail as well as a password.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Now whenever you want to send a message you just tell the program to encrypt with the key of your choosing and you get the results below.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTm7YwjoO9-p1UyZiP-EvKjnhKxKlEEaB4QJTsHMFvf7qFhexfXOwb7zrAKTMXmYSvz-AD5ePZJyOLzT3oSRCnEBOr2KfHbHRmHyhcaaTf3oN7p-pkIiIN2cs0Zgv2p5PsHCfwsyF62qzJ/s1600/Screen+Shot+2020-03-26+at+4.28.05+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;152&quot; data-original-width=&quot;702&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTm7YwjoO9-p1UyZiP-EvKjnhKxKlEEaB4QJTsHMFvf7qFhexfXOwb7zrAKTMXmYSvz-AD5ePZJyOLzT3oSRCnEBOr2KfHbHRmHyhcaaTf3oN7p-pkIiIN2cs0Zgv2p5PsHCfwsyF62qzJ/s640/Screen+Shot+2020-03-26+at+4.28.05+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here is a test message.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrx3pZi-d-WwcfVmClT-5Y3_5xzoQ6NhCJNP7Yn1MxdNnpca5KrHy0HP0fzdvghm7bd5-o9IcfLoro9oiSfQB5q_MpkMbs1eVXBYEuAQb22M1U5K5f_b_ML4EulPyBcGUCy-CcMQgOhqPV/s1600/Screen+Shot+2020-03-26+at+4.37.16+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;696&quot; data-original-width=&quot;1600&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrx3pZi-d-WwcfVmClT-5Y3_5xzoQ6NhCJNP7Yn1MxdNnpca5KrHy0HP0fzdvghm7bd5-o9IcfLoro9oiSfQB5q_MpkMbs1eVXBYEuAQb22M1U5K5f_b_ML4EulPyBcGUCy-CcMQgOhqPV/s640/Screen+Shot+2020-03-26+at+4.37.16+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; text-align: center;&quot;&gt;I select to use a key I named &#39;newkey&#39;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 12.8px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyqJyoxrRfQvQSQlLARlS3s96VlL7KIrXFRNioRMRkZ2S3AClfDjs7N8aC1ps_1b5nVV-b7bwOAmKwHkFOen_cpgncPYZCHleqtWa_c2vlmZNUqIcW83_vQQqYczOVcF4C3C4W3TW4F14g/s1600/Screen+Shot+2020-03-26+at+4.37.45+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;992&quot; data-original-width=&quot;1246&quot; height=&quot;507&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyqJyoxrRfQvQSQlLARlS3s96VlL7KIrXFRNioRMRkZ2S3AClfDjs7N8aC1ps_1b5nVV-b7bwOAmKwHkFOen_cpgncPYZCHleqtWa_c2vlmZNUqIcW83_vQQqYczOVcF4C3C4W3TW4F14g/s640/Screen+Shot+2020-03-26+at+4.37.45+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Here is the message above encrypted with the PGP key.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinai-YAYJArtwBlopsIVISXJD9xntge9xZ1iv9_h7pYA9AmHLo1KQp3crwzkEDWRxuYZakwvEQRSr5nJRoVUR6Rfz8CaMhxz-C15_QgSq_jwY78FQg-GmTfEldehg89iFthrapfFM6Iyoo/s1600/Screen+Shot+2020-03-26+at+4.38.27+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;298&quot; data-original-width=&quot;832&quot; height=&quot;114&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinai-YAYJArtwBlopsIVISXJD9xntge9xZ1iv9_h7pYA9AmHLo1KQp3crwzkEDWRxuYZakwvEQRSr5nJRoVUR6Rfz8CaMhxz-C15_QgSq_jwY78FQg-GmTfEldehg89iFthrapfFM6Iyoo/s320/Screen+Shot+2020-03-26+at+4.38.27+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Now with the key configured to my e-mail all I have to do is select and choose to decrypt.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://jgardnerla.blogspot.com/2020/04/using-gpg-keychain-to-encrypt-emails.html</link><author>noreply@blogger.com (iAmTheRealJason)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTm7YwjoO9-p1UyZiP-EvKjnhKxKlEEaB4QJTsHMFvf7qFhexfXOwb7zrAKTMXmYSvz-AD5ePZJyOLzT3oSRCnEBOr2KfHbHRmHyhcaaTf3oN7p-pkIiIN2cs0Zgv2p5PsHCfwsyF62qzJ/s72-c/Screen+Shot+2020-03-26+at+4.28.05+PM.png" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>