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

@Hacking_Video
@Hacking_attack
Download Telegram
The very last line tells you whether packet would be blocked or accepted. And that's all! Configure your IP Geolocation constraints wisely and safely, carefully inspect RedWarden logs for any IP Geo-related DROP entries and keep your C2 traffic nice and tidy!
Repair tampered Beacon requests
If you happen to use interim systems such as AWS Lambda or CloudFlare as your Domain Fronting (https://www.kitploit.com/search/label/Domain%20Fronting) / redirectors, you have surely came across a situation where some of your packets couldn't get accepted by the Teamserver as they deviated from the agreed malleable contract. Was it a tampered or removed HTTP header, reordered cookies or anything else - I bet that wasted plenty hours of your life. To combat C2 channels setup process issues and interim systems tamperings, RedWarden offers functionality to repair Beacon packets. It does so by checking what Malleable Profile expects packet to be and can restore configured HTTP headers to their agreed values according to the profile's requirements. Consider following simple profile: http-get {
set uri "/api/abc";
client {

header "Accept-Encoding" "gzip, deflate";

metadata {
base64url;
netbios;
base64url;
parameter "auth";
}
}
...
You see this Accept-Encoding? Every Beacon request has to come up with that Header and that value. What happens if your Beacon hits CloudFlare systems and they emit a request that will be stripped from that Header or will have Accept-Encoding: gzip instead? Teamserver will drop the request on the spot. By setting this header in RedWarden configuration section dubbed protect_these_headers_from_tampering you can safe your connection.: # protect_these_headers_from_tampering: - Accept-Encoding ">#
# If RedWarden validates inbound request's HTTP headers, according to policy drop_malleable_without_expected_header_value:
# "[IP: DROP, reason:6] HTTP request did not contain expected header value:"
#
# and senses some header is missing or was overwritten along the wire, the request will be dropped. We can relax this policy
# a bit however, since there are situations in which Cache systems (such as Cloudflare) could tamper with our requests thus
# breaking Malleable contracts. What we can do is to specify list of headers, that should be overwritten back to their values
# defined in provided Malleable profile.
#
# So for example, if our profile expects:
# header "Accept-Encoding" "gzip, deflate";
#
# but we receive a request having following header set instead:
# Accept-Encoding: gzip
#
# Because it was tampered along the wire by some of the interim systems (such as web-proxies or caches), we can
# d etect that and set that header's value back to what was expected in Malleable profile.
#
# In order to protect Accept-Encoding header, as an example, the following configuration could be used:
# protect_these_headers_from_tampering:
# - Accept-Encoding
#
#
# Default:
#
protect_these_headers_from_tampering:
- Accept-Encoding
Example outputs
Let's take a look at the output the proxy produces. Under verbose: True option, the verbosity will be set to INFO at most telling accepted requests from dropped ones. The request may be accepted if it confronted to all of the criterias configured in RedWarden's configuration file. Such a situation will be followed with [ALLOW, ...] entry log: [INFO] 2021-04-24/17:30:48: [REQUEST] GET /js/scripts.js
[INFO] 2021-04-24/17:30:48: == Valid malleable http-get (variant: default) request inbound.
[INFO] 2021-04-24/17:30:48: [ALLOW, 2021-04-24/19:30:48, 111.222.223.224] "/js/scripts.js" - UA: "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
[INFO] 2021-04-24/17:30:48: Connected peer sent 2 valid http-get and 0 valid http-post requests so far, out of 15/5 required to consider him temporarily trusted

___________________________
@hacking_Attack
@Hacking_Video
[ERROR] 2021-04-24/16:48:29: [REDIRECTING invalid request from 128.14.211.186 (zl-dal-us-gp3-wk107.internet-census.org)] GET /

Drop Policies Fine-Tuning
There are plenty of reasons dictating whether request can be dropped. Each of these checks can be independently turned on and off according to requirements or in a process of fine-tuning or erroneus decision fixing: Excerpt from example-config.yaml: section with URI-append containing prepend/append fragments drop_malleable_with_invalid_uri_append: True ">#
# Fine-grained requests dropping policy - lets you decide which checks
# you want to have enforced and which to skip by setting them to False
#
# Default: all checks enabled
#
policy:
# [IP: ALLOW, reason:0] Request conforms ProxyPass entry (url="..." host="..."). Passing request to specified host
allow_proxy_pass: True
# [IP: ALLOW, reason:2] Peer's IP was added dynamically to a whitelist based on a number of allowed requests
allow_dynamic_peer_whitelisting: True
# [IP: DROP, reason:1] inbound User-Agent differs from the one defined in C2 profile.
drop_invalid_useragent: True
# [IP: DROP, reason:2] HTTP header name contained banned word
drop_http_banned_header_names: True
# [IP: DROP, reason:3] HTTP header value contained banned word:
drop_http_banned_header_value: True
# [IP: DROP, reason:4b] peer's reverse-IP lookup contained banned word
drop_dangerous_ip_reverse_lookup: True
# [IP: DROP, reason:4e] Peer's IP geolocation metadata contained banned keyword! Peer banned in generic fashion.
drop_ipgeo_metadata_containing_banned_keywords: True
# [IP: DROP, reason:5] HTTP request did not contain expected header
drop_malleable_without_expected_header: True
# [IP: DROP, reason:6] HTTP request did not contain expected header value:
drop_malleable_without_expected_header_value: True
# [IP: DROP, reason:7] HTTP request did not contain expected (metadata|id|output) section header:
drop_malleable_without_expected_request_section: True
# [IP: DROP, reason:8] HTTP request was expected to contain (metadata|id|output) section with parameter in URI:
drop_malleable_without_request_section_in_uri: True
# [IP: DROP, reason:9] Did not found append pattern:
drop_malleable_without_prepend_pattern: True
# [IP: DROP, reason:10] Did not found append pattern:
drop_malleable_without_apppend_patt ern: True
# [IP: DROP, reason:11] Requested URI does not aligns any of Malleable defined variants:
drop_malleable_unknown_uris: True
# [IP: DROP, reason:12] HTTP request was expected to contain <> section with URI-append containing prepend/append fragments
drop_malleable_with_invalid_uri_append: True By default all of these checks are enforced. Turning debug: True will swamp your console buffer with plenty of log lines describing each step RedWarden takes in its complex decisioning process. If you want to see your requests and responses full bodies - set debug and trace to true and get buried in logging burden!
FAQ
- Can this program run without Malleable Profile? Yes it can. However request inspection logic will be turned off, the rest should work fine: IP Geolocation enforcement, reverse-lookup logic, banned IPs list, etc. - Can this program be easily adapted to other C2 frameworks as well? Like Mythic, Covenant, etc? Easily no. With some efforts - yes. As I've described below, the tool is written badly that will make other C2s adaptation a pain. However that's totally doable given some time and effort. - My packets are getting dropped. Why? Try to enable debug: True and trace: True to collect as many log as possible. Then you would need to go through logs and inspect what's going on. Do the packets look exactly how you expected them in your Malleable profile? Or maybe there was a subtle tamperation along the network that causes RedWarden to drop the packet (and it could make Teamserver drop it as well?).
Known Issues

___________________________
@hacking_Attack
@Hacking_Video
It may add a slight overhead to the interactive sleep throughput ProxyPass processing logic is far from perfect and is really buggy (and oh boy its ugly!). Weird forms of configuration files can derail RedWarden parser and make it complain. Easiest approach to overcome this would be to copy example-config.yaml and work on it instead.
Oh my god why is this code such an engineerical piece of crap?
The code is ONE FUCKING BIG HELL OF A MESS - I admit that - and there's an honest reason for that too: the project was being developed 90% during the actual Red Team engagements. As we all know, these sorts of engagements entail so many things to do, leaving close to no time for a proper complex tool development. Not to mention criticality of this program in project's setup. The tool initialy started as a simple proxy script written in Python2, to then evolve as a proxy with plugins, received malleable_redirector plugin - and since then I've been trying really hard to keep proxy2 maintain backwards compatibility (poor me, I was like Microsoft!) with other plugins I've made for it and stick to its original purpose. Time has come though to let it go, rebrand it and start fixing all the bad code smells introduced. With all that said, please do express some level of compassion for me when raising issues, submitting pull requests and try to help rather than judge! :-) Thanks!
TODO
Research possibility to use Threat Intelligence (https://www.kitploit.com/search/label/Threat%20Intelligence) feeds to nefarious purposes - like for instance detecting Security Vendors based on IPs Add support for MaxMind GeoIP database/API Implement support for JA3 signatures in both detection & blocking and impersonation to fake nginx/Apache2/custom setups. Add some unique beacons tracking logic to offer flexilibity of refusing staging and communication processes at the proxy's own discretion Introduce day of time constraint when offering redirection capabilities (proxy only during office hours) Add Proxy authentication and authorization (https://www.kitploit.com/search/label/Authorization) logic on CONNECT/relay. Add Mobile users targeted redirection Add configuration options to define custom HTTP headers to be injected, or ones to be removed Add configuration options to require specific HTTP headers to be present in requests passing ProxyPass criteria. Interactive interface allowing to type simple characters controlling output logging verbosity, similarly to Nmap's Rewrite Malleable profile parser logic to pyMalleableC2 (https://github.com/Porchetta-Industries/pyMalleableC2). When I first started coding my own parser logic, there was no such toolkit on Github. Refactor all the codebase
Author
">Mariusz B. / mgeeky, '19-'21



Download RedWarden (https://github.com/mgeeky/RedWarden)

___________________________
@hacking_Attack
@Hacking_Video
Solution and explanation of tips for Intigriti’s 0521 XSS challenge — by @GrumpinouT

This month’s (May 2021) XSS challenge by Intigriti was created by me (with some additions by Inti). In this article, I will explain my…Continue reading on InfoSec Write-ups »
Read more...
Install kxss on Kali Linux

kxss : to identify XSS vulnerable parameters.Continue reading on Medium »
Read more...
My First Bounty on a Simple Bug

Hello Folks 👋 , in this write-up I will tell you how I ended up getting a 150$ bounty on a Bugcrowd Program.Continue reading on Medium »
Read more...
Hacking Articles Tips Tricks Videos Tutorials
Photo
Exploit Collector
Backdoor.Win32.Neakse.bit Insecure Permissions

https://4.bp.blogspot.com/-gQsa2Au6OFw/WWlvKe9cGFI/AAAAAAAAIME/7MuhuX3Jqy0CeEu0oyVXmXST8BDpKvIGgCLcBGAs/s1600/h15.png
Backdoor.Win32.Neakse.bit malware suffers from an insecure permissions vulnerability.

MD5 | 9ead3ac44ed6c17d914d36b4ab7b6698

Download
Discovery / credits: Malvuln - malvuln.com (c) 2021
Original source: https://malvuln.com/advisory/20863ba09c31037b1b3220fc6da100e1.txt
Contact: malvuln13@gmail.com
Media: twitter.com/malvuln

Threat: Backdoor.Win32.Neakse.bit
Vulnerability: Insecure Permissions
Description: The malware creates two insecure dirs housing DLLs under c:\ drive and grants change (C) permissions to the authenticated user group. Standard users can rename the executables dropped by the malware to disable it or replace it with their own executable. Then wait for a privileged user to logon to the infected machine to potentially escalate privileges.
Type: PE32
MD5: 20863ba09c31037b1b3220fc6da100e1
Vuln ID: MVID-2021-0238
Disclosure: 06/06/2021

Exploit/PoC:
C:\>cacls codecs
C:\codecs BUILTIN\Administrators:(OI)(CI)(ID)F
NT AUTHORITY\SYSTEM:(OI)(CI)(ID)F
BUILTIN\Users:(OI)(CI)(ID)R
NT AUTHORITY\Authenticated Users:(ID)C
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(ID)C
C:\>dir codecs
Volume in drive C has no label.

Directory of C:\codecs

04/06/2004 12:04 AM 548,919 colorcvt.dll
04/06/2004 12:05 AM 65,602 cook.dll
04/06/2004 12:07 AM 266,306 erv3.dll
04/06/2004 12:08 AM 479,298 erv4.dll
04/06/2004 12:05 AM 155,702 ralf.dll
04/06/2004 12:05 AM 102,465 sipr.dll
6 File(s) 1,618,292 bytes

C:\>cacls common
C:\common BUILTIN\Administrators:(OI)(CI)(ID)F
NT AUTHORITY\SYSTEM:(OI)(CI)(ID)F
BUILTIN\Users:(OI)(CI)(ID)R
NT AUTHORITY\Authenticated Users:(ID)C
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(ID)C
C:\>dir common
Volume in drive C has no label.

Directory of C:\common

12/06/2002 02:02 PM 395,776 encn3260.dll
04/06/2004 12:08 AM 368,732 rembrdcst.dll
2 File(s) 764,508 bytes
Disclaimer: The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise. Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information or exploits by the author or elsewhere. Do not attempt to download Malware samples. The author of this website takes no responsibility for any kind of damages occurring from improper Malware handling or the downloading of ANY Malware mentioned on this website or elsewhere. All content Copyright (c) Malvuln.com (TM).

Source:packetstormsecurity.com

___________________________
@hacking_Attack
@Hacking_Video