Giter Club home page Giter Club logo

cfdb's Introduction

Hi there 👋

  • 🔭 I’m currently working on myself (always)
  • 🌱 I’m currently learning Golang and Rust
  • 👯 I’m looking to collaborate on CCDC orchestration
  • 🤔 I’m looking for help with https://github.com/restincode/restincode
  • 💬 Ask me about Red Teaming, Post Exploitation, Windows
  • 📫 How to reach me: [email protected] or Twitter: @mubix
  • 😄 Pronouns: He/Him
  • ⚡ Fun fact: I served 8 years in the Marine Corps.
  • < Certified Checkbox Unchecker

cfdb's People

Contributors

fire0088 avatar hardwaterhacker avatar l0stkn0wledge avatar mubix avatar prometheaninfosec avatar sethsec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfdb's Issues

Server with Unconstrained Delegation

Neo4j Query with Blood Hound data:

MATCH (c1:Computer)-[:MemberOf*1..]->(g:Group) WHERE g.objectsid ENDS WITH '-516' WITH COLLECT(c1.name) AS domainControllers MATCH (c2:Computer {unconstraineddelegation:true}) WHERE NOT c2.name IN domainControllers RETURN c2.name,c2.operatingsystem ORDER BY c2.name ASC

Source: https://hausec.com/2019/09/09/bloodhound-cypher-cheatsheet/

Write up:

The following servers have “Unconstrained Delegation”. This means that if an attacker gained access to one of these servers with administrative rights, they can steal Kerberos tickets (specifically ‘Ticket-Granting-Tickets’ TGTs) that can be reused against the Domain Controllers or other systems. It is recommended that this permission be removed if possible, or the systems be protected as high value targets.

Remote File Inclusion

/*
Title: Remote File Inclusion
Description: Remote File Inclusion Vulnerability
*/

  • LAST UPDATED DATE: 12 - 13 -15
  • LAST UPDATED BY: Mike Hodges

Summary

A file inlcusion vulnerability that allows an attacker to include a file located at an external URL

Capabilities and Risk

  • Allows attackers to execute arbritrary code on the server that could potentially
    lead to complete compromise of the system

Detection

  • Identify scripts that take filenames as parameters
  • Pass an external url to a file as parameter to the application and verify
    that the application rendered/executed the file
  • If not immediately successful, attempt to identify the filter being used
    and craft input that attempts to bypass it

Remediation

Properly validate all input being passed to file inclusion methods.

References

Exploitation

--In progress--

Local File Inclusion

/*
Title: Local File Inclusion
Description: Search engine meta data about the finding
*/

  • LAST UPDATED DATE: 12 - 13 - 15
  • LAST UPDATED BY: Mike Hodges

Summary

Local File Inclusion (LFI) allows the attacker the include files that are already locally present on the server
through the exploitation of a flawed file inclusion procedure.

Capabilities and Risk

  • Could allow attackers to access arbritrary files on the system leading to
    potential information information disclosure
  • In more serious cases, LFI, can lead to remote code execution on the server and
    complete compromise of the system. (https://www.exploit-db.com/papers/12886/)

Detection

  • Identify scripts that take filenames as parameters
  • Use directory traversal sequences in the filename parameter in order to access
    a file that is known to be present on the system
  • If not immediately successful, attempt to identify the filter being used
    and craft input that attempts to bypass it

Remediation

Implement file inclusion procedures that properly sanitize all input.

References

Exploitation

Consider the code below (Credit: owasp.org)

The code is normally used like this:

http://vulnerable_host/preview.php?file=myFile

However an attacker can exploit the lack of sanitization by using null-byte terminators, %00, to effectively end the string before .php is added:

http://vulnerable_host/preview.php?file=../../../../etc/passwd%00

This would results like the following:

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
alex:x:500:500:alex:/home/alex:/bin/bash
margo:x:501:501::/home/margo:/bin/bash

SQL Injection

/*
Title: SQL Injection
Description: SQL Injection SQLi database vulnerability
*/

  • LAST UPDATED DATE: 12 - 13 -15
  • LAST UPDATED BY: Mike Hodges

Summary

A code injection technique that allows an attacker to make arbritrary calls
to the backend database.

Capabilities and Risk

SQL Injection allows an attacker to access entries in the application database
and in some cases write to the database which can lead to code execution on
the server.

It can lead to partial or complete loss of the database entries and in
the worst case scenario allow an attacker to gain a foothold on the machine.

Detection

  • Identify where user input being used as data for a database call (i.e. username)
  • Attempt to inject SQL meta-characters and commands to modify/create a query in order to view the database contents

Remediation

Properly sanatize all database calls using both a whitelist of known good input and blacklist of potentially dangerous meta characters and functions.

References

Different Section

Can we have sections added for OSINT, Physical Security, and possibly Business Practices or something that would relate to social engineering and users being exploited by phishing?

Java Deserialization: Apache Commons Collections Library

/*
Title: Apache Commons Collections Deserialization
Description: Search engine meta data about the finding
*/

  • LAST UPDATED DATE: 12 - 13 - 15
  • LAST UPDATED BY: Mike Hodges

Summary

The Apache Commons Collections Java library insecurely deserializes data
and with InvokerTransformer an attacker can build serializable objects that
will execute arbitrary Java code.

Capabilities and Risk

Any application that has the Apache Commons Collection library in its Java
class path and accepts serialized data can be coerced into executing arbrtrary code
on the attacker's behalf

This poses a high risk to any server running the ACC library and could
lead to complete compromise of the system.

Detection

Verify the server is running Java with the Apache Commons Collections in the class path.

Identify serialized Java objects being sent ot the application

Replace the serialized Java object with your base-64 encoded payload and verify.

Remediation

Santizie all deserialized data being processed to the application

Update the Apache Commons Collection to the newest version.
Only fixes some of the insecure functions, some still exist
From Adobe's Statement:
"However, to be clear: this is not the only known and especially not unknown useable gadget. So replacing your installations with a hardened version of Apache Commons Collections will not make your application resist this vulnerability.

References

User Passwords Stored in Active Directory

There are X users who have their passwords stored in active directory. These accounts were verified to have these passwords still active and the accounts are enabled. This is usually the result of an application creating a user in Active Directory programmatically using direct LDAP queries. It is recommended these accounts be investigated to see if they are still in use and if the passwords can be changed. The effect is that any user in the domain can query LDAP for these passwords in clear text.

Directory Traversal

  • LAST UPDATED DATE: 12 - 13 - 15
  • LAST UPDATED BY: Mike Hodges

Summary

Directory traversal is an HTTP exploit which allows attackers to access restricted directories and/or execute commands outside of the web server's root directory.

Capabilities and Risk

  • Access restricted files such as application source code with the permissions of the web server

Detection

  • Identify user input that the application uses in order to retrieve files and attempt to access higher directories
    by inputting a ../ ex. ../../../../etc/passwd.
  • You will often encounter input filters that discourage simple ../ so try different
    encodings and patterns such as url encoded or unicode encoded characters.

Remediation

  • Properly sanitize user input that is used to access files on the server

References

Exploitation

Input example source code here

Suggestion for handling attribution

Instead of having "LAST UPDATED BY:" in the template, how about handling contributions the way NMAP NSE's do, where you just list all of the people who have made contributions to that template on an "author(s)" line. In practice, if you make a contribution, you just append your name to the list of authors. I foresee multiple people having a hand in many of these findings, and it would be nice to see which ones have had the most eyes on them.

For example, from the http-enum nmap NSE script:

author = "Ron Bowes, Andrew Orr, Rob Nicholls"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.