
Penetration tester & Web developer Founder @Devsecurely I will teach you how to secure your applications
Paris
Joined June 2013
- Tweets2.2K
- Following1K
- Followers1.2K
- Likes2K
Imed Bounab retweeted
Top Cyber Attacks Explained
Here’s a quick look at how some of the most common attacks work:
Phishing: The attacker sends a fake link pointing to a spoofed login page. The victim enters credentials, the attacker captures them, and uses them to access the real system.
Ransomware: The victim opens a malicious attachment or file. The ransomware encrypts local data and demands payment to restore access. Files stay locked until the ransom is paid or a backup is restored.
Man-in-the-Middle (MitM): The attacker positions themselves between the victim and the server, intercepting traffic in both directions. Neither side detects the interception. The attacker can read or modify data as it passes through.
SQL Injection: Malicious SQL gets inserted into an input field, for example, studentId=117 OR 1=1. The database executes it as a valid query and returns data it shouldn't. A single vulnerable input field can expose an entire table.
Cross-Site Scripting (XSS): A malicious script gets injected into a legitimate page. When another user loads that page, their browser executes the script. Session tokens, cookies, and private data can be stolen this way.
Zero-Day Exploits: The attacker finds a vulnerability the vendor hasn't discovered yet. No patch exists. The attack runs until the vendor identifies the issue and ships a fix, which can take days or weeks.
Over to you: Which of these attacks have you seen most often in real environments, and which one do you think is the hardest to defend against today?
Imed Bounab retweeted
A friend had Claude spend all night trying to hack into an e-ink display, and gave Claude camera access so it could verify whether an attempt worked. He told Claude to show him a message if it won.
My friend woke up to this victory lap, which Claude didn't realize was backwards
Imed Bounab retweeted
Software engineering is the only field where you can build systems used by millions…
and still get rejected because you forgot the time complexity of bubble sort.
Imed Bounab retweeted
𝗪𝗵𝗮𝘁 𝗵𝗮𝗽𝗽𝗲𝗻𝘀 𝘄𝗵𝗲𝗻 𝗮 𝘄𝗲𝗯𝘀𝗶𝘁𝗲 𝗴𝗲𝘁𝘀 𝗮𝘁𝘁𝗮𝗰𝗸𝗲𝗱 𝗼𝗻 𝘁𝗵𝗲 𝗜𝗻𝘁𝗲𝗿𝗻𝗲𝘁?
Websites sometimes go offline suddenly because of DDoS attacks. These attacks flood sites with so much traffic that they can't function.
The Internet's most well-known 𝗗𝗲𝗻𝗶𝗮𝗹 𝗼𝗳 𝗦𝗲𝗿𝘃𝗶𝗰𝗲 (𝗗𝗗𝗼𝗦) 𝗮𝘁𝘁𝗮𝗰𝗸 was executed in August 2024, according to Alphabet, Amazon, and Cloudflare, who also raise the alarm about a new disruptive tactic. It was said to be hit by sending 398 million fake visits in just one second.
According to Google, the most recent attacker used a novel "Rapid Reset" technique based on HTTP/2 stream multiplexing. This new attack sends hundreds of thousands of "requests," which are instantly canceled.
𝗕𝘂𝘁 𝘄𝗵𝗮𝘁 𝗶𝘀 𝗮 𝗗𝗗𝗼𝗦 𝗮𝘁𝘁𝗮𝗰𝗸?
A Distributed Denial-of-Service attack occurs when attackers flood a website or service with so much traffic that it cannot function. These attacks cost businesses an average of $100,000 per hour in downtime.
𝗛𝗼𝘄 𝗱𝗼𝗲𝘀 𝗶𝘁 𝘄𝗼𝗿𝗸?
𝟭. 𝗚𝗮𝘁𝗵𝗲𝗿𝗶𝗻𝗴 𝗮 𝗕𝗼𝘁𝗻𝗲𝘁: Attackers infect thousands of computers with malware, creating a network of compromised devices they control remotely.
𝟮. 𝗖𝗼𝗼𝗿𝗱𝗶𝗻𝗮𝘁𝗶𝗼𝗻: The attacker directs all these devices to simultaneously send traffic to a specific target.
𝟯. 𝗙𝗹𝗼𝗼𝗱𝗶𝗻𝗴 𝘁𝗵𝗲 𝗧𝗮𝗿𝗴𝗲𝘁: The website or server becomes overwhelmed by incoming requests.
𝟰. 𝗜𝗺𝗽𝗮𝗰𝘁: Legitimate users can't access the service, causing financial losses and reputation damage.
Common types of DDoS attacks:
🔹 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻-𝗹𝗲𝘃𝗲𝗹 𝗮𝘁𝘁𝗮𝗰𝗸𝘀 (layer 7 - L7): Make advantage of particular packet types or connection requests to eat up all of the memory, CPU time, or open connections possible.
🔹 𝗣𝗿𝗼𝘁𝗼𝗰𝗼𝗹 (𝗻𝗲𝘁𝘄𝗼𝗿𝗸) 𝗮𝘁𝘁𝗮𝗰𝗸𝘀: Prevent service using all the network devices' layer 3 and layer 4 processing resources. They typically deliver a large number of tiny packets at a high packet rate.
🔹 𝗩𝗼𝗹𝘂𝗺𝗲𝘁𝗿𝗶𝗰 𝗮𝘁𝘁𝗮𝗰𝗸𝘀 (𝗳𝗹𝗼𝗼𝗱𝘀): Transmit many packets of traffic to the intended victim's network to overwhelm it with so much bandwidth that users cannot access it.
We can protect against DDoS attacks by filtering suspicious traffic, distributing traffic loads through content delivery networks, and monitoring network patterns to detect attacks early.
Having traffic filtering services, rate limiting, and an incident response plan ready before an attack happens.
#softwareengineering #programming #security
Imed Bounab retweeted
So, you think your website is hidden because you're using an obscure subdomain?
Think again, because that's the first thing hackers look for.
Hackers look for these subdomains to uncover more websites affiliated to a company. This gives them more targets to attack, and thus increases their chances of compromising a company asset.
Here are the techniques they use to find subdomains:
1- DNS transfer: This vulnerability isn't very common anymore. But, if your DNS server is misconfigured, it can allow anyone to retrieve the list of DNS records.
This is a feature used to allow DNS servers to synchronize their records between each other. If enabled without identity checking, anyone can try to synchronize and retrieve the records.
If this technique works then there is no need for the rest of the techniques, you already have all the subdomains.
2- Subdomain bruteforce: You use a list of common names to try and identify valid subdomains. For example, you ask the DNS server to resolve the subdomains example.com, git.example.com, admin.example.com. If any of these return a valid DNS response, we will know that the subdomain exists.
3- Certificate transparency directories: services like crt.sh contain the list of TLS certificates for a certain domain. A simple search gives us the list of certificates along with the subdomain generated for a certain domain. This gives us the list of subdomains having a TLS certificate.
4- Shodan: shodan.io is a service that scans the internet. A simple search of the main domain can give us a list of servers with a subdomain of that main domain present in the TLS certificate.
5- Search engines: if your subdomains are indexed on search engines, we can search the main domain and retrieve the list of indexed subdomains.
6- Github/Gitlab: We can search the main domain on source code hosting solutions in the hopes of finding a reference to subdomains. For example, there might be a public project making HTTP calls to api.example.com. We would thus identify api.example.com as a subdomain.
7- Other sources: there are other sources that we can use to find subdomains, like virustotal, censys, SecurityTrails...
We don't have to use these techniques manually. We can use a tool like github.com/projectdiscovery/… to automate the task.
Try it on your domain to see what hackers might find.
So, if you thought that hackers will never find your website secret-subdomain.example.com, think again. Assume they can find it and implement other measures (IP whitelist, htaccess authentication, secure login, strong passwords...).
If you found this useful, re-post to share with your followers 😉.
Imed Bounab retweeted
Exploding pagers via a potential supply chain attack is a new threat vector unseen at this scale before
Also unseen at this scale and exploding is our web application deployment checklist. Know exactly what to do to deploy a secure application.
Comment "gimme" and I will DM you the download link.
Imed Bounab retweeted
Did you know you can define cookies for all subdomains *.example.com? But please, don't do that. It can be a security risk.
If users visit any subdomain, their browser will send the cookie to the subdomain.
So, If hackers compromise a subdomain hacked.example.com, and a user visits this subdomain, then the hackers will get access to his cookie.
They can then use the cookie to impersonate the user on the main website example.com and compromise his account.
If you can, define a cookie only for one website (for example example.com).
Repost if you found this useful 😉
Imed Bounab retweeted
We are giving away one ticket to attend one of the Europe's most loved conferences - @brucon in-person.
If you are from Belgium or nearby or ready to travel for BruCON, follow @AlteredSecurity, Repost, Like and Reply to this post to participate!
We will announce one random winner on Friday, 13th September 2024.
alteredsecurity.com/online-l…
Imed Bounab retweeted
When clients tell me "But SQL injections are a thing of the past, no one is still vulnerable to this", I do a quick search and find 3 or 4 recent blog posts about SQL injection exploited.
Here's an example: shielder.com/advisories/vtig…
Imed Bounab retweeted
This is why you need to choose a secure hashing algorithm for your passwords. These are hash calculating speeds for different algorithms:
MD5 ... 80243326976 H/s
SHA1 ... 27224178688 H/s
scrypt ... 1917337 H/s
bcrypt ... 43551 H/s
It's much easier to crack MD5 than bcrypt
Imed Bounab retweeted
Never rely on secrecy to secure your application.
Assume the hackers have access to your source code.
Now what? How do you secure it?
Wordpress is open source, yet it is a very secure application used by hundreds of millions of websites.
Imed Bounab retweeted
Be careful what dependencies you add to your project. Any malicious code in the dependency can take over your application blog.phylum.io/new-tactics-f…
Imed Bounab retweeted
I can't believe this...
I asked our intern to create a page to allow administrators to import users.
Can you identify all the vulnerabilities that are present in these lines of code?
This kid needs to learn how cruel the world is
Imed Bounab retweeted
If you don’t treat input as evil
Hacker’s attacks will be lethal
- Jingle we sing for baby hackers
Imed Bounab retweeted
🚀 Excited to share our blog post: 'Navigating Web Sessions: Your Guide to Secure, Continuous Browsing' !
There we explain the concept of web sessions and how to secure them.
#CyberSecurity #session
devsecurely.com/blog/2023/11…
Imed Bounab retweeted
"Everyone has to be presumed innocent until proved guilty"
- Universal Declaration of Human Rights
"User input has to be presumed guilty until proved innocent"
- Jingle for baby hackers
Imed Bounab retweeted
Using an ORM does not mean you're safe.
On a recent security training, developers told me how they are protected against SQL injection because they use an ORM.
Turns out they WERE affected because they use raw SQL queries when the ORM doesn't allow them to do complex operations
Imed Bounab retweeted
A dependency has the power to compromise your application.
Don’t give that power lightly.
Vet your dependencies.
devsecurely.com/blog/2023/11…
Imed Bounab retweeted
Our write-up for a private CTF we solved on a customer's request:
offsec.almond.consulting/sol…












