<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sophie Kaelin</title>
    <description>The latest articles on DEV Community by Sophie Kaelin (@sophiekaelin).</description>
    <link>https://dev.to/sophiekaelin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F660729%2F29e32275-fa4c-4563-b14e-a80d0a5624c6.jpg</url>
      <title>DEV Community: Sophie Kaelin</title>
      <link>https://dev.to/sophiekaelin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sophiekaelin"/>
    <language>en</language>
    <item>
      <title>Queen Bee Syndrome &amp; Me: Navigating internalised misogyny</title>
      <dc:creator>Sophie Kaelin</dc:creator>
      <pubDate>Sat, 22 Mar 2025 05:49:14 +0000</pubDate>
      <link>https://dev.to/sophiekaelin/what-is-queen-bee-syndrome-14gh</link>
      <guid>https://dev.to/sophiekaelin/what-is-queen-bee-syndrome-14gh</guid>
      <description>&lt;h2&gt;
  
  
  A Bit of History
&lt;/h2&gt;

&lt;p&gt;In 2017 I began studying Computer Science at my local university. I was only a few weeks into my studies when I realised that there was a severe gender imbalance in the industry, and that my path throughout a career in STEM would differ greatly to my male counterparts. Little things chipped away at my confidence, like being told I was in the wrong lecture hall, or that I should only work on the documentation element in a group coding project. All these (likely un-conscious) microaggressions made me question whether or not I belonged in the field. When the actions and biases of enough people communicate that you don’t belong somewhere, you begin to believe it too. Despite the casual relationship I developed with imposter syndrome, I remained proud to be a representative of young women in tech, and relished in any opportunity I had to “prove myself”. &lt;/p&gt;

&lt;p&gt;As much as it initially unsettled me, I became accustomed to being one of two or three female students in a classroom. I felt special, and, at times, enjoyed standing out. My naturally competitive spirit motivated me to outperform my peers at university, and I relished in the times I achieved stronger grades than the few misogynistic classmates that made me feel unsafe and unwelcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  “Queen Bee” Guilt
&lt;/h2&gt;

&lt;p&gt;One morning, in my penultimate year of study, my friends and I were searching for a free computer lab when we walked into a class where ~50% of the students were women. My friends and I stood astonished, with one male colleague remarking “wow, it’s so awesome to see so many females taking up IT degrees this semester”. &lt;/p&gt;

&lt;p&gt;It really was great to see, especially after several years of feeling disheartened by classrooms void of any feminine energy. Seeing a room packed with enthusiastic future female engineers should have delighted me. But instead, I felt tense, unnerved and intimidated - closely followed by deep shame for the instinctual reaction. &lt;/p&gt;

&lt;p&gt;For months I kept this close to my chest, to avoid exposing myself as the toxic woman I surely was. Wasn’t this exactly what I had been advocating for? All these years of campaigning to have more women involved in STEM and the moment I see these goals physically manifested, I have a selfish desire to prove myself as the smartest in the room. I’d grown accustomed to being the only woman applying for a scholarship, or attending a class. So deep down I felt threatened and scared that I was no longer special.&lt;/p&gt;

&lt;p&gt;When I confided in my friend, Grace, about this, she explained to me that what I might be feeling is a bit of “Queen Bee Syndrome”. I felt embarrassment but also relief that this reaction didn’t make me a bad person or bad feminist, but was rather a common compulsion felt by women in male dominated industries. After debriefing with Grace, I decided to look more into what Queen Bee Syndrome was.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Queen B Syndrome?
&lt;/h2&gt;

&lt;p&gt;Queen Bee syndrome gets its name after, not surprisingly, bees. There can only be one Queen in a hive, and if there are ever more than one they will fight to the death. A Queen bee will go as far as stinging unborn Queens to eliminate any potential rivals. Thankfully the term “Queen Bee Syndrome” involves far less violence (&lt;em&gt;phew&lt;/em&gt;). It rather refers to someone who acts hostile towards other women in their workplace because of a subconscious fear that they may surpass or outperform them in their role. This type of behaviour occasionally appears in the STEM industry, where there are hardly any women (~28% in 2020 according to &lt;a href="https://www.industry.gov.au/news/second-national-data-report-on-girls-and-women-in-stem#:~:text=The%20proportion%20of%20women%20working,2016%20to%2023%25%20in%202020." rel="noopener noreferrer"&gt;Australian STEM Equity Monitor&lt;/a&gt;), so the likelihood of the few in a company feeling pitted against each other is higher.&lt;/p&gt;

&lt;p&gt;This is something that also happens between female celebrities - think Olivia Rodrigo &amp;amp; Sabrina Carpenter, Kim Cattrall &amp;amp; Sarah Jessica Parker. Rumours of a rift seem to appear before there is any genuine animosity between these stars. Our society loves to pit women against each other, whether for clickbait or for the sake of gossip and drama.&lt;/p&gt;

&lt;p&gt;According to a &lt;a href="https://www.forbes.com/sites/kimelsesser/2020/08/31/queen-bees-still-exist-but-its-not-the-women-we-need-to-fix/?sh=5019ba776ffd" rel="noopener noreferrer"&gt;Forbes article&lt;/a&gt; by Kim Elsesser, it can be a way that some women cope with the gender discrimination they’ve faced in their own career. After working so hard and facing so many barriers to get where they are, women in senior positions could interpret a first year student's enthusiasm and eagerness to learn as someone who has had it easier than them - who hasn’t had to fight for what they had to. Perhaps even jealous that they won’t have to go through the same level of bias and discrimination they did.&lt;/p&gt;

&lt;h2&gt;
  
  
  That just sounds like being competitive. What’s wrong with that?
&lt;/h2&gt;

&lt;p&gt;Healthy competition between two friends isn’t a bad thing. However, an unsolicited competition where two students are pitted against each other solely based on their common gender, is toxic. Feeling motivated to outperform your peers is fine, as long as you aren’t engaging in behaviours that put other people down or inhibit their performance.&lt;/p&gt;

&lt;p&gt;It is important not to feel guilty if these subconscious feelings resonate with you. We work in freezing offices with beer taps in kitchens and lunchtime conversations on hardware engineering and League of Legends. This industry was designed to suit men, and this Queen Bee phenomenon is a &lt;u&gt;consequence&lt;/u&gt; of the discrimination and gender imbalance, not something created by women. The only way to change that is to continue striving for greater gender equity.&lt;/p&gt;

&lt;h2&gt;
  
  
  I think I might be a Queen Bee or I know someone who is. What can I do about it?
&lt;/h2&gt;

&lt;p&gt;Again, I want to make it clear that I am not interested in blaming specific people for this phenomena, &lt;u&gt;especially&lt;/u&gt; not women.&lt;/p&gt;

&lt;p&gt;Women experience enough barriers as it is - things that we have limited control over. And as much as the onus of this issue is not on women, there are some things we can do to reclaim control. By acknowledging and reflecting on any Queen Bee feelings we’ve had, and safely sharing them with other people, we can raise awareness and encourage others to hold a mirror to their own thoughts, feelings and past behaviours. That way, we can reflect and stop these feelings in their tracks before we act on them in the future.&lt;/p&gt;

&lt;p&gt;Questions I like to ask myself in those moments are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the goal of this interaction? What do I want to achieve?&lt;/li&gt;
&lt;li&gt;Are my words and actions helpful or a hindrance?&lt;/li&gt;
&lt;li&gt;If the roles were reversed, how would I want this interaction to go?&lt;/li&gt;
&lt;li&gt;Am I acting in kindness?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I discovered early in my studies is that the community of women in STEM is welcoming and strong. I have felt incredibly supported by various mentors and leaders from the beginning. We need to continue looking out for each other and offering assistance and knowledge where we can.&lt;/p&gt;

&lt;p&gt;When we feel threatened it is important to acknowledge that feeling, recognise its source and move past it to ensure we aren’t hurting people or modeling Queen Bee behaviour for others. These feelings don’t make us bad people, or bad feminists. It is the consequences of the environment we are in - an environment that will only change if we are vulnerable, honest and refuse to be divided.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.forbes.com/sites/kimelsesser/2020/08/31/queen-bees-still-exist-but-its-not-the-women-we-need-to-fix/?sh=232d32216ffd" rel="noopener noreferrer"&gt;https://www.forbes.com/sites/kimelsesser/2020/08/31/queen-bees-still-exist-but-its-not-the-women-we-need-to-fix/?sh=232d32216ffd&lt;/a&gt;&lt;/p&gt;

</description>
      <category>diversity</category>
      <category>inclusion</category>
      <category>womenintech</category>
      <category>wecoded</category>
    </item>
    <item>
      <title>12 Healthy Mindsets to Embrace When Starting your First Job</title>
      <dc:creator>Sophie Kaelin</dc:creator>
      <pubDate>Wed, 12 Jan 2022 06:45:46 +0000</pubDate>
      <link>https://dev.to/sophiekaelin/12-mindsets-to-adopt-when-starting-your-graduate-job-3pd3</link>
      <guid>https://dev.to/sophiekaelin/12-mindsets-to-adopt-when-starting-your-graduate-job-3pd3</guid>
      <description>&lt;p&gt;Starting your first full time role can be super daunting, and it's not uncommon for graduates to be riddled with imposter syndrome. I started my first full time graduate role in February 2021 as a penetration tester - something I knew very little about (aside from one subject I did at university). Throughout 2021 I received a lot of advice on coping with a full time workload, and how to get the most out of the experience. I also discovered which of my habits, behaviours and mindsets inhibited my progress, and which nurtured it. With all that in mind, I have collated a list of 12 healthy and helpful mindsets that I adopted throughout my first year of work, which made my experience a whole lot more fulfilling and less intimidating. &lt;/p&gt;

&lt;h2&gt;
  
  
  1. No one expects you to know everything
&lt;/h2&gt;

&lt;p&gt;And if they do, they are being unrealistic. This is a &lt;strong&gt;GRADUATE&lt;/strong&gt; role, not a senior role. Don't compare yourself to mid-levels, juniors or seniors - this is unhealthy and unrealistic.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Asking for help doesn't make you look unintelligent
&lt;/h2&gt;

&lt;p&gt;In fact, asking the right type of questions shows that you're engaged with the task and are making progress. It's better to spend 1 minute asking the "silly"  question, rather than spending 30 minutes trying to work it out on your own and getting no where. Most people won't hesitate to take the time to explain concepts to you. You aren't being a burden.&lt;/p&gt;

&lt;p&gt;There are a few caveats to this: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Don't ask questions just to fill the space or so you can "tick a box" that you've spoken in a meeting. That is a waste of everyones time and doesn't achieve what you think. And &lt;/li&gt;
&lt;li&gt;Don't ask questions without doing at least some research first. Make sure you have some understanding of the problem you're facing and search if there are any resources online to help. Only then should you approach a co-worker with your understanding of what's going on, what you've tried so far, and what you've found confusing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4sh57mn9stk7yvmiejn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4sh57mn9stk7yvmiejn.gif" alt="Image description" width="480" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Be honest about your abilities
&lt;/h2&gt;

&lt;p&gt;This was one of the best pieces of advice I've received. As much as you want to impress your new team and perform really well, if you aren't able to meet the fanciful expectations that you set for yourself, you will fall short and rarely succeed. It's so important to be transparent so that people can hold you to a realistic standard and understand how they can best help and support you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyufgcjujm0xcqhh7z7pm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyufgcjujm0xcqhh7z7pm.gif" alt="Image description" width="480" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Say Yes (in moderation)!
&lt;/h2&gt;

&lt;p&gt;When people ask me how I got to where I am today, I tell them "I just participated in everything". Open yourself up to new experiences and engage with your team. I had the opportunity to interview people, be interviewed by magazines and speak at events because I said "yes". The more you say yes to, the broader your network becomes and people will come to you with even more opportunities in the future.&lt;/p&gt;

&lt;p&gt;Another caveat here (and I'm about to seriously contradict myself). Don't say yes to &lt;em&gt;e-verything&lt;/em&gt;. As much as I'm glad I've been a "yes girl" throughout my life and am grateful for all the opportunities it has afforded me, it has ended up in burn out. It's important to prioritise, and say yes to the things that will fill your cup, and only if you have the capacity to do your best work. Everyone has their limit of what they can do or can handle. Yours wont be the same as everyone else - particularly not as a graduate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvtiaytyhqu6ghlqqjgv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvtiaytyhqu6ghlqqjgv.gif" alt="Image description" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Be transparent about your work load
&lt;/h2&gt;

&lt;p&gt;One phrase I like to use a lot when being delegated a "high priority task" is "Okay, so I have TASK A and TASK B which I also need to complete today, alongside TASK C you've just given me. Which should I do first? Which is more important". That way, people are aware of your workload and can have realistic expectations of when a task will be complete, or if giving you TASK C will actually overwork you. It also puts the onus on them if you are pulled in a million directions to complete various tasks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvgkav2wt8e1ce3kl01zo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvgkav2wt8e1ce3kl01zo.gif" alt="Image description" width="253" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Work can just be work
&lt;/h2&gt;

&lt;p&gt;When you see a lot of super passionate people in the industry, it can make you feel like you've failed or that you're in the wrong job if your level of interest doesn't match others. But your job can just be a job. It doesn't have to be your one and only passion or a defining quality of who you are. Of course, it's important to have some level of interest in your field, particularly tech where a lot of research is required to stay caught up with the current landscape. But you aren't any worse of an employee if you spend your weekends off your computer in comparison to the employee that works all weekend on personal tech projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. You also don't have to be the best at what you love
&lt;/h2&gt;

&lt;p&gt;As mentioned before, you do need to be somewhat competent, but you don't have to be a genius, or programming prodigy who created their own compiler at age ten. It takes all types of minds to create an excellent and accessible product. This goes for any hobby or activity you enjoy - you can love to bake and everything you make be borderline inedible. Passion is indispensable and more critical than competency - because passion is what drives you to be better and enables you to grow.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. You don't have to put up with bad behaviour just because you're new
&lt;/h2&gt;

&lt;p&gt;Whether that's seniors being condescending, blatant disrespect, or a comment that made you feel uncomfortable - call it out! This can be pretty daunting, especially as one of the newer people in your team. I've had to do this a small number of times, and each time I was met with gratitude and respect. Most people want to do the right thing, and be an inclusive team member, and will take on any feedback positively - particularly when they didn't realise their behaviour was making you feel uncomfortable. Either send them a carefully worded email, or speak in confidence with a manager or buddy about what they think you should do.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdy0hm70no61dfr8ra3l.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdy0hm70no61dfr8ra3l.gif" alt="Image description" width="480" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Every person in your team has once been in your position
&lt;/h2&gt;

&lt;p&gt;Everyone knew nothing at one point. They all had to learn, just as you will.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Slow down - there is no rush
&lt;/h2&gt;

&lt;p&gt;You can stay in the same level role for six months or ten years - it doesn't matter. Go at the pace that best serves you. Enjoy where you're at now, because there are a lot of perks of being a junior (&lt;em&gt;cough&lt;/em&gt; upward delegation &lt;em&gt;cough&lt;/em&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Everyone is on a different journey / timeline
&lt;/h2&gt;

&lt;p&gt;I started my graduate role with two other graduates, who both already knew a LOT more than I did. I reinforced in myself very early that there is no use comparing my knowledge and progress with theirs because we were coming from different foundations. You may start at the same place and level as someone else, and maybe they will progress faster than you did. That's okay! Everyone learns at different speeds and in different ways. However long it takes, is however long it takes, and it doesn't make you the wrong person for the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Everyone feels like an imposter
&lt;/h2&gt;

&lt;p&gt;You aren't the only person sitting at their desk thinking, "oh my gosh, I know nothing. I don't know how I got this job". Nobody can know absolutely everything about their job - that's what makes tech jobs so exciting!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfeqlgrvxmthva6jao9y.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfeqlgrvxmthva6jao9y.gif" alt="Image description" width="480" height="268"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Best of luck to you in your new graduate roles. Let me know of any helpful and healthy mindsets you've adopted.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>wellbeing</category>
      <category>graduate</category>
      <category>advice</category>
    </item>
    <item>
      <title>Hack the Box - Explore Walkthrough</title>
      <dc:creator>Sophie Kaelin</dc:creator>
      <pubDate>Thu, 16 Sep 2021 03:13:35 +0000</pubDate>
      <link>https://dev.to/sophiekaelin/hack-the-box-explore-walkthrough-29g3</link>
      <guid>https://dev.to/sophiekaelin/hack-the-box-explore-walkthrough-29g3</guid>
      <description>&lt;h1&gt;
  
  
  Hack The Box - Explore
&lt;/h1&gt;

&lt;p&gt;This is the second box I've system-owned on HTB. &lt;a href="https://hackthebox.eu/home/machines/profile/356" rel="noopener noreferrer"&gt;Explore&lt;/a&gt; was a fun machine to play with which taught me a lot about the importance of perseverance. I completed this box alongside a few other work colleagues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OS: Android&lt;/li&gt;
&lt;li&gt;Difficulty: 3.6/10&lt;/li&gt;
&lt;li&gt;Release: 17/08/2021&lt;/li&gt;
&lt;li&gt;IP: 10.10.10.247&lt;/li&gt;
&lt;li&gt;Box Author: &lt;a href="https://www.hackthebox.eu/home/users/profile/27897" rel="noopener noreferrer"&gt;bertolis&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Knowledge/Skill Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;SSH Port Forwarding&lt;/li&gt;
&lt;li&gt;Android OS + associated tools (ADB, ES File Explorer)&lt;/li&gt;
&lt;li&gt;I used my Kali Linux VM to complete this.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Enumeration
&lt;/h2&gt;

&lt;p&gt;As always, I started off by looking at which services were running by executing an &lt;code&gt;nmap&lt;/code&gt; scan.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2jw0cescgenoe18l8rv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2jw0cescgenoe18l8rv.png" alt="Alt Text" width="638" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Seeing that the four ports running were (&lt;code&gt;2222, 5555, 41567, 59777&lt;/code&gt;) I decided to do some research on common uses of those ports on android operating systems. Information I found included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2222&lt;/strong&gt;: SimpleSSH&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5555&lt;/strong&gt;: Android Debug Bridge (ADB)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;59777&lt;/strong&gt;: ES File Explorer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I never worked out what &lt;strong&gt;41567&lt;/strong&gt; was doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analysis
&lt;/h2&gt;

&lt;p&gt;The two services I wanted to look at in more detail were ADB and ES File Explorer. I'd never played with Android devices before, so I looked a little more into what each of the services did. I also searched if there were any known vulnerabilities/CVE's associated with them. And ... ✨&lt;strong&gt;&lt;em&gt;VOILA&lt;/em&gt;&lt;/strong&gt;✨&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgq3j82sk9br4uz8ud2we.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgq3j82sk9br4uz8ud2we.png" alt="Alt Text" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ES File explorer had a CVE associated with it (&lt;a href="https://www.cvedetails.com/cve/CVE-2019-6447" rel="noopener noreferrer"&gt;CVE-2019-6447&lt;/a&gt;). The exploit allows remote users to read arbitrary files from anywhere on the network over port &lt;strong&gt;59777&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Digging around more, I found an &lt;a href="https://www.exploit-db.com/exploits/50070" rel="noopener noreferrer"&gt;exploit script&lt;/a&gt; on exploit-db. I played around with the script and saw it can list and retrieve files from the system. Eventually I found a file called &lt;code&gt;creds.jpg&lt;/code&gt; which looked promising.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fccgv9x2rkzuv7snux00e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fccgv9x2rkzuv7snux00e.png" alt="Alt Text" width="637" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I could retrieve the file by running:&lt;br&gt;&lt;br&gt;
&lt;code&gt;python3 exploit-script.py getFile 10.10.10.247 /storage/emulated/0/DCIM/creds.jpg&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The file contained what looked like a username and password (&lt;em&gt;GASP!&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrcv2ujvbn7f1ez3ckvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrcv2ujvbn7f1ez3ckvx.png" alt="Alt Text" width="624" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kristi:Kr1sT!5h@Rp3xPl0r3!&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As a HTB noob, I thought I'd found the user flag here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FvwI4mYEHP8k0w%2Fgiphy.gif%3Fcid%3Decf05e473tcdpv81e5b9hu9qchea7o2t8fnn50jjbsblau4s%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FvwI4mYEHP8k0w%2Fgiphy.gif%3Fcid%3Decf05e473tcdpv81e5b9hu9qchea7o2t8fnn50jjbsblau4s%26rid%3Dgiphy.gif%26ct%3Dg" width="176" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But when entering the password didn't work I looked at how else I could use these credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  Privilege Escalation
&lt;/h2&gt;

&lt;p&gt;Remembering that an SSH port was open on 2222, I tried using these creds to SSH onto the machine. And after many failed attempts at guessing whether the password contains O's or 0's, and l's, 1's or I's, I could access the device!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl8vl7zqnd55na5oh1u1j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl8vl7zqnd55na5oh1u1j.png" alt="Alt Text" width="307" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once I'd fought with &lt;code&gt;find&lt;/code&gt; and &lt;code&gt;grep&lt;/code&gt; (both of which I can never seem to get to work properly) I could see the flag inside &lt;code&gt;sdcard/user.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwebysauofcul9wv0x0gf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwebysauofcul9wv0x0gf.png" alt="Alt Text" width="268" height="34"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FizOQECJfXMxgc%2Fgiphy.gif%3Fcid%3Decf05e47nm39w13yhgp9ygockdu6f49bx0m0jawollocp7op%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FizOQECJfXMxgc%2Fgiphy.gif%3Fcid%3Decf05e47nm39w13yhgp9ygockdu6f49bx0m0jawollocp7op%26rid%3Dgiphy.gif%26ct%3Dg" width="412" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Full Control
&lt;/h2&gt;

&lt;p&gt;At this point I had access to the device through SSH, and I knew I had an ADB service running on port 5555. In order to run ADB on the device, I had to set up SSH port forwarding so that I could run ADB commands on the device.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh kristi@10.10.10.247 -p 2222 -L 5555:localhost:5555&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once port forwarding was set up, I was able to run &lt;a href="https://developer.android.com/studio/command-line/adb" rel="noopener noreferrer"&gt;ADB commands&lt;/a&gt; on the device, gain a shell, escalate that shell to root and search for the root.txt file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;adb connect 127.0.0.1:5555&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxg3xlq5on3ovceu384b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxg3xlq5on3ovceu384b.png" alt="Alt Text" width="490" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FTOWeGr70V2R1K%2Fgiphy.gif%3Fcid%3Decf05e471pv9a07g3dv65iio0was4dznxicvbdr2633q8e3n%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FTOWeGr70V2R1K%2Fgiphy.gif%3Fcid%3Decf05e471pv9a07g3dv65iio0was4dznxicvbdr2633q8e3n%26rid%3Dgiphy.gif%26ct%3Dg" width="400" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that's all ! Thanks for reading.&lt;/p&gt;

</description>
      <category>hackthebox</category>
      <category>cybersecurity</category>
      <category>hacking</category>
      <category>ctf</category>
    </item>
    <item>
      <title>What is the difference between CORS and CSP?</title>
      <dc:creator>Sophie Kaelin</dc:creator>
      <pubDate>Mon, 06 Sep 2021 11:14:07 +0000</pubDate>
      <link>https://dev.to/sophiekaelin/what-is-the-difference-between-cors-and-csp-i7n</link>
      <guid>https://dev.to/sophiekaelin/what-is-the-difference-between-cors-and-csp-i7n</guid>
      <description>&lt;p&gt;I often get both of these concepts confused, and apparently so do a lot of other people. It's a pretty important concept to be understood by web developers and security engineers, so hopefully this clears things up.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, an introduction
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cross Origin Resource Sharing (CORS)&lt;/strong&gt; and &lt;strong&gt;Content Security Policy (CSP)&lt;/strong&gt; are used by web applications to control what data can be loaded on a page, and what data other pages can load from it (see, it's already gotten confusing). It is vital to have CORS and CSP configured correctly from a security perspective, because it would otherwise be difficult to trust the integrity of a web page (if any scripts can be loaded) but also the confidentiality of your own data on a web page if it can be loaded by anyone.&lt;/p&gt;

&lt;p&gt;When learning about CORS and CSP, it's important to understand what's going on from both perspectives (requestor and requestee), because as a host you will be playing both positions. To drive this message home, I'll be referring to &lt;strong&gt;YOUR&lt;/strong&gt; website which is ✨&lt;em&gt;Super Secure Sally&lt;/em&gt;✨, and &lt;strong&gt;MY&lt;/strong&gt; website which is 🤡&lt;em&gt;Really Risky Ricky&lt;/em&gt;🤡.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qwskv7ehdxawtqn7be4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qwskv7ehdxawtqn7be4.png" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Firstly, what is CORS?
&lt;/h2&gt;

&lt;p&gt;To quote &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" rel="noopener noreferrer"&gt;MDN Web Docs&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Cross-Origin Resource Sharing (CORS) is a HTTP-header based mechanism that allows a server to indicate any origins other than its own from which a browser should permit loading of resources."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can view what CORS policies are set on a particular host/page by viewing the response headers. The main header we are concerned with is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Access-Control-Allow-Origin&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This response header dictates which domains are allowed to receive the requested data.&lt;br&gt;&lt;br&gt;
Before making a request from another origin, it's common to make a preflight OPTIONS request to determine whether the request will be successful. In that case, the requestor will provide the request headers:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Origin&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;Access-Control-Request-Method&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;Access-Control-Request-Headers&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This requestee will then send a response as to which origins, methods and headers are allowed when requesting the resource:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Access-Control-Allow-Methods&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;Access-Control-Allow-Headers&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let's explore this using examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sally wants to load a resource from Ricky
&lt;/h3&gt;

&lt;p&gt;Sally (you) wish to load a resource on Ricky's domain. Luckily, Ricky has very relaxed CORS settings and will allow anyone to request resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9n1ahininms2qm2x7wlf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9n1ahininms2qm2x7wlf.png" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ricky's &lt;code&gt;Access-Control-Allow-Origin&lt;/code&gt; header contains a wildcard value &lt;code&gt;*&lt;/code&gt; which means anyone can load this resource from his website. This is a super dangerous setting to have, especially if the data is sensitive and confidential.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ricky wants to load a resource from Sally
&lt;/h3&gt;

&lt;p&gt;Ricky wants to now load a resource from Sally. Sally's data is extremely confidential and the most secure CORS settings have been configured to ensure only she can make requests for that data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1vnpf97x5qzvhhxgam5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1vnpf97x5qzvhhxgam5.png" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Something in between
&lt;/h3&gt;

&lt;p&gt;Say if Sally changed her mind and she wanted Ricky to be able to successfully request data from Sally. In that case Sally's response header should say:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Access-Control-Allow-Origin: http://ricky.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5r11w0ykqorl4vq7ad9c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5r11w0ykqorl4vq7ad9c.png" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  In Summary
&lt;/h3&gt;

&lt;p&gt;When it comes to CORS, you want to be conscious of what resources you can load, and what resources other people can load from you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next, lets chat about CSP
&lt;/h2&gt;

&lt;p&gt;The goal of CSP is to protect against Cross-Site Scripting (XSS) attacks by dictating which scripts should be trusted and which shouldn't. When a browser tries to run a script from an unknown source, CSP will block it unless it is on the list of trusted sources. If no CSP is provided, then a site will default to using the "Same-Origin Policy" (SOP).&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Content-Security-Policy&lt;/code&gt; response header contains rules for that request. The CSP can restrict things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;default-src&lt;/code&gt;: the fallback for all resources being loaded if no other rule is set.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;script-src&lt;/code&gt;: restricts which inline scripts can be run.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;style-src&lt;/code&gt;: restricts inline styles from being applied.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;media-src&lt;/code&gt;: restricts audio and media files from being loaded.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;img-src&lt;/code&gt;: restricts which images can be loaded.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are plenty of other options to use. You can see them on this &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#fetch_directives" rel="noopener noreferrer"&gt;Mozilla Developer Page.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, I'm going to introduce a new site 😈 &lt;em&gt;Evil Eddie&lt;/em&gt; 😈.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwixqy4rrogpbvzioa0v0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwixqy4rrogpbvzioa0v0.png" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For each of our scenarios, Eddie is going to intercept a request/response to Sally and Ricky's website and try and inject an evil script off his website onto Sally/Ricky's webpages so that it executes the malicious script.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajp0stgmailfe47cvfbc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajp0stgmailfe47cvfbc.png" width="800" height="609"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2rk9nfrfge37i2k3g322.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2rk9nfrfge37i2k3g322.png" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Evil Eddie attacks Super Secure Sally
&lt;/h3&gt;

&lt;p&gt;Sally's CSP header looks like this:&lt;br&gt;&lt;br&gt;
&lt;code&gt;Content-Security-Policy: default-src 'self' charlies-cookies.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When Eddie tries to attack Sally's website, his script is not loaded because it is blocked by Sally's CSP which says only scripts from her website and her friend Charlie's website will be loaded.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00slaswxiqo1vg48lhyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00slaswxiqo1vg48lhyq.png" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Evil Eddie attacks Really Risky Ricky
&lt;/h3&gt;

&lt;p&gt;Ricky's CSP header looks like this:&lt;br&gt;&lt;br&gt;
&lt;code&gt;Content-Security-Policy: default-src 'self'; script-src *; img-src *.ricky.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Eddies attack is successful on Ricky's page, because Ricky has used the wildcard &lt;code&gt;*&lt;/code&gt; character which allows scripts to be loaded from all origins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xl2ex5imqdd2atxabvs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xl2ex5imqdd2atxabvs.png" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  In Summary
&lt;/h3&gt;

&lt;p&gt;Be careful with listing which sites your website can load resources from and only update your allow-list if it's really REALLY necessary. It's also super important to chose resources from secure sites that wouldn't be susceptible to XSS attacks themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Okay... but after all of this, CSP and CORS still sounds almost the same?
&lt;/h2&gt;

&lt;p&gt;Yeah look.. they can be confusing concepts to distinguish because there seems to be a lot of overlap. The way I look at it (in order to help separate the two in my brain) is to consider "what do you have control over". As a host, there are three (general) scenarios:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You want to request a resource from another site ~ What CORS policies do &lt;strong&gt;they&lt;/strong&gt; have in place?&lt;/li&gt;
&lt;li&gt;Another site wants to request a resource from your site ~ what CORS policies do &lt;strong&gt;you&lt;/strong&gt; have in place?&lt;/li&gt;
&lt;li&gt;You want to load a resource (script, image, whatever) from another site ~ does &lt;strong&gt;your&lt;/strong&gt; Content Security Policy allow you to load resources from that domain?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Have you got any handy ways of remembering the difference between CSP and CORS? I'd love to hear them.&lt;/p&gt;

</description>
      <category>cors</category>
      <category>csp</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>Why is learning to code so hard?</title>
      <dc:creator>Sophie Kaelin</dc:creator>
      <pubDate>Sat, 10 Jul 2021 06:30:46 +0000</pubDate>
      <link>https://dev.to/sophiekaelin/why-is-learning-to-code-so-hard-2921</link>
      <guid>https://dev.to/sophiekaelin/why-is-learning-to-code-so-hard-2921</guid>
      <description>&lt;p&gt;A comment I’ve heard from many people is :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I’ve tried to learn coding so many times, but it never seems to click.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Is this something you’ve said in the past? Don’t worry, you are definitely not alone. Having taught multiple introductory programming classes before, I’ve noticed this is a sentiment shared by a lot of newly starting developers.&lt;/p&gt;

&lt;p&gt;Learning to code is hard. And while it is true that some people find it easier to learn programming in comparison to others (whether due to higher levels of interest or an aptitude for logical/mathematical reasoning), the way someone goes about teaching themselves to code will impact the likelihood of them developing and retaining those skills.&lt;/p&gt;

&lt;p&gt;It is very tempting, as it is when learning all new skills, to jump straight into creating the cool things. Like crocheting a jumper, or baking a twelve story croquembouche. It is important to differentiate between your end goal (what you want to build), and what you need to know/learn in order to meet that goal.&lt;/p&gt;

&lt;p&gt;Along with that, there are various skills you should develop that will aid you in tackling any blockers or errors you may face when completing a project.&lt;/p&gt;

&lt;p&gt;In this article I will be discussing my top tips I’ve shared with hundreds of past students that helped them grow in confidence and ability, as well as the tips previous mentors have shared with me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is it so different to learning other skills?
&lt;/h2&gt;

&lt;p&gt;Learning to code is often likened to learning a language or an instrument. So methods such as spaced repetition are regularly recommended to learn new programming languages, just as you would with learning any language. As much as this is a helpful way of learning, it is important to acknowledge the differences between learning a programming language and human language. The main difference being:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is no margin for error when writing code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s say, for example, you are learning to speak French. You practice your French by making conversation with a fluent French speaker. If you were to mispronounce a word, or jumble up the order of words in a sentence, it is likely the other person will still understand what you were trying to say and a conversation will continue. Unfortunately, a computer does not have that sense of intuition. There is no “close enough” in programming — only right or wrong. That’s what makes it so difficult.&lt;/p&gt;

&lt;p&gt;If you were to ask any person with coding experience, I’m certain they would be able to recall multiple times they were stuck on a silly bug for hours if not days because of a spelling mistake or syntax error. And if they can’t… well they’re lying ! I’ve personally felt the embarrassment of being stuck with broken code for hours, only to realise I wrote “docmuent” instead of “document”, or raged when I couldn’t connect to my server only to realise it was running on port 8888 instead of 888. A human can understand what was meant to be said, but a compiler does not have that ability.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmr9yh1ln6pfumwhc9pbl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmr9yh1ln6pfumwhc9pbl.gif" alt="Facepalm" width="400" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The unforgiving nature of code is what makes it such a difficult thing to learn. It is also the reason why it is vital to develop a handful of important skills that both limit mistakes made, and enable you to solve and debug errors in order to move forward from those mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What skills should I learn?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1581464647110-26e129ce2d02%3Fixid%3DMnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8%26ixlib%3Drb-1.2.1%26auto%3Dformat%26fit%3Dcrop%26w%3D1350%26q%3D80" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1581464647110-26e129ce2d02%3Fixid%3DMnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8%26ixlib%3Drb-1.2.1%26auto%3Dformat%26fit%3Dcrop%26w%3D1350%26q%3D80" alt="Computer" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are trying to learn to code, it is important to first learn the following four things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Core programming concepts&lt;/li&gt;
&lt;li&gt;Problem solving strategies&lt;/li&gt;
&lt;li&gt;How to debug your code and&lt;/li&gt;
&lt;li&gt;Core features of your chosen language&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Core Programming Concepts
&lt;/h3&gt;

&lt;p&gt;It is one thing to copy out an answer you saw on &lt;a href="https://stackoverflow.com/" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;. It is another to understand what you are writing and what it is accomplishing. It is near impossible to learn how to code without first understanding fundamental components that code is made of. Good things to research first are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variables &amp;amp; Primitive Data Types&lt;/li&gt;
&lt;li&gt;Compound Data Types (Strings, Arrays, Lists, HashMaps)&lt;/li&gt;
&lt;li&gt;Memory Allocation&lt;/li&gt;
&lt;li&gt;Loops&lt;/li&gt;
&lt;li&gt;Boolean Logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are various online courses available to teach you these concepts, as well as countless Youtube videos. For the most part, these are transferable skills across different languages.&lt;/p&gt;

&lt;p&gt;Videos by &lt;strong&gt;&lt;a href="https://thecodingtrain.com/beginners/" rel="noopener noreferrer"&gt;“The Coding Train”&lt;/a&gt;&lt;/strong&gt; are what I watched when I first started learning. Another great resource is &lt;strong&gt;&lt;a href="https://www.codecademy.com/" rel="noopener noreferrer"&gt;“Code Academy”&lt;/a&gt;&lt;/strong&gt; if you are looking to challenge yourself and receive feedback.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem Solving Strategies
&lt;/h3&gt;

&lt;p&gt;Once you’ve got the core concepts down, you should spend some time practicing completing functions to expose yourself to different scenarios and generate your own strategies for how to overcome them.&lt;/p&gt;

&lt;p&gt;Expose yourself to popular &lt;a href="https://www.geeksforgeeks.org/searching-algorithms/" rel="noopener noreferrer"&gt;searching&lt;/a&gt; or &lt;a href="https://www.geeksforgeeks.org/sorting-algorithms/" rel="noopener noreferrer"&gt;sorting&lt;/a&gt; algorithms. Practicing implementing well known algorithms will assist you in developing a better understanding of computer science concepts. Plus, the more practice you get, the better you become at problem solving. This may take a bit of time to improve at, but it can also be very fun.&lt;/p&gt;

&lt;p&gt;Here are some fun resources to practice with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.crackingthecodinginterview.com/" rel="noopener noreferrer"&gt;Cracking the Coding Interview&lt;/a&gt;: unpacks common questions given in coding interviews.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://codingbat.com/java" rel="noopener noreferrer"&gt;Coding Bat&lt;/a&gt;: I used this all the time when I got started. Getting a gold star next to completed problems also feels super rewarding.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/" rel="noopener noreferrer"&gt;Leet Code&lt;/a&gt;: Another great tool for practicing interview questions.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.geeksforgeeks.org/" rel="noopener noreferrer"&gt;Geeks 4 Geeks&lt;/a&gt;: Fantastic write-ups unpacking popular algorithms and core programming concepts. Great for refreshers on topics you may not have visited in a while.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffeboj2c8xjro8td2wbvk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffeboj2c8xjro8td2wbvk.gif" alt="Gold Star" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to debug your code
&lt;/h3&gt;

&lt;p&gt;When your code breaks it is important to ask yourself: do I understand what I’ve written? Is this broken because I lack understanding on the topic?&lt;/p&gt;

&lt;p&gt;Odds are, you will encounter many MANY errors throughout your journey. Experienced programmers still come across various bugs and challenges they need to unpack every day. The difference between experienced and unexperienced developers is that the former have effective strategies on how to debug and unpack issues in their code.&lt;/p&gt;

&lt;p&gt;The best way to debug your code (especially as a beginner) is to print variables to your console or using debug tools built into the IDE you’re working in. You will gain a better understanding of your code by stepping through it line by line to find the source of your issue. Tracing things in your head can also get super tricky and complex. Try creating memory diagrams and tracing your variables on a piece of paper as you step through code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfrkevlanodtus4gwesp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfrkevlanodtus4gwesp.gif" alt="Hangover" width="480" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The more experience you have encountering problems, the better equipped you’ll be with dealing with them in the future. Don’t feel disheartened if you are making a lot of mistakes initially — we all make mistakes, and the learning curve is different for everyone. Take each mistake as a learning opportunity — you’ll be surprised how quickly concepts will come to you later when faced with similar problems&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=NTaNksV-DPY" rel="noopener noreferrer"&gt;Mike from Code Academy highlights some great debugging strategies to practice when getting started.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Features of your Language
&lt;/h3&gt;

&lt;p&gt;Do a bit of research on the language you want to learn. This isn’t exactly a step, but more something you should be doing and learning by default when learning concepts and practicing problem solving. No doubt you will come across various errors and bugs you cannot explain. By researching syntactical standards of the language of your choice you will be able to identify these mistakes earlier. Maybe try and organise a time to chat with someone who has experience with that language and ask for their tips.&lt;/p&gt;

&lt;p&gt;Another thing to consider is what type of things you are wanting to build. This will impact which language will be the most appropriate to learn. If you are planning to build iOS apps, Swift would be a worthwhile language to consider learning. If you were hoping to build websites, Javascript would be more appropriate. Do your research and ask for advice. There are so many languages and tools out there, it is important to try and find the one with the most appropriate features and functionality to suit your goal product.&lt;/p&gt;

&lt;h1&gt;
  
  
  * * *
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Extra Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Get yourself a mentor. There is nothing better than having a person to explain your problems to without fear of feeling stupid. Their support will be invaluable throughout your journey.&lt;/li&gt;
&lt;li&gt;There is no indignity in asking for help. I know I keep repeating myself, but mistakes are part of the learning process. It does not make you dumb, it makes you efficient and resourceful.&lt;/li&gt;
&lt;li&gt;Get yourself some buddies. Learning to code is much easier when you are doing it with a group of people.&lt;/li&gt;
&lt;li&gt;Teach someone else. Teaching is one of the best ways of learning, so once you feel comfortable with topics, have a go at teaching someone else what you’ve learnt.&lt;/li&gt;
&lt;li&gt;Start good habits early. Things like naming your variables and functions meaningful things, leaving code comments and using version control. Future you will thank you.&lt;/li&gt;
&lt;li&gt;Take notes. There are resources all over the place, try and collate some notes just for yourself to reference.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://mattr.net.au/meta/google.html" rel="noopener noreferrer"&gt;Google is not always your friend&lt;/a&gt;. Knowing how and what to search is something that comes with experience. Instead of searching for a solution, search for things to help you better understand your problem so that you can come to your own informed solution.&lt;/li&gt;
&lt;li&gt;Buy a rubber duck. I’m serious. Tell it all your problems, and in explaining your problem you might answer your own question.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fllrt0u97n6p8pjsc6kne.gif" alt="Talk in mirror" width="480" height="368"&gt;
&lt;/li&gt;
&lt;li&gt;This is a bit of a stretch goal, but look into testing. It is important to trial how your code responds to a variety of different edge cases to ensure it works the way you think it does.&lt;/li&gt;
&lt;li&gt;Lastly, and most importantly, don’t expect to know everything straight away! Imposter syndrome is so so common in the computing and engineering community. &lt;a href="https://medium.com/@grace.m.nolan/imposter-syndrome-and-flow-f1628be8ebb4" rel="noopener noreferrer"&gt;My friend Grace wrote an amazing piece on Imposter Syndrome I’d recommend reading.&lt;/a&gt; It is easy to compare yourself to someone who seems to know everything. But try and remind yourself that everyone started somewhere and everyone has been in the position you’re in now. Its a sucky feeling, but if you persist with it and invest the hours, you can be just as knowledgable as your friend with the insanely busy Github profile.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The best and worst thing about programming is that the learning never stops, and technology continues to evolve and change. Be patient with yourself, set up a study plan, and practice, practice, practice!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flmj9jqpxrd5uennbzjsx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flmj9jqpxrd5uennbzjsx.gif" alt="penguin" width="350" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>codenewbie</category>
      <category>education</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
