UNDERCODE COMMUNITY
2.68K subscribers
1.23K photos
31 videos
2.65K files
80.3K links
๐Ÿฆ‘ Undercode Cyber World!
@UndercodeCommunity


1๏ธโƒฃ World first platform which Collect & Analyzes every New hacking method.
+ AI Pratice
@Undercode_Testing

2๏ธโƒฃ Cyber & Tech NEWS:
@Undercode_News

3๏ธโƒฃ CVE @Daily_CVE

โœจ Web & Services:
โ†’ Undercode.help
Download Telegram
Forwarded from Exploiting Crew (Pr1vAt3)
Forwarded from Exploiting Crew (Pr1vAt3)
๐Ÿฆ‘๐๐ž๐ง๐ญ๐ž๐ฌ๐ญ๐ข๐ง๐  ๐†๐–๐“-๐‘๐๐‚ ๐€๐ฉ๐ฉ๐ฌ ๐Ÿ‘‡

Recently I had the "honor" to pentest an app using GWT-RPC requests

GWT-RPC stands for Google Web Toolkit Remote Procedure Calls

You can think about it as an alternative to JSON, XML and forms data

So if you see something like the image below, you are dealing with GWT-RPC

----
H๐จ๐ฐ ๐๐จ ๐ฐ๐ž ๐ฉ๐ž๐ง๐ญ๐ž๐ฌ๐ญ ๐ข๐ญ?

1. ๐‡๐ข๐๐๐ž๐ง ๐…๐ฎ๐ง๐œ๐ญ๐ข๐จ๐ง๐ฌ -> using the GWTMap tool, enumerate all functions available in the obfuscated {hex} . cache . js file. If you have new functions, use the --rpc flag and send direct commands to them as there's a high chance that they are not protected

2. ๐๐ซ๐จ๐ค๐ž๐ง ๐€๐œ๐œ๐ž๐ฌ๐ฌ ๐‚๐จ๐ง๐ญ๐ซ๐จ๐ฅ -> chances are developers would assume the protocol is too complicated and hard to read (i.e: it uses some obfuscation). Using two different accounts, replay the requests generated by the app using both session cookies. If it works -> Broken Access Control

3. ๐ˆ๐ง๐ฃ๐ž๐œ๐ญ๐ข๐จ๐ง -> all values that look like user controlled data in the String Table and Payload sections can (and should) be fuzzed for common injections attacks, including SQLi, command injection, SSRF, SSTI, etc. but avoid changing the indexes as this might generate an invalid GWT-RCP format

4. ๐’๐ž๐ซ๐ข๐š๐ฅ๐ข๐ณ๐š๐ญ๐ข๐จ๐ง - the String Table + Payloads are used together to define and serialize the data provided through the request. Insecure deserialization attacks are an attack vector worth considering

Ref: Andrei Agape
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
Forwarded from Exploiting Crew (Pr1vAt3)
Forwarded from Exploiting Crew (Pr1vAt3)
๐Ÿฆ‘How do you secure remote access in ICS/OT?

Here are 5 tips on how to allow remote access AND secure it.

As much as possible.

1. Multifactor Authentication

This one goes without saying. While MFA isn't a silver bullet...

It vastly decreases the chance an unauthorized party can establish a VPN connection without a valid second factor.

2. On-demand Access

Besides MFA, this is my favorite.

Always assume that any VPN user's system could be compromised.

-> Your vendors.
-> Your employees.
-> Your other third parties.

Once compromised, do you want an attacker having 24x7x365 access into your ICS/OT network?

Of course not.

Limit VPN access to only the time windows in which access is required.

Have the outside parties schedule or call when access is required.

Many say that this is burdensome and too much overhead.

Which I can understand.

You'll have to weigh the advantages and disadvantages for your environment.

For me, I always push for on-demand access to greatly reduce the risk.

3. Implement Harden Jump Hosts

Require remote parties to login to a jump host before accessing ICS/OT resources.

There could even be multiple jump hosts for them to authenticate to.

For these jump hosts, ensure that each system is hardened.

Also ensure that the host's network connectivity is limited to only the IP addresses and ports that are necessary.

4. Monitor for Suspicious Activity

No security solution is perfect.

A VPN can become compromised.

Attackers can gain access to your network.

For when they do, it's important to be watching.

95% of ICS/OT networks don't perform network security monitoring.

This doesn't mean you shouldn't.

Watching your network activity. Your host activity.

All for signs of compromise.

Which brings us to...

5. Record and Monitor Jump Host Activity

This one isn't high on many lists.

But if you have the resources, watch in real-time what remote parties are doing on jump hosts.

Ensure all activity looks legitimate.

And if something looks suspicious, take action!

Thanks for checking out the list!

P.S. Do you know someone with unsecured remote access?


Ref: Mike HolcombMike Holcomb
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
Forwarded from Exploiting Crew (Pr1vAt3)
Forwarded from Exploiting Crew (Pr1vAt3)
Getting RCE via Worst Fit ๐Ÿคฆ

If you watched the Black Hat talk from Orange Tsai and Splitline last week in London, you might have found yourself shocked to see that a code snippet like the one below can lead to RCE.

Why can this be hacked? ๐Ÿค”

Well, because you can inject double quotes... But can you? Not really, because 'subprocess.run()' would handle them securely. What you can do instead though is inject the odd fullwidth quotation mark: ๏ผ‚

This shouldn't be a problem because surely shells wouldn't interpret this, right?

Wrong. Since Windows historically stores a lot of things, like cmdlines, environment variables, etc., in both ANSI and UTF-16, we run into a problem... How can you represent a value in ANSI if that value doesn't actually exist in the character set?

Meet "Best Fit". Which converts certain UTF-16 characters to similar-looking ANSI characters (such as converting a โˆž to an 8. Or converting a ยฅ to a backslash. Or converting a ๏ผ‚to a normal double quote).

This means that you can pwn this code snippet by injecting something like:

๏ผ‚ --use-askpass=calc ๏ผ‚

This pops calculator.

If you want to play around a bit with this, you may want to check out this PoC that I've created: https://lnkd.in/dBgeFscq

Also, you may want to check out https://worst[.]fit/ which tracks a list of Windows binaries vulnerable to this attack.

The worst part? Microsoft says this isn't a Windows vulnerability while open-source library maintainers say it is. So who is gonna fix it? ๐Ÿคทโ€โ™‚๏ธ

Ref: Florian Walter
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–