LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-25-2021, 11:39 AM   #1
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
PERL: is this possible? making a mitm server listening at localhost.


is it possible to do a man in the middle (proxy)server listening at 127.0.0.1 : 80 - 443 tcp, and then inspect traffic with "whatever", like setting up browser to use localhost proxy?

i am askin this because i dont want to try to do something that isnt possible i know http is possible but dont know if https is possible.

i have played with mitm proxy : https://mitmproxy.org/ but i would rather do it myself with perl.

thanks.
 
Old 02-25-2021, 03:44 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,157

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
To do a mitm on encrypted traffic you need to decrypt then encrypt. To decrypt you need a private key trusted by the client. You would have to make your own and import it into the trusted file for a browser or else the browser will pop up the Untrusted Site! warning.
 
1 members found this post helpful.
Old 02-25-2021, 06:46 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Looks like there are Perl libraries for LetsEncrypt, so... yes?
 
1 members found this post helpful.
Old 02-26-2021, 03:09 AM   #4
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

Original Poster
Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Quote:
Originally Posted by smallpond View Post
To do a mitm on encrypted traffic you need to decrypt then encrypt. To decrypt you need a private key trusted by the client. You would have to make your own and import it into the trusted file for a browser or else the browser will pop up the Untrusted Site! warning.
yes, that was what you had to do with mitmproxy.

Quote:
Looks like there are Perl libraries for LetsEncrypt, so... yes?
ill take a look on that module.

thanks guys
 
  


Reply

Tags
browser, localhost, mitm, perl, proxy



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding how iptables (+arpspoof) works in a "soft" mitm attack Showtime Linux - Networking 2 05-05-2012 06:13 PM
mitm? ubee Linux - Networking 1 12-04-2009 03:21 PM
MITM in SSL/TLS gustavolinux Linux - Security 1 11-17-2008 12:16 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
Receiving an MITM warning when ssh'ing gonzalezjay Linux - Security 1 10-17-2003 05:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration