<div dir="ltr"><div style>Здравствуйте!</div><div style>С PGP пока не разобрался, остальное здесь. Пришлось использовать факультетский почтовый сервер, потому что все другие (в том числе сервер домашнего провайдера) отказывались передавать сообщения на произвольные адреса (как впрочем и факультетский, но от него этого и не требовалось). </div>
<div><br></div><div>; <<>> DiG 9.7.3 <<>> <a href="http://www.ru">www.ru</a> -t A</div><div>;; global options: +cmd</div><div>;; Got answer:</div><div>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62232</div>
<div>;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 5</div><div><br></div><div>;; QUESTION SECTION:</div><div>;<a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A</div>
<div><br></div><div>;; ANSWER SECTION:</div><div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.87.0.50</div>
<div><br></div><div>;; AUTHORITY SECTION:</div><div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns1.demos.net">ns1.demos.net</a>.</div>
<div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns.demos.su">ns.demos.su</a>.</div>
<div><br></div><div>;; ADDITIONAL SECTION:</div><div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>53176<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.87.0.8</div>
<div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>53176<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.87.0.9</div>
<div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>53176<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2a00:1c88:d01:15::9</div>
<div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>53176<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2a00:1c88:d01:15::8</div>
<div><a href="http://ns1.demos.net">ns1.demos.net</a>.<span class="" style="white-space:pre"> </span>69200<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.58.241.26</div>
<div><br></div><div>;; Query time: 13 msec</div><div>;; SERVER: 192.168.1.1#53(192.168.1.1)</div><div>;; WHEN: Fri Feb 22 21:35:15 2013</div><div>;; MSG SIZE rcvd: 196</div><div><br></div><div><span class="" style="white-space:pre"> </span>600 - это TTL в секундах. Запись на DNS-сервере, к которому обратился dig (192.168.1.1, nameserver из /etc/resolv.conf) валидна 10 минут. IN - класс (для Internet). A - тип записи, означает преобразование имени в IPv4 адрес.</div>
<div><br></div><div>;; QUESTION SECTION:</div><div>;<a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>MX</div><div><br></div><div>;; ANSWER SECTION:</div>
<div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>MX<span class="" style="white-space:pre"> </span>5 <a href="http://hq.demos.ru">hq.demos.ru</a>.</div>
<div><br></div><div>;; AUTHORITY SECTION:</div><div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns.demos.su">ns.demos.su</a>.</div>
<div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns1.demos.net">ns1.demos.net</a>.</div>
<div><br></div><div><span class="" style="white-space:pre"> </span>MX - почтовый сервер, обрабатывающий e-mail сообщения для данного домена. </div><div><span class="" style="white-space:pre"> </span>5 непонятно, что такое. Может быть, RDLENGTH, но тогда почему 5?</div>
<div><span class="" style="white-space:pre"> </span></div><div>;; QUESTION SECTION:</div><div>;<a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS</div>
<div><br></div><div>;; ANSWER SECTION:</div><div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns1.demos.net">ns1.demos.net</a>.</div>
<div><a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>600<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns.demos.su">ns.demos.su</a>.</div>
<div><br></div><div>;; ADDITIONAL SECTION:</div><div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>62508<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.87.0.9</div>
<div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>62508<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.87.0.8</div>
<div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>62508<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2a00:1c88:d01:15::8</div>
<div><a href="http://ns.demos.su">ns.demos.su</a>.<span class="" style="white-space:pre"> </span>62508<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2a00:1c88:d01:15::9</div>
<div><a href="http://ns1.demos.net">ns1.demos.net</a>.<span class="" style="white-space:pre"> </span>62509<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.58.241.26</div>
<div><span class="" style="white-space:pre"> </span></div><div><span class="" style="white-space:pre"> </span>NS - сервера доменых имён, отвечающие на запросы в данной зоне. </div><div><span class="" style="white-space:pre"> </span></div>
<div>; <<>> DiG 9.7.3 <<>> @<a href="http://192.203.230.10">192.203.230.10</a> <a href="http://www.ru">www.ru</a> -t A</div><div>; (1 server found)</div><div>;; global options: +cmd</div><div>;; Got answer:</div>
<div>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48625</div><div>;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 5, ADDITIONAL: 10</div><div>;; WARNING: recursion requested but not available</div><div>
<br></div><div>;; QUESTION SECTION:</div><div>;<a href="http://www.ru">www.ru</a>.<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A</div><div><br></div><div>;; AUTHORITY SECTION:</div>
<div>ru.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://d.dns.ripn.net">d.dns.ripn.net</a>.</div>
<div>ru.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://a.dns.ripn.net">a.dns.ripn.net</a>.</div>
<div>ru.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://f.dns.ripn.net">f.dns.ripn.net</a>.</div>
<div>ru.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://b.dns.ripn.net">b.dns.ripn.net</a>.</div>
<div>ru.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://e.dns.ripn.net">e.dns.ripn.net</a>.</div>
<div><br></div><div>;; ADDITIONAL SECTION:</div><div><a href="http://a.dns.ripn.net">a.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>193.232.128.6</div>
<div><a href="http://a.dns.ripn.net">a.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2001:678:17:0:193:232:128:6</div>
<div><a href="http://b.dns.ripn.net">b.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.85.252.62</div>
<div><a href="http://b.dns.ripn.net">b.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2001:678:16:0:194:85:252:62</div>
<div><a href="http://d.dns.ripn.net">d.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>194.190.124.17</div>
<div><a href="http://d.dns.ripn.net">d.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2001:678:18:0:194:190:124:17</div>
<div><a href="http://e.dns.ripn.net">e.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>193.232.142.17</div>
<div><a href="http://e.dns.ripn.net">e.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2001:678:15:0:193:232:142:17</div>
<div><a href="http://f.dns.ripn.net">f.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>193.232.156.17</div>
<div><a href="http://f.dns.ripn.net">f.dns.ripn.net</a>.<span class="" style="white-space:pre"> </span>172800<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>AAAA<span class="" style="white-space:pre"> </span>2001:678:14:0:193:232:156:17</div>
<div><br></div><div>;; Query time: 264 msec</div><div>;; SERVER: 192.203.230.10#53(192.203.230.10)</div><div>;; WHEN: Fri Feb 22 21:57:26 2013</div><div>;; MSG SIZE rcvd: 336<span class="" style="white-space:pre"> </span></div>
<div><span class="" style="white-space:pre"> </span></div><div><span class="" style="white-space:pre"> </span>Корневой DNS сервер не даёт ответа, но сообщает, какие сервера отвечают за зону ru.</div><div><span class="" style="white-space:pre"> </span></div>
<div>Для <a href="http://gmail.com">gmail.com</a> ситуация аналогична, только с локального DNS ответов много: </div><div>;; ANSWER SECTION:</div><div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>300<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>74.125.143.83</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>300<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>74.125.143.17</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>300<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>74.125.143.18</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>300<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>A<span class="" style="white-space:pre"> </span>74.125.143.19</div>
<div>;; ANSWER SECTION:</div><div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>1361<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>MX<span class="" style="white-space:pre"> </span>20 <a href="http://alt2.gmail-smtp-in.l.google.com">alt2.gmail-smtp-in.l.google.com</a>.</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>1361<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>MX<span class="" style="white-space:pre"> </span>30 <a href="http://alt3.gmail-smtp-in.l.google.com">alt3.gmail-smtp-in.l.google.com</a>.</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>1361<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>MX<span class="" style="white-space:pre"> </span>40 <a href="http://alt4.gmail-smtp-in.l.google.com">alt4.gmail-smtp-in.l.google.com</a>.</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>1361<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>MX<span class="" style="white-space:pre"> </span>5 <a href="http://gmail-smtp-in.l.google.com">gmail-smtp-in.l.google.com</a>.</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>1361<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>MX<span class="" style="white-space:pre"> </span>10 <a href="http://alt1.gmail-smtp-in.l.google.com">alt1.gmail-smtp-in.l.google.com</a>.</div>
<div>;; ANSWER SECTION:</div><div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>86389<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns1.google.com">ns1.google.com</a>.</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>86389<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns2.google.com">ns2.google.com</a>.</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>86389<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns3.google.com">ns3.google.com</a>.</div>
<div><a href="http://gmail.com">gmail.com</a>.<span class="" style="white-space:pre"> </span>86389<span class="" style="white-space:pre"> </span>IN<span class="" style="white-space:pre"> </span>NS<span class="" style="white-space:pre"> </span><a href="http://ns4.google.com">ns4.google.com</a>.</div>
<div><br></div><div>Другие тулы ничего нового нам не скажут. </div><div><br></div><div><br></div><div>vlad@vlad-ThinkPad-T61:~$ telnet <a href="http://mail.google.com">mail.google.com</a> 25</div><div>Trying 74.125.143.19...</div>
<div>Trying 74.125.143.83...</div><div>Trying 74.125.143.17...</div><div>Trying 74.125.143.18...</div><div>Trying 2a00:1450:4010:c04::53...</div><div>telnet: Unable to connect to remote host: Network is unreachable</div><div>
=====================================================================</div><div>vlad@vlad-ThinkPad-T61:~$ telnet <a href="http://smtp.cs.msu.su">smtp.cs.msu.su</a> 587</div><div>Trying 10.6.6.98...</div><div>Connected to <a href="http://imap.cs.msu.su">imap.cs.msu.su</a>.</div>
<div>Escape character is '^]'.</div><div>220 <a href="http://imap.cs.msu.su">imap.cs.msu.su</a> ESMTP Sendmail 8.14.4/8.14.5; Wed, 27 Feb 2013 21:18:46 +0400 (MSK)</div><div>helo me</div><div>250 <a href="http://imap.cs.msu.su">imap.cs.msu.su</a> Hello [10.6.6.84], pleased to meet you</div>
<div>mail to: <a href="mailto:gamajun@cs.msu.su">gamajun@cs.msu.su</a></div><div>501 5.5.2 Syntax error in parameters scanning "to"</div><div>mail from: <a href="mailto:admin@kremlin.ru">admin@kremlin.ru</a> </div>
<div>250 2.1.0 admin@kremlin.ru... Sender ok</div><div>rcpt to: <a href="mailto:gamajun@cs.msu.su">gamajun@cs.msu.su</a></div><div>250 2.1.5 gamajun@cs.msu.su... Recipient ok</div><div>data</div><div>354 Enter mail, end with "." on a line by itself</div>
<div>subject:-type SMTP try #2</div><div>Hello, Denis. There goes smtp with subject.</div><div>-- </div><div>Vladislav </div><div>.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">21 февраля 2013 г., 20:37 пользователь Dennis Gamayunov <span dir="ltr"><<a href="mailto:gamajun@cs.msu.su" target="_blank">gamajun@cs.msu.su</a>></span> написал:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Коллеги,<br>
<br>
Вот задание по сегодняшней лекции:<br>
<br>
1. DNS: изучить клиенты dig, nslookup, host<br>
Выполнить запросы о зонах <a href="http://www.ru" target="_blank">www.ru</a>, <a href="http://gmail.com" target="_blank">gmail.com</a> - записи A, MX, NS, запросы<br>
делать своему DNS-серверу, корневому DNS-серверу.<br>
На выходе - лог и комментарии, что ответили серверы и почему.<br>
<br>
2. SMTP: при помощи клиента nc или telnet подсоединиться на 25 порт<br>
своего почтового сервера, отправить письмо себе или мне при помощи<br>
команд SMTP. Варианты: с подделанным адресом From, полем Subject, с<br>
телом письма в формате PGP/MIME (подписать своим PGP-ключом).<br>
На выходе - лог общений с сервером, само письмо (успешно доставленное),<br>
дамп сессии отправки письма в формате PCAP (записывать с помощью Wireshark).<br>
<br>
С уважением,<br>
<br>
Денис Гамаюнов<br>
<br>
<br>
<br>
_______________________________________________<br>
course mailing list<br>
<a href="mailto:course@secsem.ru">course@secsem.ru</a><br>
<a href="http://lists.secsem.ru/cgi-bin/mailman/listinfo/course" target="_blank">http://lists.secsem.ru/cgi-bin/mailman/listinfo/course</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>С уважением, Владислав Иванишин
</div>