Jump to content

Nytro

Administrators
  • Posts

    18659
  • Joined

  • Last visited

  • Days Won

    680

Everything posted by Nytro

  1. Nytro

    Salut

    In ce sens? Tinerii de azi in cel mai bun caz folosesc Discord, dar e haotic iar Discord ca platforma mi se pare o mizerie.
  2. Nytro

    Salut

    Pacat ca nu mai e activitate
  3. Nu prea inteleg asta, adica de ce ar vota moldoveni care au plecat din Republica Moldova in tari din Uniunea Europeana cu cineva pro-rus? Daca sunt pro-rusi de ce au plecat nu au plecat in Rusia? Daca le place in UE, mi se pare evident sa voteze cu Maia.
  4. Nytro

    Hello

    Se cheama Keylogger
  5. Nu e atat "car hacking" cat e web security pentru o aplicatie web care permite din cine stie ce motive astfel de actiuni idioate.
  6. This is your last chance to register for the DefCamp Capture the Flag (D-CTF) 2024 Qualification Phase! We'll keep it short: START DATE Friday, September 27 at 10:00 AM UTC END DATE Sunday, September 29 at 9:00 AM UTC WHERE on CyberEDU Register for free today! What to expect: CTF format: Jeopardy Gameplay format: Team-only Genres: Crypto, Pwn, Reverse Engineering, Web, Forensics, Miscellaneous and more! Difficulty: Entry Level - Easy - Medium - Hard - Insane For finalists: - free tickets to DefCamp 2024; - a spot in the D-CTF 2024 finals; - a full day of Attack / Defence & Jeopardy - prizes, obviously: EUR 4,500 Ready for glory? Join the D-CTF 2024 Quals! Good luck!
  7. Only one week left until the #DefCamp Capture the Flag 2024 qualifiers kick off! Don't miss your chance - register now https://dctf24-quals.cyber-edu.co/?tenant=cyberedu Read more details about #DCTF and other news from DefCamp, right here: https://def.camp/one-week-left-until-the-defcamp-capture.../
  8. In curand creste pretul la bilete, cumparati mai din timp https://def.camp/tickets/
  9. DefCamp Capture the Flag 2024 START DATE END DATE Friday, September 27, 2024 at 10:00 AM UTC Sunday, September 29, 2024 at 9:00 AM UTC EVENT OVERVIEW You have to be authenticated to be able to join this contest. 🚩 Mark Your Calendars! The DefCamp Capture the Flag (D-CTF) Qualification Phase is Locked and Loaded for 2024! 😱 Get ready to dive into the most electrifying and audacious security CTF competition in Central and Eastern Europe—DefCamp Capture The Flag (D-CTF)! This is where the sharpest hackers and IT masterminds come together to push their skills to the limit, battling it out with top CTF teams from around the globe. The mission? Secure a spot in the elite top 10 and ultimately conquer the D-CTF competition—or go down fighting! Since 2011, DefCamp Capture the Flag has been the ultimate battleground for over 10,000 players. This annual, multi-stage event is open to all, but remember one crucial rule—hack or be hacked! Event Highlights Brace yourselves for an adrenaline-packed adventure with around 10 beginner-friendly challenges and 15 more difficult tasks that will test even the most seasoned players. Format: Jeopardy Play Format: Team-only Genres: Crypto, Pwning, Reversing, Web, Forensics, Miscellaneous… Language: English Access: Open / Free for everyone Difficulty: Entry Level - Easy - Medium - Hard - Insane Website: D-CTF The Challenge Awaits Tackle a variety of challenges across multiple categories. Exploit system weaknesses, follow cryptic hints, and uncover hidden secrets. Each challenge holds a unique flag in the format CTF{sha256 random message}. Capture it, submit it on our platform, and rack up your points. CTF competitions are a thrilling mix of puzzles and challenges, including reverse-engineering, memory corruption, cryptography, web tech, and more. Solve them, capture the flag, and climb the leaderboard to victory! Detalii: https://dctf24-quals.cyber-edu.co/?tenant=cyberedu
  10. Ce device-uri? Vad ca ala era ceva proiect prin care bagau mizerii in oameni sa ii faca sa spuna lucruri.
  11. Salut, poate doar incercand sa iei legatura cu cei de la whatsapp, dar slabe sanse.
  12. 1. Nu 2. Probabil calificarile Defcamp CTF, Unbreakable sau ce mai e pe acolo
  13. Eu il inteleg si inteleg si limitarile de care se loveste: 1. Prezentarile nu se compara cu Defcon sau altele dintr-un motiv simplu: de ce ar vrea cineva sa prezinte in Romania, cand poate prezenta la o conferinta mai mare din US, Singapore sau alta tara? Asadar, CFP-urile probabil nu vin cu hardcore research sau ceva care sa rupa piata, adica nu cred ca are prea mult de ales. Am vazut si eu asta cu RSTCon cand prezentarile au venit de la cunoscuti 2. E un business, are nevoie de sponsorizari si e o munca pe care o monetizeaza (probabil) deci are nevoie de sponsori, iar unii sponsori doresc ca parte a sponsorizarii ca angajatii lor sa poata prezenta, marketing. 3. Totusi, e in Romania. Nu cred ca se agita o gramada de turisiti sa invadeze Bucurestiul pentru Defcamp. Ca sa fiu sincer, nici Defcon nu ar fi atat de plin daca nu ar fi in Vegas, nu prea se poate face nimic. Parerea mea e simpla: apreciez ce face si gasesc util sa avem o conferinta destul de mare in Romania. A ajutat multi tineri sa aiba motivatie sa faca research, se promoveze si sa isi dezvolte capacitatea de a vorbi in public, e un bun punct de plecare. Nu apreciez pretul care creste mult inainte de conferinta. Mie imi place Defcamp, dar nu pentru prezentari la care rar particip, ci pentru partea de networking. E un fel de RST meeting pentru noi, cei mai vechi de pe forum, care profitam de ocazie sa ne vedem si sa ne intalnim.
  14. Ar trebui sa va uitati la ce prezentari sunt si la DefCamp si la alte conferinte de security: https://def.camp/archives/ Ce se prezinta aici sunt lucrurile pe care "blackhatii" aia pe care unii ii considera smecheri le fura si fac ceva bani cu ele. Unii. Putini. Lucrurile expuse de catre "baietii buni" la astfel de conferinte sunt de sute de ori mai importante decat cateva mizerii care nu raman publice. Dezavantaju baietilor rai e ca 0day-urile sau noile clase de vulnerabilitati, cand sunt expuse public, sunt si reparate rapid.
  15. Nu merita sa se ajunga la burnout din niciun punct de vedere: 1. Manageru nu sta cu cutitu la gatul tau sa te ameninte ca te taie daca nu faci un task 2. Overtime sau stres acceptat e doar 2-3 ore la minim cateva luni cand se intampla ceva "critic" (pentru firma) 3. Si daca se intampla ceva critic pentru firma, nu e firma mea, poate sa crape, exista mii de locuri in IT platite in cel mai rau caz "asemanator" 4. Balanta work-life cum apare in mediul corporate si-o face fiecare individ in parte. Eu imi pun in Outlook ca ma duc sa ma tund (sa nu fiu deranjat :D). Daca e vorba de mers la un medic, indiferent cat de neimportant e (gen analize uzuale sau ma doare un picior) plec de la munca fara sa imi pese de ce se intampla (e.g. sedinte sau alte mizerii mai putin importante ca sanatatea mea) 5. Nu mai apare burnout cand angajatii realizeaza ca firma aia pentru care lucreaza nu e cel mai important lucru pentru ei si ca se pot lipsi oricand de ea
  16. Nu e de joaca cu burnout-ul. Nu am patit si probabil nu am depasit niciodata, dar e relativ usor de prevenit, in functie de situatie. Daca ai firma ta ai probabil sanse mai mari sa o patesti deoarece esti "motivat" sa muncesti foarte mult si sa iti forjezi creierul. E ca si cum ai merge la sala multe ore pe pe, epuizezi muschii. Asa cum muschii au nevoie de odihna, asa are si creierul. Pentru cei care lucreaza in mediul corporate, nu ar trebui sa se ajunga la asta. De multe ori lucrezi pentru o companie condusa de miliardari care nu dau 2 bani pe tine, nu merita efortul de a munci mai mult de cateva ore pe zi. Daca ai lucra pentru un ONG care face un bine in lume, as intelege, merita efortul, altfel nu.
  17. Nu a picat atunci, nici macar nu a fost acela cazul. A picat incet, cu timpul, din motivele enumerate aici si in alte topicuri. Trebuie sa fim putini atenti in legatura cu continutul. Adica eu sai fiu. Nu pot lasa sa se posteze CC-uri, DB dumps si alte balarii, in primul rand ca nu sunt utile oamenilor cu moralitate, care nu si-ar vinde familia pentru bani si care prefera sa faca un ban cinstit, dar si pentru ca eu as avea probleme din cauza unor ratati. Dar permitem continutul "greyhat". La urma urmei sunt pentester de multi ani, gasesc si exploatez vulnerabilitati (chestiile alea pentru care unii numiti pe aici "hackeri", pentru a le exploata, descarca exploit.py si ruleaza). Apoi, acum mult ani am prezentat la Defcon o aplicatie "NetRipper" care intercepteaza trafiul browserelor - nu as zice ca e in zona "whitehat". Pana la urma totul se reduce la cum iti folosesti skill-urile. pe principiul clasic in care ai un cutit, poti face un beef wellington sau poti face buzunare. Cat skill necesita fiecare astfel de actiune? Depinde de la un caz la altul. Eu vad forumul ca pe locul care m-a ajutat sa ajung unde sunt. Nu am Lamborghini si nici nu am nevoie de el, am insa destul sa imi fac toate poftele, sa pot pleca oriunde in lume cand vreau, sa fac cam ce imi doresc. Si educatia de a face totul legal mi-a fost formata pe forum. E datoria mea morala sa duc mai departe aceasta mentalitate si sa ii ajut pe altii sa faca la fel. De aceea forumul este inca in picioare si va mai fi aici. Daca sunt persoane care merg pe calea gresita, e un risc pe care si-l asuma. Sunt din Valcea, am trait anii Ebay, am vazut masini scumpe pe strada dar si cum ulterior s-au golit strazile. Stiu cat de "skilled" sunt oamenii care faceu astfel de mizerii pentru ca am cunoscut mai multi, nu stiau sa faca o pagina de phishing dar aveau lanturi de aur la gat. Apoi poze in duba, cu catuse. Nu am vrut sa fiu asa si nu vreau nici ca altii sa fie asa. Daca topicuri precum acesta par sa fie caterinca si va intrebati "Vai, dar ce mizerie, cum sa intre lumea pe forum?" - aducati-va aminte unde suneteti - tocmai pe topicul de caterinca. Daca voi va credeti mai destepti, nu sunteti. Pentru ca sunteti aici. Pana la urma cred ca RST a fost un forum de caterinca facuta de oameni cu cunostiinte in InfoSec care ocazional se mai ajutau intre ei pe aceste subiecte.
  18. Cum am putea avea discutii de calitate cu astfel de persoane pe forum?
  19. Nytro

    PKfail

    PKfail The Binarly REsearch team discovered a key leak incident from American Megatrends stemming back to 2018. PKfail involves multiple devices and product lines and enables attackers to gain secure boot access similar to BlackLotus. Check for PKfail Now Read report Check for PKfail PKfail: Untrusted Platform Keys Undermine Secure Boot on UEFI Ecosystem ‍ July 25, 2024 The Binarly REsearch Team The Binarly REsearch team today discloses a key leak incident from American Megatrends stemming back to 2018. PKfail involves multiple devices and product lines and enables attackers to gain secure boot access similar to BlackLotus. July 24, 2024 [BRLY-2024-005] Usage of default test keys leads to complete Secure Boot bypass The Binarly REsearch Team has found that hundreds of devices use an insecure Platform Key (PK) which represents the root of trust for UEFI Secure Boot. Affected Devices Sursa: https://www.binarly.io/pkfail
  20. July 4, 2023 API Hacking Techniques How to exploit an API using prototype pollution Introduction I read somewhere that NodeJS has now been downloaded over 1.5 BILLION times. It’s one of the most popular runtimes startups use to build their web apps and APIs. And big businesses use it too. Everyone from LinkedIn and NetFlix to NASA, Uber, and GoDaddy uses it to drive their software. So what? Why is this important? As a cross-platform JavaScript runtime environment that may be driving the APIs you are testing, understanding how to exploit it is essential. We’ve seen plenty of examples of exploiting JavaScript on the client side, but can this be done on the server side that NodeJS delivers? It ends up you can. It’s called server-side prototype pollution (SSPP). And prototype pollution can be a huge vulnerability you need to know how to detect and exploit. So let’s dive in and discuss what prototype pollution is, why it matters, and how you can weaponize it to exploit an API. What is prototype pollution? Prototype pollution is a type of attack vector in which an attacker can inject data into an object prototype. This attack occurs when the user input isn’t sanitized or filtered properly before being parsed by JavaScript. When this happens, malicious data is added to the global scope, which can be executable code that will run immediately and access privileged information. This type of attack is known as “polluting” the prototype chain, which can lead to a whole host of problems, including remote code execution (RCE). To get a more in-depth understanding, you can check out this article on MDN. Let’s look at an example of how this works. Consider this code: obj[a][b] = c; If an attacker can control a and c, then he can set the value of a to __proto__, and the property b will be defined for all existing objects of the application with the value of c. Can you think of some ways you can abuse this? I bet you can. Detecting Server Side Prototype Pollution So before I show you how to detect SSPP, I need to warn you about something. When testing client-side prototype pollution, you can easily reverse all your changes and return to a clean environment by simply refreshing the target web page. That’s more challenging when testing prototype pollution on the server side. Once you pollute a prototype on the server, this change will persist for the entire lifetime of the Node process, and you don’t have any way of resetting it. This means it can impact production workloads and can negatively impact the API you are testing. So please be aware and be careful. I will show you both some destructive and non-destructive ways to detect SSPP. Use good judgment when applying these techniques to a target. Test for polluted property reflection Look for API endpoints that reflect an object that is created or updated. You can usually find this where objects are created in a POST operation or are updated in a PUT operation. Consider this example: POST /api/user HTTP/1.1 Host: vuln-api.com ... { "user":"bob", "firstName":"Bob", "lastName":"Smith", "__proto__":{ "foo":"bar" } } If the target is vulnerable to SSPP, then you may see a new property called foo with the value of bar reflected in the response: HTTP/1.1 200 OK ... { "username":"bob", "firstName":"Bob", "lastName":"Smith", "foo":"bar" } If this works, it’s time to start looking for places in the API where this can be abused. Suppose you can start adding properties to objects through SSPP. In that case, you can significantly change the business logic code flow and behavior, leading to privileges escalation or remote code execution. Test for poisoned server configuration changes While polluting properties and looking for them in a reflected response works, it is a rather destructive methodology to active objects. And the reality is APIs don’t always reflect objects that are created or updated. This means we don’t always get to SEE that the objects have been modified in this way. There are other ways to cause prototype pollution that we can more easily monitor and detect. One such approach is to try to poison properties that match configuration options for the server and see if it alters its behavior. If it does, it strongly indicates that you’ve found a server-side prototype pollution vulnerability you can exploit. There are several techniques you can use for this. Gareth Heyes has published some excellent research on this already. We will look at a few methods that pollute how cache controls work in Express and how to override the spaces in JSON output. Testing for Cache-Control So if you read Gareth’s research, you will know that the Express developers were onto his shenanigans and started hardening their code to prevent prototype pollution abuse for crucial server configurations. But they haven’t gotten them all (yet). One of the best ways to see if you have found an entry point to poison configuration is to see if you can abuse the cache control in Express. Here is how it works. When you send a request with the “If-None-Match” header, you should expect to receive a 304 (not modified) response. However, if you found SSPP, you can attempt to pollute the Object prototype on the server by adding cache-control=”no-cache”. If it works, when you send the original request that returned a 304, you SHOULD now get a 200 back with that data and a corresponding ETag, demonstrating its vulnerable. Just remember you are affecting the caching for the entire API. If you are doing this on a production server, ensure you have approval and are in constant contact with the Ops group to schedule the testing and notify them when to revert the caching state by restarting the processes. Testing for JSON spaces override So Express offers a lot of configurable options in its server framework. One example of this is the fact you can configure how many spaces a JSON object will use to indent any data in the response. You can test this by attempting to pollute the Object prototype by adding “json spaces” and setting it to a larger number than average, like 10 or 15. If you are testing this with Burp Suite, remember to look at the Raw tab, as the Pretty tab will strip out the extra spaces as it tries to give you easy-to-read JSON output. This methodology has recently been fixed in Express 4.17.4. But for all those older Express instances out there, you can still abuse this. If you want to practice this, PortSwigger has a wicked lab for detecting server-side prototype pollution you can mess with. You can test other ways to detect SSP, like through status codes and character set output. Lots to be learned if you check out the SSPP tutorial on Web Security Academy. A simple vulnerable API in NodeJS example So I wanted to give you something to play with to see all this in action. I encourage you to jump into PortSwigger’s Web Security Academy project. But they don’t let you see the code causing these vulnerabilities. So I’ve written a purposely vulnerable API in NodeJS to walk you through this. I hinted at this when showcasing the prototype pollution for cache control earlier in this article. But I will walk you through an example and demonstrate how you can control code flow in a vulnerable API that ultimately lets you execute a dangerous sink, giving you remote code execution on the API server. DO NOT RUN THIS ON A MACHINE CONNECTED TO THE INTERNET. YOU’VE BEEN WARNED. The vulnerable API code OK, so here is the raw code for our vulnerable API: A vulnerable NodeJS/Express API - app.js 'use strict'; const express = require('express'); const bodyParser = require('body-parser') // App const app = express(); app.use(bodyParser.json()) const config = { //allowEval: false } global.users = { "admin": {firstName: "The", lastName: "Admin"}, "bob": {firstName: "Bob", lastName: "Smith"}, } var findUserByUsername = function (username, callback) { if (!users[username]) return callback(new Error( 'No user matching ' + username ) ); return callback(null, users[username]); } function addUser( user ) { Object.assign(users, user); } function updateUser(username, prop, value){ users[username][prop] = value; } app.get("/api/users", (req, res) => { return res.status(200).send(users); }); app.get("/api/users/:username", (req, res) => { var username = req.params.username; findUserByUsername(username, function(error, user) { if (error) return res.status(404).send('User not found'); return res.status(200).send(user); }); }); app.post("/api/users", (req, res) => { var user = JSON.parse(JSON.stringify(req.body)); addUser(user); return res.status(200).send(user); }); app.put("/api/users/:username", (req, res) => { var username = req.params.username; var user = JSON.parse(JSON.stringify(req.body)); for(var attr in user){ updateUser(username, attr, user[attr]); } findUserByUsername(username, function(error, user) { if (error) return res.status(404).send('User not found'); return res.status(200).send(user); }); }) app.post("/api/eval", (req, res) => { var body = JSON.parse(JSON.stringify(req.body)); if (!config.allowEval){ console.log('allowEval not set!'); return res.status(403).send(); } console.log("allowEval IS set. RCE on its way..."); eval(body.code) return res.status(200).send(); }); app.listen(3000, '0.0.0.0'); console.log("Vulnerable API running..."); The things I want you to zoom into are the following: There is a dangerous sink in the POST endpoint for /api/eval (around line 69). It is protected by a simple variable in the config object called allowEval. It’s not set by default, which means this endpoint will never successfully run the dangerous eval() operation. We want to abuse the server and find a way to get here. The PUT endpoint for /api/users is vulnerable to server-side prototype pollution, following the pattern we discussed earlier where obj[a][b] = c, which we can see in the updateUser() function on line 34. OK, so with that outlined, let’s go about exploiting this API and get it to run our own malicious code to send us a remote shell from the API server. Exploring the API So if we examine the code closely, we can see that when updating a user Express will iterate over each property sent to the endpoint and update the object based on the username. If we wanted to update the “admin” user, we could send a payload that looks something like this: PUT /api/user/admin HTTP/1.1 Host: vuln-api.com ... { "firstName":"Bob", "lastName":"The Builder" } So on the first iteration, we would see an update look something like this: users["admin"]["firstName"] = "Bob"; You can see where this is going. This is a classic prototype pollution construct. We control the username, the property, and the value. So let’s leverage this to change the code flow of the API and get us to our dangerous sink. Exploiting the API So let’s first check to see if the /api/eval endpoint is indeed protected from our use: Sure enough, we get a 403, as expected. But look closely at the code for the endpoint. It’s simply checking the config object to see if allowEval is present. It’s not even checking if it’s true or false… it’s just checking if it’s there. Knowing we have a potential SSPP vulnerability in the PUT method for /api/users, let’s see if we can abuse that. Remember when I said this?: If an attacker can control a and c, then he can set the value of a to __proto__, and the property b will be defined for all existing objects of the application with the value of c. So, to cause prototype pollution on the server, we need to reconstruct that as: users["__proto__"]["allowEval"] = true; And that is pretty easy here. We need to change the endpoint URL path and include a JSON payload with that property. It looks something like this in Burp: Alright. Everything is staged. We can now execute the dangerous sink and run code on the API server. Let me first start a netcat listener so I can catch a reverse shell: netcat -lvp 4242 And now, with the allowEval variable polluted in the config object, we can change the code flow and run our malicious code on the /api/eval endpoint. In this case, I will get NodeJS to load a child process and exec a reverse shell: Back on your netcat listener, you should have a shell on the API server: Pwnage via prototype pollution. How sweet it is. Conclusion Now that you know what server-side prototype pollution is and how to exploit it, you should be aware of this vulnerability class in the wild. It can be challenging to detect, as it relies on the code flow of a server framework running JavaScript to achieve its malicious goals. But with enough practice and exploration into different endpoints and payloads, anything is possible. If you find an API running NodeJS during your recon, it’s worth exploring this. If you aren’t sure how to tell if an API is running NodeJS, check out my article on detecting an API’s programming language. So the next time you audit or pentest an API, make sure to look for prototype pollution potentials and see if you can manipulate code flow in your favor! Have fun. Like what you’re reading? Then join the API Hacker Inner Circle. It’s a FREE weekly newsletter designed for developers, testers, and hackers that keeps you up to date with the community and my work. Hope to see you there! Sursa: https://danaepp.com/how-to-exploit-an-api-using-prototype-pollution
      • 1
      • Like
×
×
  • Create New...