SQL Injection — WAF Bypass!
After getting lots of requests for bypass WAF in my DMs about my previous writeup. I decided to make writeup. “Knowledge is free”. Without…Continue reading on Medium »
Read more...
After getting lots of requests for bypass WAF in my DMs about my previous writeup. I decided to make writeup. “Knowledge is free”. Without…Continue reading on Medium »
Read more...
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
THE BRILLIANCE OF iOS.
https://cdn-images-1.medium.com/max/2000/1*JUnEoQ8_R8CbBDeC0UxEIg.png
“An iPod, a phone, an internet mobile communicator... these are NOT three separate devices! And we are calling it iPhone! Today Apple is…
Continue reading on Code TECHNIQ »
THE BRILLIANCE OF iOS.
https://cdn-images-1.medium.com/max/2000/1*JUnEoQ8_R8CbBDeC0UxEIg.png
“An iPod, a phone, an internet mobile communicator... these are NOT three separate devices! And we are calling it iPhone! Today Apple is…
Continue reading on Code TECHNIQ »
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
JWT Tokens Structure CheatSheet
https://cdn-images-1.medium.com/max/1080/1*yCTBl-Q_xnwa1aH_Squd-A.png
https://hacksheets.in/2021/06/07/jwt-token-structure-quicksheet/
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
JWT Tokens Structure CheatSheet
https://cdn-images-1.medium.com/max/1080/1*yCTBl-Q_xnwa1aH_Squd-A.png
https://hacksheets.in/2021/06/07/jwt-token-structure-quicksheet/
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
Medium
JWT Tokens Structure CheatSheet
https://hacksheets.in/2021/06/07/jwt-token-structure-quicksheet/
Solution and explanation of tips for Intigriti’s 0521 XSS challenge — by @GrumpinouT
https://grumpinout.medium.com/solution-and-explanation-of-tips-for-intigritis-0521-xss-challenge-by-grumpinout-7544bad98e59?source=rss------bug_bounty-5
___________________________
@hacking_Attack
@Hacking_Video
https://grumpinout.medium.com/solution-and-explanation-of-tips-for-intigritis-0521-xss-challenge-by-grumpinout-7544bad98e59?source=rss------bug_bounty-5
___________________________
@hacking_Attack
@Hacking_Video
Medium
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…
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 Medium » (https://grumpinout.medium.com/solution-and-explanation-of-tips-for-intigritis-0521-xss-challenge-by-grumpinout-7544bad98e59?source=rss------bug_bounty-5)
___________________________
@hacking_Attack
@Hacking_Video
___________________________
@hacking_Attack
@Hacking_Video
Medium
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…
hacking: security in practice
Anyone know how to decrypt luac files
Its a game file used in cocos2d its original extension is lua and it uses sort of xxtea algorithm to encrypt the file. Any reverse engineering geeks here??
submitted by /u/Bigbangstar
[link] [comments]
___________________________
@hacking_Attack
@Hacking_Video
Anyone know how to decrypt luac files
Its a game file used in cocos2d its original extension is lua and it uses sort of xxtea algorithm to encrypt the file. Any reverse engineering geeks here??
submitted by /u/Bigbangstar
[link] [comments]
___________________________
@hacking_Attack
@Hacking_Video
reddit
Anyone know how to decrypt luac files
Its a game file used in cocos2d its original extension is lua and it uses sort of xxtea algorithm to encrypt the file. Any reverse engineering...
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
ABPTTS : TCP Tunneling Over HTTP/HTTPS For Web Application Servers
ABPTTS uses a Python client script and a web application server page/package[1] to tunnel TCP traffic over an HTTP/HTTPS connection to a web application server. In other words, anywhere that one could deploy a web shell, one should now be able to establish a full TCP tunnel. This permits making RDP, interactive SSH, Meterpreter, and […]
The post ABPTTS : TCP Tunneling Over HTTP/HTTPS For Web Application Servers appeared first on Kali Linux Tutorials.
___________________________
@hacking_Attack
@Hacking_Video
ABPTTS : TCP Tunneling Over HTTP/HTTPS For Web Application Servers
ABPTTS uses a Python client script and a web application server page/package[1] to tunnel TCP traffic over an HTTP/HTTPS connection to a web application server. In other words, anywhere that one could deploy a web shell, one should now be able to establish a full TCP tunnel. This permits making RDP, interactive SSH, Meterpreter, and […]
The post ABPTTS : TCP Tunneling Over HTTP/HTTPS For Web Application Servers appeared first on Kali Linux Tutorials.
___________________________
@hacking_Attack
@Hacking_Video
Kali Linux Tutorials
ABPTTS : TCP Tunneling Over HTTP/HTTPS For Web Application Servers
ABPTTS uses a Python client script and a web application server page/package to tunnel TCP traffic over an HTTP/HTTPS connection to a web application server
RedWarden - Flexible CobaltStrike Malleable Redirector
http://www.kitploit.com/2021/06/redwarden-flexible-cobaltstrike.html
___________________________
@hacking_Attack
@Hacking_Video
http://www.kitploit.com/2021/06/redwarden-flexible-cobaltstrike.html
___________________________
@hacking_Attack
@Hacking_Video
KitPloit - PenTest & Hacking Tools
RedWarden - Flexible CobaltStrike Malleable Redirector
RedWarden - Flexible CobaltStrike Malleable Redirector
(previously known as proxy2's (https://github.com/mgeeky/proxy2) malleable_redirector plugin) Let's raise the bar in C2 redirectors IR resiliency, shall we?
Red Teaming business has seen several (https://bluescreenofjeff.com/2016-04-12-combatting-incident-responders-with-apache-mod_rewrite/) different (https://posts.specterops.io/automating-apache-mod-rewrite-and-cobalt-strike-malleable-c2-profiles-d45266ca642) great (https://gist.github.com/curi0usJack/971385e8334e189d93a6cb4671238b10) ideas on how to combat incident responders and misdirect them while offering resistant C2 redirectors network at the same time. This work combines many of those great ideas into a one, lightweight utility, mimicking Apache2 in it's roots of being a simple HTTP(S) reverse-proxy. Combining Malleable C2 profiles understanding, knowledge of bad IP addresses pool and a flexibility of easily adding new inspection and misrouting logic - resulted in having a crafty repellent for IR inspections.
___________________________
@hacking_Attack
@Hacking_Video
(previously known as proxy2's (https://github.com/mgeeky/proxy2) malleable_redirector plugin) Let's raise the bar in C2 redirectors IR resiliency, shall we?
Red Teaming business has seen several (https://bluescreenofjeff.com/2016-04-12-combatting-incident-responders-with-apache-mod_rewrite/) different (https://posts.specterops.io/automating-apache-mod-rewrite-and-cobalt-strike-malleable-c2-profiles-d45266ca642) great (https://gist.github.com/curi0usJack/971385e8334e189d93a6cb4671238b10) ideas on how to combat incident responders and misdirect them while offering resistant C2 redirectors network at the same time. This work combines many of those great ideas into a one, lightweight utility, mimicking Apache2 in it's roots of being a simple HTTP(S) reverse-proxy. Combining Malleable C2 profiles understanding, knowledge of bad IP addresses pool and a flexibility of easily adding new inspection and misrouting logic - resulted in having a crafty repellent for IR inspections.
___________________________
@hacking_Attack
@Hacking_Video
GitHub
GitHub - mgeeky/proxy2: HTTP/HTTPS proxy with custom plugins loading capability.
HTTP/HTTPS proxy with custom plugins loading capability. - GitHub - mgeeky/proxy2: HTTP/HTTPS proxy with custom plugins loading capability.
Should any invalid inbound packet reach RedWarden - you can redirect, reset or just proxy it away!
Abstract
This program acts as a HTTP/HTTPS reverse-proxy with several restrictions imposed upon inbound C2 HTTP requests selecting which packets to direct to the Teamserver and which to drop, similarly to the .htaccess file restrictions mandated in Apache2's mod_rewrite. RedWarden was created to solve the problem of IR/AV/EDRs/Sandboxes evasion on the C2 redirector layer. It's intended to supersede classical Apache2 + mod_rewrite setups used for that purpose. Features: Malleable C2 Profile parser able to validate inbound HTTP/S requests strictly according to malleable's contract and drop outlaying packets in case of violation (Malleable Profiles 4.0+ with variants covered) Ability to unfilter/repair unexpected and unwanted HTTP headers added by interim systems such as proxies and caches (think CloudFlare) in order to conform to a valid Malleable contract. Integrated curated massive blacklist of IPv4 pools and ranges known to be associated with IT Security vendors Grepable output log entries (in both Apache2 combined access log and custom RedWarden formats) useful to track peer connectivity events/issues Ability to query connecting peer's IPv4 address against IP Geolocation/whois information and confront that with predefined regular expressions (https://www.kitploit.com/search/label/Regular%20Expressions) to rule out peers connecting outside of trusted organizations/countries/cities etc. Built-in Replay attacks mitigation enforced by logging accepted requests' MD5 hashsums into locally stored SQLite database and preventing requests previously accepted. Allows to define ProxyPass statemtents to pass requests matching specific URL onto other Hosts Support for multiple Teamservers Support for many reverse-proxying Hosts/redirection sites giving in a randomized order - which lets load-balance traffic or build more versatile infrastructures Can repair HTTP packets according to expected malleable contract in case some of the headers were corrupted in traffic Sleepless nights spent on troubleshooting "why my Beacon doesn't work over CloudFlare/CDN/Domain Fronting" are over now thanks to detailed verbose HTTP(S) requests/responses logs The RedWarden takes Malleable C2 profile and teamserver's hostname:port on its input. It then parses supplied malleable profile sections to understand the contract and pass through only those inbound requests that satisfied it while misdirecting others. Sections such as http-stager, http-get, http-post and their corresponding uris, headers, prepend/append patterns, User-Agent are all used to distinguish between legitimate beacon's request and unrelated Internet noise or IR/AV/EDRs out of bound packets. The program benefits from the marvelous known bad IP ranges coming from: curi0usJack and the others: https://gist.github.com/curi0usJack/971385e8334e189d93a6cb4671238b10 Using an IP addresses blacklisting along with known bad keywords lookup through Reverse-IP DNS queries and HTTP headers inspection, brings the reliability to considerably increase redirector's resiliency to the unauthorized peers wanting to examine attacker infrastructures. Invalid packets may be misrouted according to three strategies: redirect: Simply redirect peer to another websites, such as Rick Roll. reset: Kill TCP connection straightaway. proxy: Fetch a response from another website, to mimic cloned/hijacked website as closely as possible. This configuration is mandated in configuration file: #
# What to do with the request originating not conforming to Beacon, whitelisting or
# ProxyPass inclusive statements:
# - 'redirect' it to another host with (HTTP 301),
# - 'reset' a TCP connection with connecting client
# - 'proxy' the request, acting as a reverse-proxy against specified action_url
# (may be dangerous if client fetches something it shouldn't supposed to see!)
#
___________________________
@hacking_Attack
@Hacking_Video
Abstract
This program acts as a HTTP/HTTPS reverse-proxy with several restrictions imposed upon inbound C2 HTTP requests selecting which packets to direct to the Teamserver and which to drop, similarly to the .htaccess file restrictions mandated in Apache2's mod_rewrite. RedWarden was created to solve the problem of IR/AV/EDRs/Sandboxes evasion on the C2 redirector layer. It's intended to supersede classical Apache2 + mod_rewrite setups used for that purpose. Features: Malleable C2 Profile parser able to validate inbound HTTP/S requests strictly according to malleable's contract and drop outlaying packets in case of violation (Malleable Profiles 4.0+ with variants covered) Ability to unfilter/repair unexpected and unwanted HTTP headers added by interim systems such as proxies and caches (think CloudFlare) in order to conform to a valid Malleable contract. Integrated curated massive blacklist of IPv4 pools and ranges known to be associated with IT Security vendors Grepable output log entries (in both Apache2 combined access log and custom RedWarden formats) useful to track peer connectivity events/issues Ability to query connecting peer's IPv4 address against IP Geolocation/whois information and confront that with predefined regular expressions (https://www.kitploit.com/search/label/Regular%20Expressions) to rule out peers connecting outside of trusted organizations/countries/cities etc. Built-in Replay attacks mitigation enforced by logging accepted requests' MD5 hashsums into locally stored SQLite database and preventing requests previously accepted. Allows to define ProxyPass statemtents to pass requests matching specific URL onto other Hosts Support for multiple Teamservers Support for many reverse-proxying Hosts/redirection sites giving in a randomized order - which lets load-balance traffic or build more versatile infrastructures Can repair HTTP packets according to expected malleable contract in case some of the headers were corrupted in traffic Sleepless nights spent on troubleshooting "why my Beacon doesn't work over CloudFlare/CDN/Domain Fronting" are over now thanks to detailed verbose HTTP(S) requests/responses logs The RedWarden takes Malleable C2 profile and teamserver's hostname:port on its input. It then parses supplied malleable profile sections to understand the contract and pass through only those inbound requests that satisfied it while misdirecting others. Sections such as http-stager, http-get, http-post and their corresponding uris, headers, prepend/append patterns, User-Agent are all used to distinguish between legitimate beacon's request and unrelated Internet noise or IR/AV/EDRs out of bound packets. The program benefits from the marvelous known bad IP ranges coming from: curi0usJack and the others: https://gist.github.com/curi0usJack/971385e8334e189d93a6cb4671238b10 Using an IP addresses blacklisting along with known bad keywords lookup through Reverse-IP DNS queries and HTTP headers inspection, brings the reliability to considerably increase redirector's resiliency to the unauthorized peers wanting to examine attacker infrastructures. Invalid packets may be misrouted according to three strategies: redirect: Simply redirect peer to another websites, such as Rick Roll. reset: Kill TCP connection straightaway. proxy: Fetch a response from another website, to mimic cloned/hijacked website as closely as possible. This configuration is mandated in configuration file: #
# What to do with the request originating not conforming to Beacon, whitelisting or
# ProxyPass inclusive statements:
# - 'redirect' it to another host with (HTTP 301),
# - 'reset' a TCP connection with connecting client
# - 'proxy' the request, acting as a reverse-proxy against specified action_url
# (may be dangerous if client fetches something it shouldn't supposed to see!)
#
___________________________
@hacking_Attack
@Hacking_Video
KitPloit - PenTest & Hacking Tools
Leading source of security tools, hacking tools, cybersecurity and network security. Learn about new tools and updates in one place.
# Valid values: 'reset', 'redirect', 'proxy'.
#
# Default: redirect
#
drop_action: redirect Below example shows outcome of redirect to https://googole.com:
___________________________
@hacking_Attack
@Hacking_Video
#
# Default: redirect
#
drop_action: redirect Below example shows outcome of redirect to https://googole.com:
___________________________
@hacking_Attack
@Hacking_Video
Use wisely, stay safe.
Requirements
This program can run only on Linux systems as it uses fork to spawn multiple processes. Also, the openssl system command is expected to be installed as it is used to generate SSL certificates. Finally, install all of the Python3 PIP requirements easily with: bash $ sudo pip3 install -r requirements.txt
Usage
Example usage
The minimal RedWarden's config.yaml configuration file could contain: port:
- 80/http
- 443/https
profile: jquery-c2.3.14.profile
ssl_cacert: /etc/letsencrypt/live/attacker.com/fullchain.pem
ssl_cakey: /etc/letsencrypt/live/attacker.com/privkey.pem
teamserver_url:
- 1.2.3.4:8080
drop_action: reset Then, the program can be launched by giving it a path to the config file: bash$ sudo python3 RedWarden.py -c config.yaml
[INFO] 19:21:42: Loading 1 plugin...
[INFO] 19:21:42: Plugin "malleable_redirector" has been installed.
[INFO] 19:21:42: Preparing SSL certificates and keys for https traffic interception...
[INFO] 19:21:42: Using provided CA key file: ca-cert/ca.key
[INFO] 19:21:42: Using provided CA certificate file: ca-cert/ca.crt
[INFO] 19:21:42: Using provided Certificate key: ca-cert/cert.key
[INFO] 19:21:42: Serving http proxy on: 0.0.0.0, port: 80...
[INFO] 19:21:42: Serving https proxy on: 0.0.0.0, port: 443...
[INFO] 19:21:42: [REQUEST] GET /jquery-3.3.1.min.js
[INFO] 19:21:42: == Valid malleable http-get request inbound.
[INFO] 19:21:42: Plugin redirected request from [code.jquery.com] to [1.2.3.4:8080]
[INFO] 19:21:42: [RESPONSE] HTTP 200 OK, length: 5543
[INFO] 19:21:45: [REQUEST] GET /jquery-3.3.1.min.js
[INFO] 19:21:45: == Valid malleable http-get request inbound.
[INFO] 19:21:45: Plugin redirected request from [code.jquery.com] to [1.2.3.4:8080]
[INFO] 19:21:45: [RESPONSE] HTTP 200 OK, length: 5543
[INFO] 19:21:46: [REQUEST] GET /
[...]
[ERROR] 19:24:46: [DROP, reason:1] inbound User-Agent differs from the one defined in C2 profile.
[...]
[INFO] 19:24:46: [RESPONSE] HTTP 301 Moved Permanently, length: 212
[INFO] 19:24:48: [REQUEST] GET /jquery-3.3.1.min.js
[INFO] 19:24:48: == Valid malleable http-get request inbound.
[INFO] 19:24:48: Plugin redirected request from [code.jquery.com] to [1.2.3.4:8080]
[...] The above output contains a line pointing out that there has been an unauthorized, not compliant with our C2 profile inbound request, which got dropped due to incompatible User-Agent string presented: [...]
[DROP, reason:1] inbound User-Agent differs from the one defined in C2 profile.
[...]
Use Cases
Impose IP Geolocation on your Beacon traffic originators
You've done your Pre-Phish and OSINT very well. You now know where your targets live and have some clues where traffic should be originating from, or at least how to detect completely auxiliary traffic. How to impose IP Geolocation on Beacon requests on a redirector? RedWarden comes at help! Let's say, you want only to accept traffic originating from Poland, Europe. Your Pre-Phish/OSINT results indicate that: 89.64.64.150 is a legitimate IP of one of your targets, originating from Poland 59.99.140.76 whereas this one is not and it reached your systems as a regular Internet noise packet. You can use RedWarden's utility lib/ipLookupHelper.py to collect IP Geo metadata about these two addresses: [malleable-redirector-config] Use this small utility to collect IP Lookup details on your target IPv4 address and verify whether your 'ip_geolocation_requirements' section of proxy2 malleable-redirector-config.yaml would match that IP address. If second param is not given - no ">bash$ python3 ipLookupHelper.py
Usage: ./ipLookupHelper.py [malleable-redirector-config]
Use this small utility to collect IP Lookup details on your target IPv4 address and verify whether
your 'ip_geolocation_requirements' section of proxy2 malleable-redirector-config.yaml would match that
___________________________
@hacking_Attack
@Hacking_Video
Requirements
This program can run only on Linux systems as it uses fork to spawn multiple processes. Also, the openssl system command is expected to be installed as it is used to generate SSL certificates. Finally, install all of the Python3 PIP requirements easily with: bash $ sudo pip3 install -r requirements.txt
Usage
Example usage
The minimal RedWarden's config.yaml configuration file could contain: port:
- 80/http
- 443/https
profile: jquery-c2.3.14.profile
ssl_cacert: /etc/letsencrypt/live/attacker.com/fullchain.pem
ssl_cakey: /etc/letsencrypt/live/attacker.com/privkey.pem
teamserver_url:
- 1.2.3.4:8080
drop_action: reset Then, the program can be launched by giving it a path to the config file: bash$ sudo python3 RedWarden.py -c config.yaml
[INFO] 19:21:42: Loading 1 plugin...
[INFO] 19:21:42: Plugin "malleable_redirector" has been installed.
[INFO] 19:21:42: Preparing SSL certificates and keys for https traffic interception...
[INFO] 19:21:42: Using provided CA key file: ca-cert/ca.key
[INFO] 19:21:42: Using provided CA certificate file: ca-cert/ca.crt
[INFO] 19:21:42: Using provided Certificate key: ca-cert/cert.key
[INFO] 19:21:42: Serving http proxy on: 0.0.0.0, port: 80...
[INFO] 19:21:42: Serving https proxy on: 0.0.0.0, port: 443...
[INFO] 19:21:42: [REQUEST] GET /jquery-3.3.1.min.js
[INFO] 19:21:42: == Valid malleable http-get request inbound.
[INFO] 19:21:42: Plugin redirected request from [code.jquery.com] to [1.2.3.4:8080]
[INFO] 19:21:42: [RESPONSE] HTTP 200 OK, length: 5543
[INFO] 19:21:45: [REQUEST] GET /jquery-3.3.1.min.js
[INFO] 19:21:45: == Valid malleable http-get request inbound.
[INFO] 19:21:45: Plugin redirected request from [code.jquery.com] to [1.2.3.4:8080]
[INFO] 19:21:45: [RESPONSE] HTTP 200 OK, length: 5543
[INFO] 19:21:46: [REQUEST] GET /
[...]
[ERROR] 19:24:46: [DROP, reason:1] inbound User-Agent differs from the one defined in C2 profile.
[...]
[INFO] 19:24:46: [RESPONSE] HTTP 301 Moved Permanently, length: 212
[INFO] 19:24:48: [REQUEST] GET /jquery-3.3.1.min.js
[INFO] 19:24:48: == Valid malleable http-get request inbound.
[INFO] 19:24:48: Plugin redirected request from [code.jquery.com] to [1.2.3.4:8080]
[...] The above output contains a line pointing out that there has been an unauthorized, not compliant with our C2 profile inbound request, which got dropped due to incompatible User-Agent string presented: [...]
[DROP, reason:1] inbound User-Agent differs from the one defined in C2 profile.
[...]
Use Cases
Impose IP Geolocation on your Beacon traffic originators
You've done your Pre-Phish and OSINT very well. You now know where your targets live and have some clues where traffic should be originating from, or at least how to detect completely auxiliary traffic. How to impose IP Geolocation on Beacon requests on a redirector? RedWarden comes at help! Let's say, you want only to accept traffic originating from Poland, Europe. Your Pre-Phish/OSINT results indicate that: 89.64.64.150 is a legitimate IP of one of your targets, originating from Poland 59.99.140.76 whereas this one is not and it reached your systems as a regular Internet noise packet. You can use RedWarden's utility lib/ipLookupHelper.py to collect IP Geo metadata about these two addresses: [malleable-redirector-config] Use this small utility to collect IP Lookup details on your target IPv4 address and verify whether your 'ip_geolocation_requirements' section of proxy2 malleable-redirector-config.yaml would match that IP address. If second param is not given - no ">bash$ python3 ipLookupHelper.py
Usage: ./ipLookupHelper.py [malleable-redirector-config]
Use this small utility to collect IP Lookup details on your target IPv4 address and verify whether
your 'ip_geolocation_requirements' section of proxy2 malleable-redirector-config.yaml would match that
___________________________
@hacking_Attack
@Hacking_Video
Attacker
Attacker - The Domain Name Attacker.com is Now For Sale.
Attacker.com is now for sale, lease or rent. Smart domain names compound conversion rates and this domain name for Attacker marketing is a wise investment.
IP address. If second param is not given - no The former brings: bash$ python3 ipLookupHelper.py 89.64.64.150
[dbg] Following IP Lookup providers will be used: ['ip_api_com', 'ipapi_co']
[.] Lookup of: 89.64.64.150
[dbg] Calling IP Lookup provider: ipapi_co
[dbg] Calling IP Lookup provider: ip_api_com
[dbg] New IP lookup entry cached: 89.64.64.150
[.] Output:
{
"organization": [
"UPC Polska Sp. z o.o.",
"UPC.pl",
"AS6830 Liberty Global B.V."
],
"continent": "Europe",
"continent_code": "EU",
"country": "Poland",
"country_code": "PL",
"ip": "89.64.64.150",
"city": "Warsaw",
"timezone": "Europe/Warsaw",
"fulldata": {
"status": "success",
"country": "Poland",
"countryCode": "PL",
"region": "14",
"regionName": "Mazovia",
"city": "Warsaw",
"zip": "00-202",
"lat": 52.2484,
"lon": 21.0026,
"timezone": "Europe/Warsaw",
"isp": "UPC.pl",
"or g": "UPC Polska Sp. z o.o.",
"as": "AS6830 Liberty Global B.V.",
"query": "89.64.64.150"
},
"reverse_ip": "89-64-64-150.dynamic.chello.pl"
} and the latter gives: bash$ python3 ipLookupHelper.py 59.99.140.76
[dbg] Following IP Lookup providers will be used: ['ip_api_com', 'ipapi_co']
[dbg] Read 1 cached entries from file.
[.] Lookup of: 59.99.140.76
[dbg] Calling IP Lookup provider: ip_api_com
[dbg] New IP lookup entry cached: 59.99.140.76
[.] Output:
{
"organization": [
"",
"BSNL Internet",
"AS9829 National Internet Backbone"
],
"continent": "Asia",
"continent_code": "AS",
"country": "India",
"country_code": "IN",
"ip": "59.99.140.76",
"city": "Palakkad",
"timezone": "Asia/Kolkata",
"fulldata": {
"status": "success",
"country": "India",
"countryCode": "IN",
"region": "KL",
"regionName": "Kerala",
"city": "Palakkad",
"zip": "678001",
"lat": 10.7739,
"lon": 76.6487,
"timezone": "Asia/Kolkata",
"isp": "BSNL Internet",
"org": "",
"as": "AS9829 National Internet Backbone",
"query": "59.99.140.76"
},
"reverse_ip": ""
} Now you see that the former one had "country": "Poland" whereas the latter "country": "India". With that knowledge we are ready to devise our constraints in form of a hefty YAML dictionary: ip_geolocation_requirements:
organization:
continent:
continent_code:
country:
- Poland
- PL
- Polska
country_code:
city:
timezone: Each of that dictionary's entries accept regular expression (https://www.kitploit.com/search/label/Regular%20Expression) to be matched upon determined IP Geo metadata of inbound peer's IP address. We use three entries in country property to allow requests having one of specified values. Having that set in your configuration, you can verify whether another IP address would get passed through RedWarden's IP Geolocation discriminator or not with ipLookupHelper utility accepting second parameter:
___________________________
@hacking_Attack
@Hacking_Video
[dbg] Following IP Lookup providers will be used: ['ip_api_com', 'ipapi_co']
[.] Lookup of: 89.64.64.150
[dbg] Calling IP Lookup provider: ipapi_co
[dbg] Calling IP Lookup provider: ip_api_com
[dbg] New IP lookup entry cached: 89.64.64.150
[.] Output:
{
"organization": [
"UPC Polska Sp. z o.o.",
"UPC.pl",
"AS6830 Liberty Global B.V."
],
"continent": "Europe",
"continent_code": "EU",
"country": "Poland",
"country_code": "PL",
"ip": "89.64.64.150",
"city": "Warsaw",
"timezone": "Europe/Warsaw",
"fulldata": {
"status": "success",
"country": "Poland",
"countryCode": "PL",
"region": "14",
"regionName": "Mazovia",
"city": "Warsaw",
"zip": "00-202",
"lat": 52.2484,
"lon": 21.0026,
"timezone": "Europe/Warsaw",
"isp": "UPC.pl",
"or g": "UPC Polska Sp. z o.o.",
"as": "AS6830 Liberty Global B.V.",
"query": "89.64.64.150"
},
"reverse_ip": "89-64-64-150.dynamic.chello.pl"
} and the latter gives: bash$ python3 ipLookupHelper.py 59.99.140.76
[dbg] Following IP Lookup providers will be used: ['ip_api_com', 'ipapi_co']
[dbg] Read 1 cached entries from file.
[.] Lookup of: 59.99.140.76
[dbg] Calling IP Lookup provider: ip_api_com
[dbg] New IP lookup entry cached: 59.99.140.76
[.] Output:
{
"organization": [
"",
"BSNL Internet",
"AS9829 National Internet Backbone"
],
"continent": "Asia",
"continent_code": "AS",
"country": "India",
"country_code": "IN",
"ip": "59.99.140.76",
"city": "Palakkad",
"timezone": "Asia/Kolkata",
"fulldata": {
"status": "success",
"country": "India",
"countryCode": "IN",
"region": "KL",
"regionName": "Kerala",
"city": "Palakkad",
"zip": "678001",
"lat": 10.7739,
"lon": 76.6487,
"timezone": "Asia/Kolkata",
"isp": "BSNL Internet",
"org": "",
"as": "AS9829 National Internet Backbone",
"query": "59.99.140.76"
},
"reverse_ip": ""
} Now you see that the former one had "country": "Poland" whereas the latter "country": "India". With that knowledge we are ready to devise our constraints in form of a hefty YAML dictionary: ip_geolocation_requirements:
organization:
continent:
continent_code:
country:
- Poland
- PL
- Polska
country_code:
city:
timezone: Each of that dictionary's entries accept regular expression (https://www.kitploit.com/search/label/Regular%20Expression) to be matched upon determined IP Geo metadata of inbound peer's IP address. We use three entries in country property to allow requests having one of specified values. Having that set in your configuration, you can verify whether another IP address would get passed through RedWarden's IP Geolocation discriminator or not with ipLookupHelper utility accepting second parameter:
___________________________
@hacking_Attack
@Hacking_Video
KitPloit - PenTest & Hacking Tools
Leading source of security tools, hacking tools, cybersecurity and network security. Learn about new tools and updates in one place.