当前位置:网站首页>6-10 vulnerability exploitation SMTP experimental environment construction
6-10 vulnerability exploitation SMTP experimental environment construction
2022-07-25 01:45:00 【Mountain Rabbit 1】

Mail sending and receiving model
Send mail using smtp agreement , Simple mail transfer protocol , Occupy 25 Port no. , Send the corresponding message . And mail is being used pop3 and imap agreement , Respectively take up 110 and 143 port

The basic model of mail receiving and sending
Add host name and domain name
Directly transmit mail locally , Yes, we need to set the host name and domain name locally , And analyze
In order to build a mail server locally , Therefore, the corresponding content needs to be modified . Make it possible to resolve domain names locally . Equivalent to the local computer doing a loopback domain name resolution , It and windows,etc Under the hosts File similar
stay linux Next , We use it directly
sudo gedit /etc/hosts
127.0.0.1 mail.test.lab test
sudo gedit /etc/hostname
test
Use after modification reboot To restart , Make changes effective .
Use hostname or hostname -f Check whether the modification is successful
sudo gedit /etc/hosts
127.0.0.1 mail.test.lab test

We set up a IP Mapping of address and domain name , And this domain name is test
sudo gedit /etc/hostsname
test

reboot
We wait for the restart to complete
hostname
hostname -f

Modification successful , Check the current domain name and hostname
ubuntu install postfix
smtp Protocol Software , because postfix It's very popular smtp Software , therefore ubuntu Is integrated into the main library of postfix, You can directly use the following command to install :
sudo apt-get install postfix
choice internet site

mail.test.lab > determine


These configurations are based on our previous design , Dependencies like... Are being installed here , Installation successful , We can't use... Directly , We need to do some configuration , Can be used
Modify the configuration file :
sudo gedit /etc/postfix/main.cf
Add subnet information
inet_protocols = ipv4
home_mailbox = Maildir/
Restart the service after the modification postfix
sudo service postfix restart, And then use netstat -nlv To see the corresponding 25 Whether the port is open .
sudo gedit /etc/postfix/main.cf
192.168.1.10/24
ipv4
home_mailbox = Maildir/

sudo service postfix restart
netstat -nlv

We can see it 25 Port no. , It is in the monitoring state here , It also shows our smtp Service started successfully , And completed the corresponding simple configuration , Of course, there are some options , We can according to the actual needs , To configure , Here we only make a simple configuration , So that our later experiments can be carried out smoothly
ubuntu install dovecot
We want to receive the corresponding software , We need to configure dovecot Software
sudo apt-get install dovecot-imapd dovecot-pop3d

After installation , As long as the corresponding configuration
sudo gedit /etc/dovecot/conf.d/10-auth.conf
disable_plaintest_auth = yes
auth_mechanisms = plain login
// So that we can use dovecot Log in


sudo gedit /etc/dovecot/conf.d/10-mail.conf
mail_location= maildir:/home/%u/Maildir

Configure directory , Next, configure its port
sudo gedit /etc/dovecot/conf.d/10-master.conf
Set up port =143 port 110

netstat -pantu

Check whether the current port is enabled 110 and 143, And we are in the configuration just now , So our configuration port is 110 and 143, After we've installed it , It will turn on 110 and 143, During monitoring , We really need to configure accordingly
Modify the permissions
unix_listerner auth-usrdb{
mode = 0666
user = postfix
group = postfix
}
Restart dovecot service sudo service dovecot restart Use netstat -nlv Check the service port 110 143 Open or not
Only after we restart these services , We can take effect , Before restarting these services , We need to change these permissions
sudo gedit /etc/dovecot/conf.d/10-master.conf

sudo service dovecot restart
netstat -nlv

We can see 25、110 and 143 In a listening state , Indicates that our service is on
We are finished now smtp Protocol Software postfix,pop Protocol Software dovecot Installation and configuration , This is the time , We can use it
边栏推荐
- Data management process model of science and technology planning project
- Service address dynamic awareness of Nacos registry
- [basic usage of STL]
- [leetcode] 3. Longest substring without repeated characters - go language problem solution
- The two supply chain centers of HEMA launched the "background" of innovative research and development of multi format commodities
- Green low-carbon Tianyi cloud, a new engine of digital economy!
- Research and application of scientific data management strategy for high energy synchrotron radiation source
- Example analysis of recombinant monoclonal antibody prosci CD154 antibody
- [summer daily question] Luogu p1605 maze
- An article explains unsupervised learning in images in detail
猜你喜欢
![[linear DP] Digital triangle](/img/8c/f7392733ef8e13b20c394da8b4c403.png)
[linear DP] Digital triangle

The solution of displaying garbled code in SecureCRT

Take C language from 0 to 1 - program structure and use examples

How to use ES6 async and await (basic)

Worthington cytochrome c digestion study carboxypeptidase B scheme

Hcip - BGP - border gateway protocol

Multithreading and high concurrency (II) -- synchronized locking and unlocking process

Mobile Robotics (3) Kalman filter

Specificity and five applications of Worthington alcohol dehydrogenase

iptables :chains, target
随机推荐
Beijing Zhun electric clock, Beidou clock server, GPS network time server, NTP satellite timing system
Interview questions
Talk about resume optimization and interview skills of algorithm post!
Windows security hardening -- close unnecessary ports
Jsonp solves cross domain plug-ins (JS, TS)
Scientific data center resources and user access control system
Deamnet|filenotfounderror: [winerror 3] the system cannot find the specified path.: '/ Datasettest\\Set12‘
[29. DFS depth is preferred]
Data management process model of science and technology planning project
Alibaba cloud released the white paper "upgrade - standardization of data warehouse upgrade delivery"
From casting sword to defending sword: the way to build the efficiency platform of didi project
MySQL Basics (concepts, common instructions)
How to use ES6 async and await (basic)
WhatsApp web for usability testing of software testing technology
Take the first place in the International Olympic Games in mathematics, physics and chemistry, and win all the gold medals. Netizen: the Chinese team is too good
Research and application of scientific data management strategy for high energy synchrotron radiation source
【Power Shell】Invoke-Expression ,Invoke-Expression -Command $activateCommand; Error or power shell failed to activate the virtual environment
Example analysis of recombinant monoclonal antibody prosci CD154 antibody
Mongodb security cluster construction
Take C language from 0 to 1 - program structure and use examples