Red Team Chronicles — No Hidden Information
Tags: cyberthreat, redteam, cybersecurity
Published: 2021-10-28 06:48:50

---
title: Red Team Chronicles — No Hidden Information
published: true
date: 2021-09-15 16:51:07 UTC
tags: cyberthreat,redteam,cybersecurity
canonical_url: https://medium.com/gitguardian/red-team-chronicles-no-hidden-information-67d30ebf099b
---

### Red Team Chronicles — No Hidden Information

![](https://cdn-images-1.medium.com/max/1024/0*kKTaqbZTTKwbyxhg.png)

In this episode, you’ll discover a perfect illustration of the security knowledge gap existing between organizations. Offensive security expert Philippe Caturegli comes across a way too common belief: **“_nobody will find my scripts or my data because they are very carefully hidden_”.**

And here is how Philippe reacts to this:

There is no such thing as well-hidden information. **Security can’t be established by hiding things** or considering they are not understandable, cybercriminals have the time, intelligence and tools to find anything. A common error is to leave sensitive data in a development folder. Everything that is available in a website for example, even in sub-folders should be considered public.

Multiple techniques enable attackers to find hidden or forgotten information: [Open Source Intelligence,](https://www.csoonline.com/article/3445357/what-is-osint-top-open-source-intelligence-tools.html) [DNS enumeration](https://www.greycampus.com/opencampus/ethical-hacking/dns-enumeration) (active or passive), attacks through folders and files dictionaries, website archives are some of them.

**You need to protect the information in a way that even with complete knowledge of how things work, you can’t exploit it.**

In one case we got access to the source code of a Java application. In this application, they used a function called Math.random to generate a one-time password. This function is in fact a formula :

**X n+1 = (a.Xn+c) mod m**

where _a_ is a multiplier, _c_ an increment and _m_ a modulo  
This formula generates pseudo-random numbers. These numbers constitute a sequence for which each new number depends on the previous one. The initial term _X0_ is called the seed. Each seed generates a new sequence. The modulo defines the randomization space.

The sequence seems random but it is, in fact, predictable. **We just needed a sequence of 3 numbers** , which we got by enrolling 3 times. From the 3 numbers, we could reverse engineer the formula using brute-force techniques. Current processing power makes it easy and quick. In this case, the function elements were static numbers in the java code, the only unknown element was the seed.

You need to protect the Intellectual Property that is present in your code because if it leaks it can give hackers a lot of useful information to exploit.

_But you also discover hardcoded secrets, like credentials?_

Oh yes… and cookies and tokens which have a longer lifespan, as passwords are often expired, but not always… also we can deduct things from accounts, password structure, the way they are used, internal machine names, internal IP addresses, even proxies. We often use multiple items together to succeed, one leading to another. **So never consider something as not important.**

In fact, I really believe that there is always a way to get in. Social engineering being one, even if people are trained. **There is always a weak link.** Some profiles are also easier to bypass because it is their vested interest to comply. I am thinking for example about sales reps or support teams. IT needs to make sure access rights are correctly managed. Do sales need to access Jira tickets? **Because in Jira tickets you often find security issues.**

But don’t get me wrong, **developers are also potential targets** , even if it is a bit more difficult. We can use personal accounts and credentials leaked to embody a developer and create trust with their colleagues.

In the end, **security should really focus on detection**. Being compromised is not a major issue if you react early, because the initial intrusion is limited to a very narrow scope. This is a shift we’d like security teams to take, adding a discriminating alert layer to their protection. **They should not only focus on preventing but also on alerting.**

As you can see, Philippe has some interesting stories to share as well as some useful recommendations to make. If you are interested, keep following the Red Team Chronicle by subscribing to our newsletter or following us on Twitter or LinkedIn.

**Stay tuned for Episode 5!**

_Originally published at_ [_https://blog.gitguardian.com_](https://blog.gitguardian.com/red-team-chronicles-episode-4/) _on September 15, 2021._

* * *