Tech https://new.edwardfrye.com/ en Completed Master of Science, Information Security and Assurance https://new.edwardfrye.com/story/20150128/completed-master-science-information-security-and-assurance <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--story.html.twig x field--node--title.html.twig * field--node--story.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Completed Master of Science, Information Security and Assurance</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--story.html.twig x field--node--uid.html.twig * field--node--story.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> <a title="View user profile." href="/users/edward" lang="" about="/users/edward" typeof="schema:Person" property="schema:name" datatype="" class="username">Edward</a> <!-- END OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--story.html.twig x field--node--created.html.twig * field--node--story.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden">Wed, 01/28/2015 - 11:48</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--story.html.twig * field--node--body.html.twig * field--node--story.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>If you have been following my website, which you probably haven't since I don't update often enough to keep it interesting, but anyway; I started to go back to school to get my Bachelors of Science degree in 2011. When I started I knew that the B.S. should only be the beginning, after all, I had been in the technology industry and career field for 18 years. So my intent was to complete the B.S. and go directly into an advanced degree. When I completed the first degree 17 months later in 2013, I wasn't sure which direction to go. I was trying to determine if I should move towards a MS in InfoSec, a PhD in InfoSec, or some other degree. I ended up moving towards the "Masters of Science in Information Security and Assurance" with the intent on adding something like an MBA later.</p> <p>So here it is, January 2015, I completed the "Masters of Science in Information Security and Assurance" degree program and graduated in October 2014. And I'm wondering what I should do next. And lately I've been contemplating Law or &nbsp;Business degrees. I could easily continue to go to Western Governors University for an MBA and likely not have to take a GMAT test. Or I can try and get into one of the Brick and Mortar schools in the area such a Berkeley, Stanford, Santa Clara, etc. by scoring high on a GMAT.</p> <p>Or the other path I am considering as mentioned is a Juris Doctorate (JD) degree. Those same local schools have law programs as well, so I could study for and take an LSAT test to see if that may be an appropriate path. For the law school option, there is a similar path I could take to the one I took with WGU, and that would be to attend the Concord Law School by Kaplan University. Since I have proven that online school works for me and I live and work in Caliifornia, this is an option.</p> <p>What do others think?&nbsp;</p> </div> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--field-tags--story.html.twig x field--node--field-tags.html.twig * field--node--story.html.twig * field--field-tags.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <div class="field field--name-field-tags field--type-entity-reference field--label-hidden clearfix"> <ul class="links inline field_items"> <li><a href="/category/tags/education" hreflang="en">Education</a></li> <li><a href="/category/tags/tech" hreflang="en">Tech</a></li> <li><a href="/category/tags/information-technology" hreflang="en">Information Technology</a></li> <li><a href="/category/tags/information-security" hreflang="en">Information Security</a></li> </ul> </div> <!-- END OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--comment-node-story--story.html.twig * field--node--comment-node-story.html.twig * field--node--story.html.twig * field--comment-node-story.html.twig x field--comment.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <section class="field field--name-comment-node-story field--type-comment field--label-hidden comment-wrapper"> </section> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: x links--node.html.twig x links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> <!-- END OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> Wed, 28 Jan 2015 19:48:02 +0000 Edward 391 at https://new.edwardfrye.com https://new.edwardfrye.com/story/20150128/completed-master-science-information-security-and-assurance#comments SQL Injection protection and detection, SANS GCIH Class https://new.edwardfrye.com/story/20120802/sql-injection-protection-and-detection-sans-gcih-class <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--story.html.twig x field--node--title.html.twig * field--node--story.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">SQL Injection protection and detection, SANS GCIH Class</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--story.html.twig x field--node--uid.html.twig * field--node--story.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> <a title="View user profile." href="/users/edward" lang="" about="/users/edward" typeof="schema:Person" property="schema:name" datatype="" class="username">Edward</a> <!-- END OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--story.html.twig x field--node--created.html.twig * field--node--story.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden">Thu, 08/02/2012 - 23:13</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--story.html.twig * field--node--body.html.twig * field--node--story.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Today was day 4 of the GCIH course being taught by <a href="http://twitter.com/markbaggett">Mark Baggett</a>. Things are going great and I'm learning stuff, I today we discussed SQL injection and cross site scripting.</p> <p>Regarding prevention, the training it states to perform input checking and disallow/block the user from entering symbols or specials&nbsp;characters such the apostrophe (') or the semi-colon (;) or the percent (%), etc.</p> <p>This bothers me a bit, while input validation and checking really is key and probably the most important aspect to prevent SQL injection from affecting you, my problem is with the preventing the use of these symbols. If these symbols are blocked, your users <b>can't</b> use words like <b>can't</b>. Also, say <b>you're </b>using this sort of validation / blocking on passwords; then you just restricted the passwords that a person can use.</p> <p>I do a bunch of coding in PHP, and when I was learning how to protect the websites I was writing, the material I used to stated to use string escaping and functions such as&nbsp; <span class="refname" style="font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">mysql_real_escape_string().</span></p> <p>Mark mentioned parameterization, I didn't see this mentioned the course material. (although I didn't look closely).</p> <p>I believe this is the best way to prevent your user's input from affecting your SQL query. For example, if you are going to ask a database to verify a username password, the old method would be to construct your query something alone the lines like:</p> <blockquote><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;; color:blue">SELECT</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:Courier New,Times New Roman;color:navy">*</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">FROM</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> databse</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">.</span></b><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">table</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">WHERE</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> username </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">=</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: gray; ">'$USERNAME'</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">and</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> password </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">=</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: gray; ">'$PASSWORD'</span></blockquote> <p>This is a classic query that can be injected if you pass the variables in this way, such as passing:</p> <blockquote><b>Username:</b>&nbsp; <input disabled="disabled" length="50" type="text" value="' OR uid = 0; -- #"> &nbsp;<b>Password:&nbsp;</b>&nbsp; <input disabled="disabled" length="50" type="password" value="password"></blockquote> <p>This turnes the query into:&nbsp;</p> <blockquote> <p class="MsoNormal" style=" background-color: white; background-position: initial initial; background-repeat: initial initial; "><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;; color:blue">SELECT</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">*</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">FROM</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> database</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">.</span></b><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">table</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">WHERE</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> username </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">=</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:gray">''</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">OR</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">uid</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">=</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#FF8000">1</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">;</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:green">-- #' and password = 'password';</span></p> </blockquote> <p>Which would return the values for the user with id of 1, typically the administrative user; of course this is just an example. The idea of parameterization, also known as using bind-variables is that the user input is not sent to the database in the same place as the SQL statement. Instead you set your query up such as:</p> <blockquote><b><span style="font-size: 10pt; font-family: 'Courier New'; color: blue; ">SELECT</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: navy; ">*</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: blue; ">FROM</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;database</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: navy; ">.</span></b><b><span style="font-size: 10pt; font-family: 'Courier New'; color: blue; ">table</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: blue; ">WHERE</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;username&nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: navy; ">=</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;<font color="#808080">?</font></span><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: blue; ">and</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;password&nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: navy; ">=</span><span style="font-size: 10pt; font-family: 'Courier New'; "><font color="#808080">&nbsp;?</font></span></b></blockquote> <p>Then you pass the variables in later with a bind-variable and execute statement. With this format, you can pass just about, if not all variables and the statement doesn't change because it's already set in the database.</p> <p>In php, this would look like:</p> <blockquote> <p><span style="font-size:10.0pt;font-family:Courier New;color:red">&lt;?php</span><br> <span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$query</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">=</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:gray">"SELECT * FROM database.table WHERE username = ? and password = ?"</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">;</span><br> <span style="font-size: 10pt; font-family: 'Courier New'; "><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$results</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">=</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:blue">array</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">();</span><br> <b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;; color:blue">if</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family: &quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">(</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">$sth</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">=</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">$dbh</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">-&gt;</span><span style="font-size: 10pt; font-family: 'Courier New'; ">prepare</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">(</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:navy">$query</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">))</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; Times New Roman&quot;;color:#8000FF">{</span><br> <span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$sth</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">-&gt;</span><span style="font-size: 10pt; font-family: 'Courier New'; ">bind_param</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">(</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:gray">'ss'</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">,</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$_POST</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">[</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:gray">'username'</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">],</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$_POST</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">[</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:gray">'password'</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">]);</span><br> <span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$sth</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">-&gt;</span><span style="font-size: 10pt; font-family: 'Courier New'; ">bind_result</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">(</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$results</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">);</span><br> <span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$sth</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">-&gt;</span><span style="font-size: 10pt; font-family: 'Courier New'; ">execute</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">();</span><br> <span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; </span><b><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:blue">while</span></b><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">(</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$sth</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">-&gt;</span><span style="font-size: 10pt; font-family: 'Courier New'; ">fetch</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">())</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">{</span><br> <span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$result_count</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">++;</span><br> <span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:blue">print</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "> var_dump</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">(</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:navy">$results</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">)</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">.</span><span style="font-size: 10pt; font-family: 'Courier New'; "> </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:gray">"\n"</span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">;</span><br><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; </span><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">}</span><br><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:#8000FF">}</span><br> <span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;Times New Roman&quot;;color:red">?&gt;</span></span></p> </blockquote> <p>This turns uses mysqli, other languages may do this similarly, but the important part is in the query, not in the php code.</p> <p>The class is not a programming class, and Mark did mention this as a way to protect against SQL injection. My main concern with the instruction to filter input such as&nbsp;apostrophes is that this type of recommendation comes from security vendors, and looking for apostrophes in user inputs such as with a web application firewall&nbsp;will produce a lot of false positives. The biggest is the use of apostrophes to show possession or when used in a contraction. </p> <p>Having your security software alert every time a <b>user's</b> post contains an apostrophe without checking for other artifacts of an injection attempt is going to flood your logs and make you miss a real attempt.</p> <p>As for the class, I'm having fun and learning things. Mark is doing a great job of keeping things interesting and making things relevant by providing real world anecdotal accounts that the class can relate to. I learned how the buffer overflows actually happen in the processor, which I knew how they can over flow a buffer, but not how that could cause code to execute, now I do. I'm looking forward to Saturday for the capture the flag portion.</p> </div> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--field-tags--story.html.twig x field--node--field-tags.html.twig * field--node--story.html.twig * field--field-tags.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <div class="field field--name-field-tags field--type-entity-reference field--label-hidden clearfix"> <ul class="links inline field_items"> <li><a href="/category/tags/education" hreflang="en">Education</a></li> <li><a href="/category/tags/information-security" hreflang="en">Information Security</a></li> <li><a href="/category/tags/tech" hreflang="en">Tech</a></li> </ul> </div> <!-- END OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--comment-node-story--story.html.twig * field--node--comment-node-story.html.twig * field--node--story.html.twig * field--comment-node-story.html.twig x field--comment.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <section class="field field--name-comment-node-story field--type-comment field--label-hidden comment-wrapper"> </section> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: x links--node.html.twig x links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> <!-- END OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> Fri, 03 Aug 2012 06:13:06 +0000 Edward 303 at https://new.edwardfrye.com https://new.edwardfrye.com/story/20120802/sql-injection-protection-and-detection-sans-gcih-class#comments Passed my Cisco CCNA for my Degree (SAN GCIH coming) https://new.edwardfrye.com/story/20120727/passed-my-cisco-ccna-my-degree-san-gcih-coming <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--story.html.twig x field--node--title.html.twig * field--node--story.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Passed my Cisco CCNA for my Degree (SAN GCIH coming)</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--story.html.twig x field--node--uid.html.twig * field--node--story.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> <a title="View user profile." href="/users/edward" lang="" about="/users/edward" typeof="schema:Person" property="schema:name" datatype="" class="username">Edward</a> <!-- END OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--story.html.twig x field--node--created.html.twig * field--node--story.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden">Fri, 07/27/2012 - 11:47</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--story.html.twig * field--node--body.html.twig * field--node--story.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>It's been a bit longer than I anticipated in obtaining this certification, and I learned or re-learned way more about some networking items I will likely never use again, and/or haven't used in years such as information regard hubs. Reminds me of the 10base5 or 4wireE&amp;M telephone signaling that I studied while in the Air Force and never used while I was there or since.</p> <div>&nbsp;</div> <div>Do they even still make or use hubs? (I know that some companies still have/use them) but why when you can buy a 100Mb workgroup switch for under $15?</div> <div>&nbsp;</div> <div>On to more school work, glad to have that behind me, still have one more Cisco test to take, the&nbsp;Cisco 640-553 IINS exam. But in the meantime, next week I'm going to SANS Institute and taking the GCIH course.</div> </div> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--field-tags--story.html.twig x field--node--field-tags.html.twig * field--node--story.html.twig * field--field-tags.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <div class="field field--name-field-tags field--type-entity-reference field--label-hidden clearfix"> <ul class="links inline field_items"> <li><a href="/category/tags/geek" hreflang="en">Geek</a></li> <li><a href="/category/tags/school" hreflang="en">School</a></li> <li><a href="/category/tags/tech" hreflang="en">Tech</a></li> </ul> </div> <!-- END OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--comment-node-story--story.html.twig * field--node--comment-node-story.html.twig * field--node--story.html.twig * field--comment-node-story.html.twig x field--comment.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <section class="field field--name-comment-node-story field--type-comment field--label-hidden comment-wrapper"> </section> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: x links--node.html.twig x links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> <!-- END OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> Fri, 27 Jul 2012 18:47:06 +0000 Edward 302 at https://new.edwardfrye.com https://new.edwardfrye.com/story/20120727/passed-my-cisco-ccna-my-degree-san-gcih-coming#comments Words with friends - Android https://new.edwardfrye.com/story/20110214/words-friends-android <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--story.html.twig x field--node--title.html.twig * field--node--story.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Words with friends - Android</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--story.html.twig x field--node--uid.html.twig * field--node--story.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> <a title="View user profile." href="/users/edward" lang="" about="/users/edward" typeof="schema:Person" property="schema:name" datatype="" class="username">Edward</a> <!-- END OUTPUT from 'core/themes/classy/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--story.html.twig x field--node--created.html.twig * field--node--story.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden">Mon, 02/14/2011 - 10:54</span> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--story.html.twig * field--node--body.html.twig * field--node--story.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><a class="colorbox colorbox-insert-image" href="http://www.edwardfrye.com/sites/edwardfrye.com/files/field/image/words-with-friends.png" rel="gallery-all"><img alt="" class="image-medium" src="http://www.edwardfrye.com/sites/edwardfrye.com/files/styles/medium/public/field/image/words-with-friends.png" typeof="foaf:Image"></a>I used to have an iPhone, and would play this game with friends and strangers as well as my wife. Back in September, I switched to the Samsung Captivate Android based platform, and this is the only app that I wish was ported when I switched. There was an announcement that the app would be coming to the Android platform.</p> <p>Well, my wait is finally over. I just installed "Words with Friends Free" from the Android market published by <a href="http://newtoyinc.com/wp/">Zynga</a> with friends.</p> <p>If you would like to play a Scrabble type game with me, I believe my username is <strong>KrYPt0</strong>. It's been over 200 days since I played my last game on the iPhone</p> <p class="clearflt ">&nbsp;</p> </div> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--text-with-summary.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--field-tags--story.html.twig x field--node--field-tags.html.twig * field--node--story.html.twig * field--field-tags.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <div class="field field--name-field-tags field--type-entity-reference field--label-hidden clearfix"> <ul class="links inline field_items"> <li><a href="/category/tags/tech" hreflang="en">Tech</a></li> <li><a href="/category/tags/gaming" hreflang="en">Gaming</a></li> <li><a href="/category/tags/general-news" hreflang="en">General News</a></li> <li><a href="/category/tags/news" hreflang="en">News</a></li> </ul> </div> <!-- END OUTPUT from 'themes/danland/templates/field--node--field-tags.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--comment-node-story--story.html.twig * field--node--comment-node-story.html.twig * field--node--story.html.twig * field--comment-node-story.html.twig x field--comment.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <section class="field field--name-comment-node-story field--type-comment field--label-hidden comment-wrapper"> </section> <!-- END OUTPUT from 'core/themes/classy/templates/field/field--comment.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: x links--node.html.twig x links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> <!-- END OUTPUT from 'core/themes/classy/templates/content/links--node.html.twig' --> Mon, 14 Feb 2011 18:54:49 +0000 Edward 182 at https://new.edwardfrye.com https://new.edwardfrye.com/story/20110214/words-friends-android#comments