DEF CON 31: A hot time in the Las Vegas heat and some cool days in AppSec Village
Tags: security, defcon, hacking, appsec
Published: 2023-09-05 23:54:29

Describing [DEF CON](https://defcon.org/?ref=blog.gitguardian.com) is akin to the ancient tale of a group of [blind elders describing an elephant](https://en.wikipedia.org/wiki/Blind_men_and_an_elephant?ref=blog.gitguardian.com). One felt the trunk and said it was like a snake, one felt a leg and said it was like a tree trunk, and one felt the head and said it was like a wall. Everyone who traveled to Las Vegas in the summer heat to experience DEF CON 31 will have their own experiences and describe the event in a unique way.

What follows is just a small sliver of what the GitGuardian team experienced at this legendary event.

[![A DEF CON 31 badge](https://lh6.googleusercontent.com/aO8wrZjdn7Ip9CvDLosv9GnsoX96ztJfycN0nRUhUQG4YsqprDN1bLY_n8lFeYXy8734XVsRcD6gsjAew-vXteSB-JbY5hcwVO_tl3anLMOMOlA8SmYtZhce7l2RWZfXnFj0IwRjOlF9evHM6W4N4A)](https://lh6.googleusercontent.com/aO8wrZjdn7Ip9CvDLosv9GnsoX96ztJfycN0nRUhUQG4YsqprDN1bLY_n8lFeYXy8734XVsRcD6gsjAew-vXteSB-JbY5hcwVO_tl3anLMOMOlA8SmYtZhce7l2RWZfXnFj0IwRjOlF9evHM6W4N4A)

AppSec Village
--------------

DEF CON is comprised of multiple workshops, talks, capture-the-flag, CTF, competitions, and villages. Villages are dedicated, independently run spaces organized around a specific topic, such as lockpicking, red teaming, blue teaming, cloud technology, biohacking, and application security, AppSec. GitGuardian is proud to have been part of [AppSec Village](https://www.appsecvillage.com/events/dc-2023?ref=blog.gitguardian.com) this year, which drew almost 9,000 attendees over three days.

[![](https://lh3.googleusercontent.com/-VcHmIMu4g_worCel6CbWrmGAo7_uvILlBsjGtgO_YOo8yXMJ9DQ74q8A5DdpgyrmsFlBN0ORx-t7eWc5NOtz7BSDY-7SqbDQDu364C-g9YRki3SetejPcXeMVtTXCxnWlfiQ8-M8hY8Tf1s89zviQ)](https://lh3.googleusercontent.com/-VcHmIMu4g_worCel6CbWrmGAo7_uvILlBsjGtgO_YOo8yXMJ9DQ74q8A5DdpgyrmsFlBN0ORx-t7eWc5NOtz7BSDY-7SqbDQDu364C-g9YRki3SetejPcXeMVtTXCxnWlfiQ8-M8hY8Tf1s89zviQ)

back side of the AppSec Village at DEF CON 31 official tee shirt with the sponsors listed

### Hunt the Hacker CTF

Inside of AppSec Village, there was a stage for a speaking track, a workshop stage, an ongoing CTF, and multiple activity pods. The activity pods were independent exercises that took on many forms, from hands-on trainings to trivia challenges to CTFs. GitGuardian introduced dozens of participants to using honeytokens in our CTF, "[Hunt the Hacker - Detect compromises in your repositories!](https://www.appsecvillage.com/events/dc-2023/hunt-the-hacker-detect-compromises-in-your-repositories-520840?ref=blog.gitguardian.com)"

In our exercise, competitors worked to solve the most challenges to defend a GitLab organization that had been compromised by a hacker. The participants deployed honeytokens to determine what repos had been compromised and triangulate who in the org was the adversary. The later stages focused on remediating the incident by removing the threat and rotating exposed keys.

> "I love the blue team approach, with an automated attack, because it's really different from most CTFs I have done."\
> - Hunt the Hacker participant

Over the three days we ran the pod, we answered many questions. Here are a few common ones that might also help you when hunting for adversaries in your environments.

#### What is a honeytoken?

Honeytokens are decoy credentials that don't allow any access to any real system or data but instead trigger an alarm when someone attempts to use them. The honeytokens in the CTF were decoy AWS credentials, just like the real ones you can make with [GitGuardian Honeytoken](https://www.gitguardian.com/honeytoken?ref=blog.gitguardian.com). For the sandbox CTF we ran, we only displayed the repository the honeytoken was deployed to when compromised by the automated hacker, but in the real world, GitGuardian Honeytoken would also give you the IP address, user agent, attempted action, and timestamps. These data points will help you quickly mount a defense when a breach or leak happens.

#### Valid credentials can lurk in your git history

Git is an interesting technology that is almost always self-taught. Everyone has their own preferred way of working with repositories, and there are many routes to the same results. Players needed to search for secrets in the codebase at one point in the CTF. They could do this manually by clicking through all the commits in the repo, which most people immediately found impractical. They could also use tools like [ggshield](https://www.gitguardian.com/ggshield?ref=blog.gitguardian.com) to automate the search process. This path required either copying the repository locally or making a CLI call to the remote repos.

For those using the `git clone` command or performing a [secret scan](https://www.gitguardian.com/ggshield?ref=blog.gitguardian.com) remotely, they quickly found the valid credentials in past commits. However, they would be stuck if they downloaded the code as a `.zip` archive. This is because the created archive does not give you the `.git` folder or the git history, just a copy of the most recently saved state of the files.

If you only look for credentials in your production branch or just in the code in the latest commits, then there is a good chance you have secrets in your git history that need to be remediated. This is exactly why [GitGuardian Secret Scan will perform a historical scan](https://docs.gitguardian.com/internal-repositories-monitoring/getting-started/first-audit?ref=blog.gitguardian.com) of any repository connected to the platform to give you a full report of any credentials hiding in the git logs.

#### You must balance operational needs with security

In the later stages of the Hunt the Hacker CTF, participants needed to identify and remove the active hacker who had infiltrated the organization without disrupting the "availability score." If a player removed all the users and tokens, they would, in fact, have removed the hacker, but they also would have made it impossible to complete the final challenges, making it impossible to win the CTF.

We wanted to mimic the real-world balancing act of needing to act fast when an attacker is discovered but still maintain production and the CI/CD pipelines that the DevOps teams are counting on. Revoking a credential without understanding the implications or removing access to teams unnecessarily might cause downtime or major disruptions. This is another reason it is important to know when a breach or leak occurs as soon as possible, giving you time to execute your remediation plan to remedy the situation safely in the shortest time possible.

[![The Hunt The Hacker CTF pod at AppSecVillage](https://lh3.googleusercontent.com/Q1L-tZsfuiSnASPKWrpsxVeZks14pLWjwvTyUxwSBrnEkwuQB0vb80_5-UkPtBi5swK8FJham42zEaI3fhISPqrqLL_6FVdWTiWp9Khgs-7L5u2Y5Uc-0EQEGqlQXAfUwXFluPNhVTzxbnqEfiiDiQ)](https://lh3.googleusercontent.com/Q1L-tZsfuiSnASPKWrpsxVeZks14pLWjwvTyUxwSBrnEkwuQB0vb80_5-UkPtBi5swK8FJham42zEaI3fhISPqrqLL_6FVdWTiWp9Khgs-7L5u2Y5Uc-0EQEGqlQXAfUwXFluPNhVTzxbnqEfiiDiQ)

### AppSec Village talks

The speaker lineup was fantastic. It featured GitGuardian's [Senior Developer Advocate Mackenzie Jackson](https://blog.gitguardian.com/author/mackenziejackson/) giving an updated version of his talk, "[The attackers guide to exploiting secrets in the universe](https://blog.gitguardian.com/bsides-las-vegas-2023/#:~:text=Finding%20and%20exploiting%20passwords%20in%20the%20wild)." He was one of 22 speakers who gave talks on various application security topics. Here are highlights from just a few other sessions.

#### A keynote conversation with Chris Roberts

The legendary [security researcher, and hacker of airplanes, Chris Roberts](https://www.linkedin.com/in/sidragon1/?ref=blog.gitguardian.com), kicked off the first day of talks. In his informal chat with the audience titled "From Camels to Collaboration, A Journey Through Technology AND Humans," he walked us through his history at DEF CON, some great advice for building a better community, and shared the story of [re-geolocating cows and camels](https://www.theregister.com/2016/06/21/plane_hacker_cows_milk_and_honey/?ref=blog.gitguardian.com).

He said over the last 20+ years he has been in the security space he has watched the community repeatedly chase technology and forget the humans. We too often lament the user as someone who won't listen or who is "using the product wrong." We look for someone to blame for not grasping our tech choices instead of taking the feedback and finding new ways to empower the users and teams, ultimately delivering the products.

He shared an anecdote of a colleague complaining that the network team was fighting against his project. It turned out he had never actually met with the network team, and they had no idea what he was trying to accomplish. Chris suggested he buy the network team some donuts and apologize. When his colleague did, it got him out of his silo, fixed the relationship issue, and got his project back on track once everyone was on the same page about the project.

He also had some common sense advice for vendors. He first suggested we all go thank them for being involved, as sponsors are needed to make things like DEF CON a reality. But he also charged vendors with needing to be better at finding common ground with technologists and security leads. He gave three specific suggestions:

1.  Do your research. If you do not customize your outreach to show you know who he is as a CISO and what real-world challenges he is up against, he will likely not engage. This is true of email, phone, and LinkedIn-based outreach.
2.  Understand CISOs gatekeep their team's time and are very busy throughout the week. He personally sets his Friday afternoons for vendor meetings and said it is common to have such a block on the calendar. It never hurts to ask about this. If he sees merit in the solution, he will pass you along to his team, who are more directly involved in that area; he will pass us on if it is worth their time.
3.  Expect and accept feedback. If you do get a meeting with a CISO, be prepared to listen more than you talk. He has helped many vendors tune their pitches to get to the point and drop absolutes and promises from their presentations, giving CxOs what they need to hear to quickly evaluate your solution. If you just show up and repeat the same pitch without listening, then you will waste everyone's time.

[![](https://blog.gitguardian.com/content/images/2023/08/101200ea52d2f8b4.jpeg)](https://mastodon.social/@mcdwayne/110872102245597639?ref=blog.gitguardian.com)

Chris Roberts giving the [#AppSecVillage](https://mastodon.social/tags/AppSecVillage?ref=blog.gitguardian.com) at [#DEFCON](https://mastodon.social/tags/DEFCON?ref=blog.gitguardian.com) Keynote

#### Generative AI for tuning your WAF

In one of the more technical sessions of AppSec Village, [Ankur Chowdhary, Cybersecurity Researcher at Arizona State University](https://www.linkedin.com/in/ankur-chowdhary-08701369/?ref=blog.gitguardian.com) presented "Generative Adversarial Network (GAN) based autonomous penetration testing for Web Applications" and walked us through how his team is leveraging machine learning to find and patch vulnerabilities in record time.

For many attendees, this was their first introduction to [Generative Adversarial Networks, GANs](https://en.wikipedia.org/wiki/Generative_adversarial_network?ref=blog.gitguardian.com), an approach to finding exploits by pitting machine learning algorithms against each other in a zero-sum game, where one is always attacking, and one is always improving the defensive rules of their web application firewall, WAF.

The main advantage of this approach is that a GAN can quickly test and apply rules you would think to set by hand and ones that would be too tedious to account for through manual configuration. WAF security is an endless game of cat and mouse. Being able to safely attack your own application with an ever-evolving adversary you control can surface vulnerabilities long before real-world attackers can formulate and attempt exploits.

His team plans to release their finding in a [research paper released on the Multidisciplinary Digital Publishing Institute, MDPI website](https://www.mdpi.com/journal/sensors/special_issues/5394T88W66?ref=blog.gitguardian.com). This is a very worthwhile approach to investigate and one of the more impressive uses of Generative AI in the security space so far.

[![](https://blog.gitguardian.com/content/images/2023/08/F3RPnd_XwAAJglX.jpeg)](https://twitter.com/McDwayne/status/1690063306218766337?ref=blog.gitguardian.com)

Generative Adversarial Network (GAN) based autonomous penetration testing for Web Applications from [@drankurc89](https://twitter.com/drankurc89?ref=blog.gitguardian.com)

#### How not to succeed in DevSecOps

[Tanya Janca](https://shehackspurple.ca/?ref=blog.gitguardian.com), who is now [the Head of Community and Education at Semgrep](https://www.prnewswire.com/news-releases/semgrep-appoints-tanya-janca-as-head-of-community-and-education-301895122.html?ref=blog.gitguardian.com) and lead of the [WeHackPurple community](https://community.wehackpurple.com/?ref=blog.gitguardian.com), really needs no introduction. In her session "DevSecOps Worst Practices" she shared many lessons learned from a career working as a developer and security professional in the DevSecOps space, laid out as a list of specific behaviors to avoid.

These bad practices included technology issues, like not tuning your tools to avoid false positives or making test data hard to replicate or discover. They also included a good number of issues around timing and network usage. She said she once ran a [DAST](https://blog.gitguardian.com/why-sast-dast-cant-be-enough/) tool against the development environments in a company that prevented anyone from pushing new code for a full day. She learned to run tests when there was less need, such as at night and on the weekend.

Most of the issues came down to education and communication with our teams. If you have a tool that no one is properly trained to use, you can not expect anyone to use it properly. She said we must demand better training from our vendors. At the same time, we need to get our teams on board with fixing issues and not just adding them to the backlog. From the perspective of moving features out the door, security issues might get pushed further down the backlog. It is up to us as security professionals to communicate the urgency and importance of these fixes, which requires a human connection and a larger organizational view of the project.

We need to remember that we are working with people, and human beings need positive reinforcement. She said it is not just little kids who like to hear 'good job.' Motivating people to do the right things will always yield better results than blaming and shaming someone for getting it wrong.

We were very fortunate to have [Tanya on an episode of The Security Repo Podcast](https://open.spotify.com/episode/6j0MboxK7G3AnXzBV6YzRV?ref=blog.gitguardian.com), where she discussed this exact topic. Check it out to get more insights into running a successful DevSecOps team.

[![](https://blog.gitguardian.com/content/images/2023/08/F3RjDT-XoAEzeGi.jpeg)](https://twitter.com/McDwayne/status/1690084676155904000?ref=blog.gitguardian.com)

DevSecOps Worst Practices [@shehackspurple](https://twitter.com/shehackspurple?ref=blog.gitguardian.com) at [#DEFCON](https://twitter.com/hashtag/DEFCON?src=hashtag_click&ref=blog.gitguardian.com)

War Stories
-----------

Bringing together folks from all corners of the security and cryptography world, the War Stories track gave a platform for folks to explain their research to an audience outside their normal operational sphere.

### A call to action by the EFF

The Electronic Frontier Foundation, EFF, has been on the front lines of cybersecurity policy-making at the national and international levels, with a mission to ensure that technology supports freedom, justice, and innovation for all people of the world. In their session "Unconventional Cybercrime: How a bad Anti-hacking treaty is becoming a law"

[Global Privacy Policy Director Katitza Rodriquez](https://www.eff.org/about/staff/katitza-rodriguez?ref=blog.gitguardian.com) and [Sr. Staff Technologist Bill Budington](https://www.eff.org/about/staff/william-budington?ref=blog.gitguardian.com) gave us a call to action around a new international treaty that would redefine cyber crime and potentially make it much harder for researchers to surface vulnerabilities safely.

The [UN Ad Hoc Committee is currently debating resolution 74/247](https://www.unodc.org/unodc/en/cybercrime/ad_hoc_committee/home?ref=blog.gitguardian.com) and is set to vote soon on creating a binding global treaty that defines cybercrime as illegal access, illegal interception, data interference, computer system interference, and misuse of a device.

The EFF wants them to eliminate a potential loophole concerning illegal access. If adopted, the resolution would potentially make anyone sharing a password for a video streaming service a criminal, not just someone violating the terms of service. It would also possibly allow non-democratic nation-states to prosecute researchers in democratic countries if they unknowingly or unintentionally gain access to a database with any data the state deems private or sensitive.

They also discussed a new Cyber Resilience Act that would compel companies to disclose vulnerabilities upon discovery. While well-intentioned to keep bad actors from hiding security flaws, the language as it stands would force public disclosure upon discovery, not as it is currently properly done, when a fix is available.

There is an upcoming UN session to vote on these measures from August 21 to September 1, 2023. It is not set in stone yet; as Bill said, "Nothing is agreed until everything is agreed." You can [find out more by visiting the EFF website](https://www.eff.org/issues/un-cybercrime-treaty?ref=blog.gitguardian.com).

[![](https://blog.gitguardian.com/content/images/2023/08/F3MEXrzWIAAVH20.jpeg)](https://twitter.com/McDwayne/status/1689699098805329921?ref=blog.gitguardian.com)

[#DEFCON](https://twitter.com/hashtag/DEFCON?src=hashtag_click&ref=blog.gitguardian.com)[#WarStories](https://twitter.com/hashtag/WarStories?src=hashtag_click&ref=blog.gitguardian.com) "Unconventional Cybercrime: how a bad anti-hacking treaty is becoming a law"

### Rewarding hardware security research

How do you motivate security researchers to find potential remote execution vulnerabilities in printers and other internet-connected devices? Cash seems to work, at least according to researchers [James Horseman](https://twitter.com/jameshorseman2?lang=en&ref=blog.gitguardian.com) and [Zach Hanley](https://twitter.com/hacks_zach?ref=blog.gitguardian.com). In their session "New isn't always novel: grep'ing your way to $20K at PWN2OWN, and how you can too," they revealed how they were able to overcome the defenses of a specific model of printer to win one of the prizes from [TrendMicro's PWN2OWN](https://newsroom.trendmicro.com/2023-03-27-Over-1-Million-Awarded-in-Pwn2Own-Hacking-Competition?ref=blog.gitguardian.com). Along the way, they shared some fundamental goal-setting and execution strategies that you can apply no matter what you are working towards.

They said the most important step they took was to set goals along the way. Breaking the challenge into achievable steps lets them tackle a very complex mission. In their case, they had milestones that included getting their hands on an obscure printer far past its end of life, removing the components without breaking anything, reading the extracted flash drive, and finding a vulnerability to exploit.

At every stage, they employed a methodology called [The OODA Loop](https://en.wikipedia.org/wiki/OODA_loop?ref=blog.gitguardian.com), which stands for:

-   Observe - what are the facts of the situation?
-   Orient - consider what should be done next based on the facts.
-   Decide - make an action plan and plan for all likely outcomes.
-   Act - execute the plan and be ready to repeat the OODA loop when done.

They encouraged everyone interested to get involved in the PWN2OWN competition. The hardest part, they said, was obtaining the printer and working with the old and fragile motherboards. They pointed to off-the-shelf tools like [CodeQL](https://codeql.github.com/?ref=blog.gitguardian.com), [Sonarcube](https://www.sonarsource.com/products/sonarqube/?ref=blog.gitguardian.com), and [Semgrep](https://semgrep.dev/?ref=blog.gitguardian.com) as great resources for finding vulnerabilities, but more importantly, as tools to prevent you from adding exploitable vulnerabilities into your code.

[![](https://blog.gitguardian.com/content/images/2023/08/F3MZAhIX0AAay8i.jpeg)](https://twitter.com/McDwayne/status/1689721787876024320?ref=blog.gitguardian.com)

New isn't always novel: grep'ing your way to $20k at PWN2OWN and how you can to. From [@jameshorseman2](https://twitter.com/JamesHorseman2?ref=blog.gitguardian.com) and [@hacks_zach](https://twitter.com/hacks_zach?ref=blog.gitguardian.com) At [#DEFCON](https://twitter.com/hashtag/DEFCON?src=hashtag_click&ref=blog.gitguardian.com)[#WarStories](https://twitter.com/hashtag/WarStories?src=hashtag_click&ref=blog.gitguardian.com)

Hacker fun and games
--------------------

While there are a lot of sessions and serious conversations at DEF CON, there are also a lot of fun and inclusive community activities. DEF CON strives to make the whole experience welcoming and safe for everyone involved.

For example, on the first day of DEF CON, there was the [ToxicBBQ](https://www.toxicbbq.org/?ref=blog.gitguardian.com), the "unofficial DEF CON Kick-off Cookout." For many attendees, this was their first time at this event, and everyone was made to feel welcome by the organizers and repeat attendees. The donate-what-you-can model paid for the space and food that accommodated most all dietary restrictions, making everyone feel like they belonged no matter their circumstances.

[![](https://blog.gitguardian.com/content/images/2023/08/F3ikasebUAA1-Sr.jpeg)](https://twitter.com/StoicPharmacist/status/1691282441204563968?ref=blog.gitguardian.com)

[#ToxicBBQ](https://twitter.com/hashtag/ToxicBBQ?src=hashtag_click&ref=blog.gitguardian.com) was super fun! The organizers were super nice and welcoming, and we met a ton of great people there.

In the evenings, DEF CON held movie nights on a big screen featuring some [true sci-fi classics](https://twitter.com/defcon/status/1504980778190458881?ref=blog.gitguardian.com). There was also Hacker Jeopardy, a rowdy good time where three teams competed against one another for glory and a [Black Badge](https://defcon.org/html/links/dc-bb-policy.html?ref=blog.gitguardian.com). It was so popular on the first night they had to move it to the largest auditorium in Ceasars Forum on the second night to accommodate all the fans. And Hacker Karaoke, where the community got together to sing our hearts out, was a serious highlight for many.

[![](https://blog.gitguardian.com/content/images/2023/08/F3YWJ_7bQAATDDl.jpeg)](https://twitter.com/TheL0singEdge/status/1690563074158391296?ref=blog.gitguardian.com)

Tonight's Hacker Jeopardy categories [#defcon](https://twitter.com/hashtag/defcon?src=hashtag_click&ref=blog.gitguardian.com)[#DFIU](https://twitter.com/hashtag/DFIU?src=hashtag_click&ref=blog.gitguardian.com)[#defcon31](https://twitter.com/hashtag/defcon31?src=hashtag_click&ref=blog.gitguardian.com)

An event like none other
------------------------

There are a lot of legendary stories that come from DEF CON. Some should likely be taken with a grain of salt, and others are understated in their retelling. This event holds a very special place in the hearts of everyone involved. If you are involved or interested in security, this author would highly recommend checking out this one-of-a-kind event next year. We already plan to return to AppSec Village for another round of learning and fun at DEF CON 32 in 2024.

[![DEF CON 31 entrance](https://lh3.googleusercontent.com/wHi7RihmmshJxnMHttffEOhDdYKSGCVQIskfzi6i2IrNunHjkNkkoFzolwhdNCrS9sM7J-Xl7aKvWow2VqktHF1sOWlD-vf6yyA__zql74psloFdGKqRdFlH-4Am606TVNDHeR_M_dTy1a3y9fOqbg)](https://lh3.googleusercontent.com/wHi7RihmmshJxnMHttffEOhDdYKSGCVQIskfzi6i2IrNunHjkNkkoFzolwhdNCrS9sM7J-Xl7aKvWow2VqktHF1sOWlD-vf6yyA__zql74psloFdGKqRdFlH-4Am606TVNDHeR_M_dTy1a3y9fOqbg)