<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:tt="http://teletype.in/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Pavel Zhovner</title><generator>teletype.in</generator><description><![CDATA[Techno Freak | Founder of Flipper Devices — http://flipperzero.one | Telegram channel http://t.me/zhovner_hub]]></description><image><url>https://teletype.in/files/9a/81/9a8180b4-80fa-4c50-9e83-bee59e3bc348.png</url><title>Pavel Zhovner</title><link>https://blog.zhovner.com/</link></image><link>https://blog.zhovner.com/?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><atom:link rel="self" type="application/rss+xml" href="https://teletype.in/rss/zhovner?offset=0"></atom:link><atom:link rel="next" type="application/rss+xml" href="https://teletype.in/rss/zhovner?offset=10"></atom:link><atom:link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></atom:link><pubDate>Tue, 07 Apr 2026 14:46:52 GMT</pubDate><lastBuildDate>Tue, 07 Apr 2026 14:46:52 GMT</lastBuildDate><item><guid isPermaLink="true">https://blog.zhovner.com/tcpdump</guid><link>https://blog.zhovner.com/tcpdump?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/tcpdump?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>tcpdump</title><pubDate>Tue, 29 Oct 2024 20:05:00 GMT</pubDate><category>Tools</category><description><![CDATA[tcpdump cheatsheet]]></description><content:encoded><![CDATA[
  <h3 id="5va1">Filter traffic from my machine</h3>
  <p id="eK3L"><code>tcpdump -i eth0 -e -n  not ether src host FF:FF:FF:FF:FF:FF</code></p>
  <h3 id="kA7t">Options</h3>
  <p id="JuQo"><code>-e</code>  — Print MAC address</p>
  <p id="f0oO"><code>-n</code>  — Do not resolve</p>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/mpv-pro</guid><link>https://blog.zhovner.com/mpv-pro?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/mpv-pro?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>MPV Pro — fork for professionals</title><pubDate>Thu, 03 Aug 2023 14:37:20 GMT</pubDate><media:content medium="image" url="https://img4.teletype.in/files/ba/e6/bae64591-c0db-4f8d-910e-e5418334f252.png"></media:content><description><![CDATA[<img src="https://teletype.in/files/c9/64/c964bdca-37e5-4f3b-87c8-40a026d53746.png"></img>MPV is the best lightweight video player that I want to improve for video professionals. The current version is to geeky for non-programmers who are not familiar with CLI.  It hard to install and default config is not optimal. ]]></description><content:encoded><![CDATA[
  <figure id="mVRs" class="m_custom">
    <img src="https://teletype.in/files/c9/64/c964bdca-37e5-4f3b-87c8-40a026d53746.png" width="1073.5714285714287" />
  </figure>
  <p id="Ig40">MPV is the best lightweight video player that I want to improve for video professionals. The current version is to geeky for non-programmers who are not familiar with CLI.  It hard to install and default config is not optimal. </p>
  <h2 id="F0zS">What I want to change in MPV</h2>
  <p id="jXwC"></p>
  <h3 id="JEO2">Easy installation for macOS/Windows</h3>
  <p id="s6ct">Right not the only way to install MPV is to deal with CLI. I want to create a regular .app package that can be install just my drag-n-drop like any other applications on macOS or even upload it to App Store and Windows Store.</p>
  <figure id="CQk8" class="m_original">
    <img src="https://img4.teletype.in/files/ba/89/ba893557-5f74-4142-bdf4-5fcc5c3b7897.png" width="694" />
    <figcaption>Installation from CLI is too hard for non-programmers</figcaption>
  </figure>
  <h3 id="1lZ2">Valid signature  </h3>
  <p id="mmOx">All modern OS require a signature. I can provide a signature for macOS and Windows from my company to sign the binaries for macOS and WIndows </p>
  <figure id="KoNm" class="m_column">
    <img src="https://img1.teletype.in/files/4c/78/4c784534-3b97-4c61-8a7b-75f94ce9c141.png" width="1608" />
    <figcaption>Current mpv is not signed</figcaption>
  </figure>
  <h3 id="W4iH">Convert any video to H264 or DHNxHD for editing?</h3>
  <p id="7Bf6">A simple option in GUI to convert any strange video format to most popular video codec ready to publish to the web or social media. Or decompress to the best editing codec.</p>
  <h3 id="lo5T">Built-in cut feature</h3>
  <p id="SMHD">Easy to use cut feature to cut any part of video and export it to source codec without re-encoding or h264. Maybe this plugin <a href="https://github.com/familyfriendlymikey/mpv-cut" target="_blank">https://github.com/familyfriendlymikey/mpv-cut</a></p>
  <p id="sbMh"></p>
  <h2 id="Je82">Suggestion for default settings</h2>
  <p id="b8WG">Default settings is not optimal for simple and fast operating. I suggest to change it to this:</p>
  <h3 id="QPMg">.mpv/config</h3>
  <pre id="gX7H"># resize window in case it&#x27;s larger than screen
autofit-larger=90%x90%

# keep the player open when a file&#x27;s end is reached
keep-open=yes

# disable interlace
deinterlace=no

# much faster fullscreen on macOS than native
no-native-fs

# correct window resizing with mouse wheel on hidpi macbooks
no-hidpi-window-scale

# improve playing performance at the cost of video quality
vd-lavc-fast
vd-lavc-skiploopfilter=all</pre>
  <h3 id="jOvO">.mpv/input.conf</h3>
  <p id="OFK7">🐛 The keyboard shortcuts works only with English keyboard layout. This bug should be fixed.</p>
  <pre id="FSew"># Resize window with mouse scroll 
WHEEL_UP	add window-scale +0.0625
WHEEL_DOWN	add window-scale -0.0625

# Move back/forward by one frame
, frame-back-step ;show-text &quot;${playback-time/full} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}&quot;
. frame-step ; show-text &quot;${playback-time/full} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}&quot;

# Apply color filter in cycle
c-1 vf set &quot;format=gamma=v-log:colorlevels=full:primaries=v-gamut&quot; ; show-text &quot;Panasonic V-Log&quot;
c-2 set contrast 58 ; set brightness 0 ; set gamma -12 ; set saturation 10 ; show-text &quot;My BMPCC4K&quot;
c-0 vf clr &quot;&quot; ; set contrast 0 ; set brightness 0 ; set gamma 0 ; set saturation 0 ; show-text &quot;Color cleared&quot;

# Duplicate russian layout hotkeys because of MPV bug
# This bug should be fixed
й keypress &quot;q&quot;
ц keypress &quot;w&quot;
у keypress &quot;e&quot;
к keypress &quot;r&quot;
е keypress &quot;t&quot;
н keypress &quot;y&quot;
г keypress &quot;u&quot;
ш keypress &quot;i&quot;
щ keypress &quot;o&quot;
з keypress &quot;p&quot;
х keypress &quot;[&quot;
ъ keypress &quot;]&quot;
ф keypress &quot;a&quot;
ы keypress &quot;s&quot;
в keypress &quot;d&quot;
а keypress &quot;f&quot;
п keypress &quot;g&quot;
р keypress &quot;h&quot;
о keypress &quot;j&quot;
л keypress &quot;k&quot;
д keypress &quot;l&quot;
ж keypress &quot;;&quot;
э keypress &quot;&#x27;&quot;
я keypress &quot;z&quot;
ч keypress &quot;x&quot;
с keypress &quot;c&quot;
м keypress &quot;v&quot;
и keypress &quot;b&quot;
т keypress &quot;n&quot;
ь keypress &quot;m&quot;
б keypress &quot;,&quot;
ю keypress &quot;.&quot;
</pre>
  <h3 id="L5DH">./scripts/control.lua</h3>
  <pre id="RrZE">-- Control 1.0.5
-- https://github.com/oe-d/control
-- See control.conf for settings and key binds

options = require &#x27;mp.options&#x27;
u = require &#x27;mp.utils&#x27;

o = {
    audio_device = 0,
    pause_minimized = &#x27;no&#x27;,
    play_restored = &#x27;no&#x27;,
    show_info = &#x27;yes&#x27;,
    info_duration = 1000,
    step_method = &#x27;seek&#x27;,
    step_delay = -1,
    step_rate = 0,
    step_mute = &#x27;auto&#x27;,
    htp_speed = 2.5,
    htp_keep_dir = &#x27;no&#x27;,
    end_rewind = &#x27;file&#x27;,
    end_exit_fs = &#x27;no&#x27;,
    audio_symbol=&#x27;🔊 &#x27;,
    audio_muted_symbol=&#x27;🔈 &#x27;,
    image_symbol=&#x27;🖼 &#x27;,
    music_symbol=&#x27;🎵 &#x27;,
    video_symbol=&#x27;🎞 &#x27;
}

function init()
    options.read_options(o, &#x27;control&#x27;)
    if o.step_delay == -1 then o.step_delay = get(&#x27;input-ar-delay&#x27;) end
    if o.step_rate == -1 then o.step_rate = get(&#x27;input-ar-rate&#x27;) end
    if o.end_rewind == &#x27;file&#x27; then mp.set_property(&#x27;keep-open&#x27;, &#x27;always&#x27;) end
    if o.show_info == &#x27;start&#x27; then
        o.show_info = &#x27;yes&#x27;
        osd:toggle()
    end
    osd.default_msg = function()
        if media.type == &#x27;image&#x27; then
            return o.image_symbol
        elseif media.type == &#x27;audio&#x27; then
            return o.music_symbol
        else
            local frame = get(&#x27;frame&#x27;)
            local frames = get(&#x27;frames&#x27;)
            if not frame or not frames then return o.video_symbol
            else frame = frame + 1 end
            local progress = math.floor(frame / frames * 100)
            return o.video_symbol..math.min(frame, frames)..&#x27; / &#x27;..frames..&#x27; (&#x27;..progress..&#x27;%)\n&#x27;
                ..format(math.max(get(&#x27;pos&#x27;) or 0, 0))..&#x27;\n&#x27;
                ..round(fps.fps, 3)..&#x27; fps (&#x27;..round(get(&#x27;speed&#x27;), 2)..&#x27;x)&#x27;
        end
    end
    osd.msg_timer:kill()
    osd.osd_timer:kill()
    step.delay_timer:kill()
    step.delay_timer.timeout = o.step_delay / 1000
    step.hwdec_timer:kill()
    if o.audio_device &gt; 0 then audio:set(o.audio_device) end
    mp.register_event(&#x27;file-loaded&#x27;, function() media:get_type() end)
    mp.observe_property(&#x27;window-minimized&#x27;, &#x27;bool&#x27;, function(_, v)
        if o.pause_minimized == &#x27;yes&#x27; or o.pause_minimized == media:get_type() then
            if v then media.playback:on_minimize()
            elseif o.play_restored == &#x27;yes&#x27; then media.playback:on_restore() end
        end
    end)
    mp.observe_property(&#x27;playback-time&#x27;, &#x27;number&#x27;, function(_, _)
        if osd.show then
            fps:tick()
            osd:set(nil, o.info_duration / 1000)
        end
    end)
    mp.observe_property(&#x27;play-dir&#x27;, &#x27;string&#x27;, function(_, v)
        if v == &#x27;forward&#x27; and step.prev_hwdec then
            step.dir_frame = get(&#x27;frame&#x27;)
            step.hwdec_timer:resume()
        end
    end)
    mp.observe_property(&#x27;eof-reached&#x27;, &#x27;bool&#x27;, function(_, v)
        media.playback.eof = v
        if v and not step.played then
            if o.end_rewind ~= &#x27;no&#x27; then
                local pos = tonumber(o.end_rewind)
                if pos then mp.set_property(&#x27;playlist-pos-1&#x27;, math.min(pos, get(&#x27;playlist-count&#x27;))) end
                mp.add_timeout(0.01, function() media.playback.rewind(true) end)
            end
            if o.end_exit_fs == &#x27;yes&#x27; then mp.command(&#x27;set fullscreen no&#x27;) end
        end
    end)
end

function split(string, pattern)
    local str = {}
    for i in string.gmatch(string, pattern) do
        table.insert(str, i)
    end
    return str
end

function round(number, decimals)
    decimals = decimals or 0
    return math.floor(number * 10 ^ decimals + 0.5) / 10 ^ decimals
end

function format(time)
    time = time or 0
    local h = math.floor(time / 3600)
    local m = math.floor(time % 3600 / 60)
    local s = time % 60
    return string.format(&#x27;%02d:%02d:%06.03f&#x27;, h, m, s)
end

function get(property)
    local props = {
        drops = &#x27;frame-drop-count&#x27;,
        e_fps = &#x27;estimated-vf-fps&#x27;,
        fps = &#x27;container-fps&#x27;,
        frame = &#x27;estimated-frame-number&#x27;,
        frames = &#x27;estimated-frame-count&#x27;,
        pos = &#x27;playback-time&#x27;
    }
    for k, v in pairs(props) do
        if k == property then property = v end
    end
    return mp.get_property_native(property)
end

media = {
    type = nil,
    get_type = function(self)
        if get(&#x27;track-list/0/type&#x27;) == &#x27;video&#x27; and get(&#x27;frames&#x27;) == 0 then
            self.type = &#x27;image&#x27;
        elseif get(&#x27;track-list/0/type&#x27;) == &#x27;audio&#x27; or get(&#x27;track-list/0/albumart&#x27;) == &#x27;yes&#x27; then
            self.type = &#x27;audio&#x27;
        else
            self.type = &#x27;video&#x27;
        end
        return self.type
    end,
    playback = {
        eof = false,
        prev_pause = false,
        pause = function(self)
            if self.eof then
                self.rewind()
            else
                if get(&#x27;pause&#x27;) and step.stepped then
                    mp.commandv(&#x27;seek&#x27;, 0, &#x27;relative+exact&#x27;)
                    step.stepped = false
                end
                mp.command(&#x27;set pause &#x27;..(get(&#x27;pause&#x27;) and &#x27;no&#x27; or &#x27;yes&#x27;))
            end
        end,
        rewind = function(pause)
            mp.commandv(&#x27;seek&#x27;, 0, &#x27;absolute&#x27;)
            mp.command(&#x27;set pause &#x27;..(pause and &#x27;yes&#x27; or &#x27;no&#x27;))
        end,
        on_minimize = function(self)
            self.prev_pause = get(&#x27;pause&#x27;)
            mp.command(&#x27;set pause yes&#x27;)
        end,
        on_restore = function(self)
            if not self.prev_pause then mp.command(&#x27;set pause no&#x27;) end
            self.prev_pause = false
        end
    }
}

audio = {
    osd = true,
    prev_list = &#x27;&#x27;,
    i = 0,
    set_prev_vol = false,
    prev_mute = false,
    prev_vol = 0,
    valid = true,
    get = function(self, index)
        local list = get(&#x27;audio-device-list&#x27;)
        if index and (index &lt; 1 or index &gt; table.getn(list)) then
            self.valid = false
            list[1].name = &#x27;Invalid device index (&#x27;..index..&#x27;)&#x27;
            list[1].description = list[1].name
            index = 1
        end
        return index and list[index] or list
    end,
    set = function(self, index)
        local name = self:get(index).name
        if self.valid then mp.command(&#x27;no-osd set audio-device &#x27;..name) end
    end,
    list = function(self, list, show_index, duration)
        local msg = &#x27;&#x27;
        for i, v in ipairs(list) do
            local symbol = &#x27;&#x27;
            if v.name == get(&#x27;audio-device&#x27;) then
                symbol = (get(&#x27;mute&#x27;) or get(&#x27;volume&#x27;) == 0) and o.audio_muted_symbol or o.audio_symbol
            end
            i = show_index and i..&#x27;: &#x27; or &#x27;&#x27;
            msg = msg..i..symbol..string.gsub(v.description, &#x27;Autoselect&#x27;, &#x27;Default&#x27;)..&#x27;\n&#x27;
        end
        if self.osd then osd:set(msg, duration) end
    end,
    cycle = function(self, list)
        if u.to_string(list) ~= self.prev_list then self.i = 0 end
        self.prev_list = u.to_string(list)
        self.i = self.i == table.getn(list) and 1 or self.i + 1
        local remember_vol = false
        local index = 0
        local set_vol = false
        local vol = 0
        for i, v in ipairs(list) do
            local iv = split(v, &#x27;%d+&#x27;)
            if i == (self.i &gt; 1 and self.i - 1 or table.getn(list)) and string.find(v, &#x27;r&#x27;) then
                self.set_prev_vol = true
                remember_vol = true
            end
            if i == self.i then
                index = tonumber(iv[1])
                if iv[2] then
                    set_vol = true
                    vol = iv[2]
                end
            end
            list[i] = self:get(tonumber(iv[1]))
        end
        if remember_vol then
            self.prev_mute = get(&#x27;mute&#x27;)
            self.prev_vol = get(&#x27;volume&#x27;)
        end
        self.valid = true
        self:set(index)
        if set_vol then
            mp.command(&#x27;no-osd set mute no&#x27;)
            mp.command(&#x27;no-osd set volume &#x27;..vol)
        elseif self.set_prev_vol then
            mp.command(&#x27;no-osd set mute &#x27;..(self.prev_mute and &#x27;yes&#x27; or &#x27;no&#x27;))
            mp.command(&#x27;no-osd set volume &#x27;..self.prev_vol)
            self.set_prev_vol = false
        end
        self:list(list, false, 2)
    end,
    msg_handler = function(self, cmd, ...)
        if cmd == &#x27;list&#x27; then
            self.osd = true
            self:list(self:get(), true, 4)
        elseif cmd == &#x27;cycle&#x27; then
            local args = {...}
            if args[1] == &#x27;no-osd&#x27; then
                table.remove(args, 1)
                self.osd = false
            else
                self.osd = true
            end
            self:cycle(args)
        end
    end
}

fps = {
    interval = 0.5,
    fps = 0,
    prev_time = 0,
    prev_pos = 0,
    prev_drops = 0,
    prev_vop_dur = 0,
    vop_dur = 0,
    frames = 0,
    tick = function(self)
        local vop = get(&#x27;vo-passes&#x27;) or {fresh = {}}
        for _, v in ipairs(vop.fresh) do
            self.vop_dur = self.vop_dur + v.last
        end
        if self.vop_dur ~= self.prev_vop_dur then self.frames = self.frames + 1 end
        self.prev_vop_dur = self.vop_dur
        self.vop_dur = 0
        local fps = get(&#x27;e_fps&#x27;)
        local t_delta = mp.get_time() - self.prev_time
        if not fps or t_delta &lt; self.interval then return end
        local spd = get(&#x27;speed&#x27;)
        local pos_delta = math.abs((get(&#x27;pos&#x27;) or 0) - (self.prev_pos or 0))
        local drops = (get(&#x27;drops&#x27;) or 0) - (self.prev_drops or 0)
        local mult = self.interval / t_delta
        local function hot_mess(speed)
            if drops &gt; 0 and self.frames * mult &lt; fps * speed / math.max(fps / 30, 1) * self.interval * 0.95 then
                self.fps = round(self.frames * mult, 2)
            else
                self.fps = fps * spd
            end
        end
        if spd &gt; 1 then
            if drops &gt; 0 and (pos_delta * mult &gt; 2 or pos_delta * mult / self.interval &gt; spd * 0.95 and self.frames * mult &gt; 18 * self.interval) then
                self.fps = round(fps * pos_delta * mult / self.interval, 2)
            else
                hot_mess(1)
            end
        else
            hot_mess(spd)
        end
        self.prev_time = mp.get_time()
        self.prev_pos = get(&#x27;pos&#x27;)
        self.prev_drops = get(&#x27;drops&#x27;)
        self.frames = 0
    end
}

osd = {
    default_msg = nil,
    msg = &#x27;&#x27;,
    show = false,
    toggled = false,
    osd_timer = mp.add_timeout(1e8, function() mp.set_property(&#x27;osd-msg1&#x27;, &#x27;&#x27;) end),
    msg_timer = mp.add_timeout(1e8, function() osd.msg = osd.default_msg() end),
    set = function(self, msg, duration)
        if msg or not self.toggled or (self.toggled and self.osd_timer.timeout ~= 1e8) then
            self.osd_timer:kill()
            self.osd_timer.timeout = self.toggled and 1e8 or duration
            self.osd_timer:resume()
            mp.set_property(&#x27;osd-level&#x27;, 1)
        end
        if msg then
            self.msg = msg
            self.msg_timer:kill()
            self.msg_timer.timeout = duration
            self.msg_timer:resume()
            mp.add_timeout(0.1, function() mp.set_property(&#x27;osd-msg1&#x27;, self.msg) end)
        elseif not self.msg_timer:is_enabled() then
            self.msg = self.default_msg()
            mp.set_property(&#x27;osd-msg1&#x27;, self.msg)
        else
            mp.set_property(&#x27;osd-msg1&#x27;, self.msg)
        end
    end,
    toggle = function(self)
        self.toggled = not self.toggled
        self.show = self.toggled
        self:set(nil, 0)
    end
}

fullscreen = {
    prev_time = 0,
    clicks = 0,
    x = 0,
    click = function(self)
        if mp.get_time() - self.prev_time &gt; 0.3 then self.clicks = 0 end
        if self.clicks == 1 and mp.get_time() - self.prev_time &lt; 0.3 and math.abs(mp.get_mouse_pos() - self.x) &lt; 5 then
            self.clicks = 2
        else
            self.x = mp.get_mouse_pos()
            self.clicks = 1
        end
        self.prev_time = mp.get_time()
    end,
    cycle = function(self, e)
        if self.clicks == 2 and mp.get_time() - self.prev_time &lt; 0.3 then
            if (e == &#x27;down&#x27; and get(&#x27;fs&#x27;)) or (e == &#x27;up&#x27; and not get(&#x27;fs&#x27;)) then
                mp.command(&#x27;cycle fullscreen&#x27;)
                self.clicks = 0
            end
        end
    end,
    key_handler = function(self, e)
        if e.key_name == &#x27;MBTN_LEFT_DBL&#x27; then
            osd:set(&#x27;Bind to MBTN_LEFT. Not MBTN_LEFT_DBL.&#x27;, 4)
        elseif e.event == &#x27;press&#x27; then
            osd:set(&#x27;Received a key press event.\n&#x27;
                ..&#x27;Key down/up events are required.\n&#x27;
                ..&#x27;Make sure nothing else is bound to the key.&#x27;, 4)
        elseif e.event == &#x27;down&#x27; then
            self:click()
            self:cycle(e.event)
        elseif e.event == &#x27;up&#x27; then
            self:cycle(e.event)
        end
    end
}

step = {
    e_msg = false,
    direction = nil,
    prev_hwdec = nil,
    dir_frame = 0,
    paused = false,
    muted = false,
    prev_speed = 1,
    prev_pos = 0,
    play_speed = 1,
    stepped = false,
    played = false,
    delay_timer = mp.add_timeout(1e8, function() step:play() end),
    hwdec_timer = mp.add_periodic_timer(1 / 60, function()
        if get(&#x27;play-dir&#x27;) == &#x27;forward&#x27; and not get(&#x27;pause&#x27;) and get(&#x27;frame&#x27;) ~= step.dir_frame then
            mp.command(&#x27;no-osd set hwdec &#x27;..step.prev_hwdec)
            step.hwdec_timer:kill()
            step.prev_hwdec = nil
        end
    end),
    play = function(self)
        self.played = true
        if self.direction == &#x27;backward&#x27; then mp.command(&#x27;no-osd set hwdec no&#x27;) end
        mp.command(&#x27;no-osd set play-dir &#x27;..self.direction)
        mp.command(&#x27;no-osd set speed &#x27;..self.play_speed)
        if o.step_mute == &#x27;auto&#x27; and not self.muted then mp.command(&#x27;no-osd set mute no&#x27;)
        elseif o.step_mute == &#x27;hold&#x27; then mp.command(&#x27;no-osd set mute yes&#x27;) end
        mp.commandv(&#x27;seek&#x27;, 0, &#x27;relative+exact&#x27;)
        mp.command(&#x27;set pause no&#x27;)
    end,
    start = function(self, dir, htp)
        self.direction = dir
        self.prev_hwdec = self.prev_hwdec or get(&#x27;hwdec&#x27;)
        self.paused = get(&#x27;pause&#x27;)
        self.muted = get(&#x27;mute&#x27;)
        self.prev_speed = get(&#x27;speed&#x27;)
        self.prev_pos = get(&#x27;pos&#x27;)
        if o.show_info == &#x27;yes&#x27; then osd.show = true end
        if htp then
            self.play_speed = o.htp_speed
            self:play()
        else
            self.play_speed = o.step_rate == 0 and 1 or o.step_rate / get(&#x27;fps&#x27;)
            self.delay_timer:resume()
            mp.command(&#x27;set pause yes&#x27;)
            if dir == &#x27;forward&#x27; and o.step_method == &#x27;step&#x27; then
                if o.step_mute ~= &#x27;no&#x27; then mp.command(&#x27;no-osd set mute yes&#x27;) end
                mp.command(&#x27;frame-step&#x27;)
                self.stepped = true
            elseif dir == &#x27;backward&#x27; or get(&#x27;time-pos&#x27;) &lt; get(&#x27;duration&#x27;) then
                mp.commandv(&#x27;seek&#x27;, (dir == &#x27;forward&#x27; and 1 or -1) / get(&#x27;fps&#x27;), &#x27;relative+exact&#x27;)
            end
        end
    end,
    stop = function(self, dir, htp)
        self.delay_timer:kill()
        if dir == &#x27;backward&#x27; and get(&#x27;frame&#x27;) &gt; 0 and not self.played and get(&#x27;pos&#x27;) == self.prev_pos then
            mp.command(&#x27;frame-back-step&#x27;)
            print(&#x27;Backward seek failed. Reverted to backstep.&#x27;)
        end
        if not htp or o.htp_keep_dir == &#x27;no&#x27; then mp.command(&#x27;no-osd set play-dir forward&#x27;) end
        mp.command(&#x27;no-osd set speed &#x27;..self.prev_speed)
        if not self.muted then mp.command(&#x27;no-osd set mute no&#x27;) end
        mp.command(&#x27;set pause yes&#x27;)
        if self.played then mp.commandv(&#x27;seek&#x27;, 0, &#x27;relative+exact&#x27;) end
        if htp and not self.paused and not (media.playback.eof and get(&#x27;keep-open-pause&#x27;)) then mp.command(&#x27;set pause no&#x27;) end
        self.played = false
        if not osd.toggled then osd.show = false end
    end,
    on_press = function(self, dir, htp)
        local msg = &#x27;Received a key press event.\n&#x27;
            ..(htp and &#x27;Key down/up events are required.\n&#x27;
            or &#x27;Only single frame steps will work.\n&#x27;)
            ..&#x27;Make sure nothing else is bound to the key.&#x27;
        if htp then
            osd:set(msg, 4)
            return
        else
            if not self.e_msg then
                print(msg)
                self.e_msg = true
            end
            self:start(dir, false)
            mp.add_timeout(0.1, function() self:stop(dir, false) end)
        end
    end,
    key_handler = function(self, e, dir, htp)
        if media.type ~= &#x27;video&#x27; then return
        elseif e.event == &#x27;press&#x27; then self:on_press(dir, htp)
        elseif e.event == &#x27;down&#x27; then self:start(dir, htp)
        elseif e.event == &#x27;up&#x27; then self:stop(dir, htp) end
    end
}

init()

mp.register_script_message(&#x27;list-audio-devices&#x27;, function() audio:msg_handler(&#x27;list&#x27;) end)
mp.register_script_message(&#x27;set-audio-device&#x27;, function(...) audio:msg_handler(&#x27;cycle&#x27;, ...) end)
mp.register_script_message(&#x27;cycle-audio-devices&#x27;, function(...) audio:msg_handler(&#x27;cycle&#x27;, ...) end)
mp.add_key_binding(nil, &#x27;toggle-info&#x27;, function() osd:toggle() end)
mp.add_key_binding(nil, &#x27;cycle-pause&#x27;, function() media.playback:pause() end)
mp.add_key_binding(nil, &#x27;cycle-fullscreen&#x27;, function(e) fullscreen:key_handler(e) end, {complex = true})
mp.add_key_binding(nil, &#x27;step&#x27;, function(e) step:key_handler(e, &#x27;forward&#x27;) end, {complex = true})
mp.add_key_binding(nil, &#x27;step-back&#x27;, function(e) step:key_handler(e, &#x27;backward&#x27;) end, {complex = true})
mp.add_key_binding(nil, &#x27;htp&#x27;, function(e) step:key_handler(e, &#x27;forward&#x27;, true) end, {complex = true})
mp.add_key_binding(nil, &#x27;htp-back&#x27;, function(e) step:key_handler(e, &#x27;backward&#x27;, true) end, {complex = true})
</pre>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/flipper-zero-3d-model-B4C4</guid><link>https://blog.zhovner.com/flipper-zero-3d-model-B4C4?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/flipper-zero-3d-model-B4C4?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>Flipper Zero 3D model (ver. B4C4)</title><pubDate>Fri, 27 Nov 2020 16:06:10 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/49/9c/499cfcda-4c49-4b4d-8659-d8493cb1ce2d.jpeg"></media:content><description><![CDATA[Version B4C4 ]]></description><content:encoded><![CDATA[
  <p>Version B4C4 </p>
  <figure class="m_full_width">
    <iframe src="https://sketchfab.com/models/1f246cff5f03472283f4e52fb0c84684/embed?autostart=0&ui_controls=1&ui_infos=1&ui_inspector=1&ui_stop=1&ui_watermark=1&ui_watermark_link=1"></iframe>
  </figure>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/how-to-choose-nickname-on-internet</guid><link>https://blog.zhovner.com/how-to-choose-nickname-on-internet?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/how-to-choose-nickname-on-internet?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>Как правильно подписываться в интернете</title><pubDate>Mon, 06 Jul 2020 11:51:35 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/a3/03/a30337ef-e6bb-451a-9166-32a9d74d9acb.png"></media:content><tt:hashtag>social</tt:hashtag><description><![CDATA[<img src="https://teletype.in/files/81/9e/819e1fae-c270-4e9c-8a75-6b70b03886de.png"></img>Для многих неочевидна важность корректной идентификации себя при электронном общении. Однако, пренебрежение определенными правилами, может создать существенные неудобства собеседнику.]]></description><content:encoded><![CDATA[
  <figure class="m_original">
    <img src="https://teletype.in/files/81/9e/819e1fae-c270-4e9c-8a75-6b70b03886de.png" width="378" />
  </figure>
  <p>Для многих неочевидна важность корректной идентификации себя при электронном общении. Однако, пренебрежение определенными правилами, может создать существенные неудобства собеседнику.</p>
  <p>Описанное ниже не касается формализованных правил этикета, а лишь описывает распространенные проблемы которые создает небрежное отношение к самоидентификации в интернете.</p>
  <h4>С уважением, Александр</h4>
  <p>На скриншоте выше показана распространенная проблема, с которой приходится сталкиваться при деловом общении.<br />Глупо думать, что вы единственный «Александр» с которым знаком ваш собеседник. А если собеседник общается по работе с большим числом людей, совершенно точно через день-два ему будет очень сложно вспомнить, что он общался именно с вами, а уж тем более найти вас в контакт-листе. Поэтому приходится просматривать лог переписки с каждым Александром чтобы отыскать в нем нужного.</p>
  <p><em>Короткое видео о важности фамилии:</em></p>
  <figure class="m_custom">
    <iframe src="https://www.youtube.com/embed/CCZjKgj-BPs?autoplay=0&loop=0&mute=0"></iframe>
  </figure>
  <p>Если же вы представляете компанию, и используете IM-клиент только для делового общения, уместно дописать название компании после имени. Например вместо «Вася» лучше написать «Василий Шишкин (webstudio.ru)»</p>
  <p>И даже если вы не представляете никакую компанию, и среди друзей вы известны как просто Вася, представьте сколько еще Василиев может быть в контакт-листе ваших друзей, и потрудитесь дописать если уж не фамилию, то хотя бы уникальный псевдоним ее заменяющий.<br />Например «Вася Крутой» или «Вася Молодец», чтобы не потеряться среди десятка других Вась в контакт-листе.</p>
  <p>В результате, из-за невнимательного отношения к заполнению своих профилей, вы вынуждаете собеседников редактировать ваш профиль самостоятельно. Переименовывать вас из «Вася» в «Вася веб-дизайн», дописывать в профиле Skype мобильный телефон и так далее.</p>
  <p><em>Список рекомендаций подписи в любых мессенджерах:</em></p>
  <ul>
    <li><strong>Никогда не подписывайтесь только именем</strong>. Указывайте фамилию или псевдоним вместо фамилии</li>
    <li><strong>Указывая только псевдоним без имени, выбирайте легко запоминающийся и достаточно уникальный.</strong> Например <strong>Black</strong> — плохой псевдоним, <strong>Fedor Lobster</strong> — хороший псевдоним.</li>
    <li><strong>Никаких посторонних символов, смайликов, скобочек, звездочек.</strong> Типа &quot;*Светочка)))*&quot;, &quot;--&lt;&lt;==SuperNagibator==&gt;&gt;--&quot;. Даже в начальных классах школы это делать стыдно</li>
    <li>Если вы представляете компанию и с этого аккаунта общаетесь только о работе, можно вписать название компании после имени</li>
    <li><strong>Заполняйте vcard.</strong> Указывайте в профиле сайт компании, рабочий телефон. Если это Skype, то указывайте в профиле личный телефон. Находясь заграницей очень удобно звонить на мобильный из скайпа без необходимости переписывать его вручную</li>
    <li><strong>Выбирайте осмысленные и строгие логины.</strong> Вам в любом случае придется их диктовать на слух. Вместо leno4ka222, kjaaaxi, siooaoa7 лучше предпочесть elenazaeitseva, k.antonov, ivanov.max</li>
    <li><strong>Не меняйте имя в профиле.</strong> Выбрав единожды корректное имя, не изменяйте его никогда. Очень раздражает, когда не удается найти в контакт-листе Адрея Зайцева который вдруг стал «Андрюшка Зайчик»</li>
  </ul>
  <h4>Общедоступные публикации</h4>
  <p>Ко мне часто обращаются знакомые, не имеющие аккаунта на Хабре, с просьбой спросить что-либо у автора статьи. Потому как прокомментировать статью они не могут, а автор не оставил никаких контактных данных в профиле. Ладно еще если его логин можно нагуглить и найти одноименный вконтакт или фейсбук. Но бывает, что это невозможно.</p>
  <p>Бывет, возникает экзотический вопрос, вроде «Какой тип разъема в этой недокументированной китайской микросхеме контроллера фильтра обратного осмоса?». И в результате гугления находишь богом забытый форум, где сидят полтора человека и один из них как раз обладатель этой редкой микросхемы и все про нее знает.<br />А в профиле у него:</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/habr/post_images/668/172/c51/668172c51838d1a82bd2b15cb22a2f67.png" width="598" />
  </figure>
  <p>И скорее обычно что-то вроде «Был на сайте: <strong>8 месяцев назад</strong>».</p>
  <p>Поэтому, если вы публикуете в интернете что угодно, что может хоть кого-то заинтересовать, пускай даже это кажется вам малопопулярным и не интересным, или вы просто ведете блог для себя, снимаете видеоролики, делитесь опытом на форуме, потрудитесь, чтобы при необходимости с вами можно было связаться общедоступными способами. Избавьте человека от необходимости регистрироваться на youtube, форуме, живом журнале, твиттере чтобы просто написать вам. Указывайте в общедоступном месте контактные данные.</p>
  <ul>
    <li>Занимаясь публичной деятельностью — предоставьте возможность обсудить это с вами. Например, включите анонимные комментарии и</li>
    <li>Указывайте в общедоступных местах актуальные средства связи. Помните, что вы можете перестать посещать форумы/жж и не прочитать личные сообщения отправленные через эти сервисы.</li>
  </ul>
  <hr />
  <p>Эта статья на хабре <a href="https://habr.com/ru/post/208622/" target="_blank">https://habr.com/ru/post/208622/</a></p>
  <tt-tags>
    <tt-tag name="social">#social</tt-tag>
  </tt-tags>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/images-in-skype-chat-with-html</guid><link>https://blog.zhovner.com/images-in-skype-chat-with-html?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/images-in-skype-chat-with-html?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>Картинки в чате Skype</title><pubDate>Mon, 06 Jul 2020 11:41:32 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/d1/c0/d1c0b5a8-a5a3-4765-a2b1-eebdb30dd9f2.png"></media:content><tt:hashtag>skype</tt:hashtag><tt:hashtag>hack</tt:hashtag><description><![CDATA[<img src="https://habrastorage.org/getpro/habr/post_images/547/4aa/4a7/5474aa4a7072fc40742dfa94cb625c9c.png"></img>Оказывается, в чате скайпа работают некоторые HTML-теги, в том числе и &lt;font color=&quot;&quot;&gt;
Благодаря этому возможно создавать несложные картинки в тексте сообщений.]]></description><content:encoded><![CDATA[
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/habr/post_images/547/4aa/4a7/5474aa4a7072fc40742dfa94cb625c9c.png" width="686" />
  </figure>
  <p>Оказывается, в чате скайпа работают некоторые HTML-теги, в том числе и <em>&lt;font color=&quot;&quot;&gt;</em><br />Благодаря этому возможно создавать несложные картинки в тексте сообщений.</p>
  <p>Список поддерживаемых в скайпе тегов <a href="http://www.wikireality.ru/wiki/HTML_%D0%B2_%D0%A1%D0%BA%D0%B0%D0%B9%D0%BF%D0%B5" target="_blank">www.wikireality.ru/wiki/HTML_в_Скайпе</a><br />Для того чтобы оправить HTML-код в чате нужно зажать CTRL+SHIFT и кликнуть на кнопку отправки сообщения.</p>
  <p>Код картинки <a href="http://pastebin.com/raw.php?i=z4EspzjC" target="_blank">pastebin.com/raw.php?i=z4EspzjC</a></p>
  <p>Ниже показан пример генерации HTML-кода из изображения на PHP.</p>
  <pre>$imgw = imagesx($img);
$imgh = imagesy($img);
$ratio = $imgw/$imgh;
$newh = floor(sqrt(800 / $ratio));
$neww = floor($ratio * $newh);

$newimg = imagecreatetruecolor($neww, $newh);
imagecopyresampled($newimg, $img, 0, 0, 0, 0, $neww, $newh, $imgw, $imgh);
imagedestroy($img);
$out = &#x27;&lt;font size=&quot;1&quot;&gt;&lt;u&gt;&#x27;;
for($j = 0; $j &lt; $newh; $j++) {
	for ($i = 0; $i &lt; $neww; $i++) {
		$color = imagecolorat($newimg, $i, $j);
		$out .= &#x27;&lt;font color=&quot;#&#x27;.strtoupper(dechex($color)).&#x27;&quot;&gt;███&lt;/font&gt;&#x27;;
	}
	$out .= &quot;\n&quot;;
}
$out .= &#x27;&lt;/u&gt;&lt;/font&gt;&#x27;;
echo $out;
</pre>
  <p>Код достаточно примитивный, потому как обрабатывается каждый пиксель, даже если подряд идут несколько пикселей одного цвета. Если оптимизировать код, таким образом, чтобы генерировать более компактный HTML, возможно создавать картинки более высокого разрешения. Всё упирается в максимальный размер сообщения в skype — 29,999 символов (символ █ считается за три обычных).</p>
  <p><strong>Внимание, при большом количестве таких картинок skype начинает сильно тормозить, спасает только очистка истории. Поэтому лучше удалять сообщение с картинкой.</strong></p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/habr/post_images/3ae/362/f8c/3ae362f8c2ea7adb7e52ce9d2de6a17e.png" width="522" />
  </figure>
  <p>Работает только в Windows версии.</p>
  <p>Попробовать можно тут <a href="http://img4skype.com/" target="_blank">img4skype.com</a></p>
  <p><strong>P.S.</strong> Будем рады если кто-то сможет оптимизировать код для генерации картинок бОльшего разрешения.</p>
  <p><strong>UPD:</strong> <a href="http://habrahabr.ru/users/sergey_dobrodey/" target="_blank">sergey_dobrodey</a> Написал версию на .NET с возможностью создавать картинки 40х40 пикселей но с инвертированием цветов <a href="https://github.com/sergeydobrodey/SkypeImage" target="_blank">github.com/sergeydobrodey/SkypeImage</a></p>
  <p><strong>UPD:</strong> <a href="http://habrahabr.ru/users/aruz/" target="_blank">aruz</a> Написал реализацию на .NET генерирующую оптимизированный HTML-код с возможностью регулировать конечный размер и возможностью уменьшение количества цветов <a href="https://github.com/aruz/img4skype" target="_blank">github.com/aruz/img4skype</a><br />Это позволило создавать огромные картинки (первая сгенерирована моим алгоритмом)</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/habr/post_images/748/934/dea/748934dea28b5c0f0c6bfe8386cd6103.png" width="400" />
  </figure>
  <p><strong>UPD:</strong> В новой версии скайпа 5.8.0.154 больше нет возможности отправлять HTML. Но при этом код отправленный с версии младше, отображается в новой версии нормально. Для отправки кода нужна версия ≤5.7</p>
  <hr />
  <p>Статья на хабре <a href="https://habr.com/ru/post/136395/" target="_blank">https://habr.com/ru/post/136395/</a></p>
  <tt-tags>
    <tt-tag name="skype">#skype</tt-tag>
    <tt-tag name="hack">#hack</tt-tag>
  </tt-tags>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/pppoe-session-hijack</guid><link>https://blog.zhovner.com/pppoe-session-hijack?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/pppoe-session-hijack?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>Перехват PPPoE сессии</title><pubDate>Mon, 06 Jul 2020 11:32:08 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/b3/af/b3afe1fd-e2c5-4246-8cdc-3a4f942be337.png"></media:content><tt:hashtag>security</tt:hashtag><tt:hashtag>pppoe</tt:hashtag><tt:hashtag>hack</tt:hashtag><description><![CDATA[<img src="https://habrastorage.org/storage1/9fe7c682/1d3fe8ed/66211e54/e3fa4bd1.png"></img>На видео показан практический способ угона сессии PPPoE с помощью врезки в кабель. При этом не происходит перехвата логина или пароля и не имеет значения используемый тип авторизации (CHAP/PAP).]]></description><content:encoded><![CDATA[
  <figure class="m_column">
    <iframe src="https://player.vimeo.com/video/31007374/?autoplay=false&loop=false&muted=false&title=true"></iframe>
  </figure>
  <p>На видео показан практический способ угона сессии PPPoE с помощью врезки в кабель. При этом не происходит перехвата логина или пароля и не имеет значения используемый тип авторизации (CHAP/PAP).</p>
  <p>Большинство ethernet-провайдеров, к сожалению не используют шифрование всей сессии, ограничиваясь только шифрованием этапа авторизации. Это позволяет представиться легитимным клиентом, перехватив реквизиты существующего подключения.</p>
  <h1>Теория</h1>
  <p><strong>PPPoE</strong> (Point-to-Point Protocol over Ethernet) — протокол канального уровня, на уровень ниже ip, поэтому для установки соединения не требуется ip-адреса, адресация происходит по MAC-ам.</p>
  <p>Условно процесс подключение выглядит так:</p>
  <p>Клиент в поисках pppoe-сервера посылает широковещательный запрос,<br />MAC-адрес назначения FF:FF:FF:FF:FF:FF.<br />Сервер отвечает клиенту и происходит авторизация (например CHAP Challenge)</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/storage1/9fe7c682/1d3fe8ed/66211e54/e3fa4bd1.png" width="700" />
  </figure>
  <p>В установленном соединении сервер идентифицирует клиента по MAC-адресу и Session ID. Пакеты IP инкапсулируются внутрь кадров PPPoE. В незашифрованном подключении всё содержимое пакетов может быть просмотрено:</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/storage1/b945f8e1/a641020f/79710226/13a1517b.png" width="700" />
  </figure>
  <p>Соответственно, узнав реквизиты подключения, можно перехватить сессию:</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/storage1/fe9a0db1/f5d248c6/fb9a657c/7f7fba2c.png" width="700" />
  </figure>
  <p>Для защиты от подобных атак существует опция CHAP Rechallenge, когда сервер повторно идентифицирует клиента с заданным интервалом времени. Ни один из протестированных провайдеров не использовал эту опцию.</p>
  <p>В видео используется виртуальная машина, запущенная в режиме моста с ethernet картой хост-системы.<br />Во время переключения кабеля важно попасть между пакетами LCP-echo.<br />PPPoE-сервер <a href="http://www.roaringpenguin.com/products/pppoe" target="_blank">www.roaringpenguin.com/products/pppoe</a> перекомпилированный с опцией<br /><code>#define DEFAULT_MAX_SESSIONS 64000</code></p>
  <p>Спасибо <a href="https://habrahabr.ru/users/kekekeks/" target="_blank">kekekeks</a> за помощь в ковырянии исходников сервера rp-pppoe.</p>
  <hr />
  <p>Эта статья на хабре <a href="https://habr.com/ru/post/130710/" target="_blank">https://habr.com/ru/post/130710/</a></p>
  <tt-tags>
    <tt-tag name="security">#security</tt-tag>
    <tt-tag name="pppoe">#pppoe</tt-tag>
    <tt-tag name="hack">#hack</tt-tag>
  </tt-tags>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/UTP-sniffer</guid><link>https://blog.zhovner.com/UTP-sniffer?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/UTP-sniffer?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>Сниффер витой пары из Wi-Fi роутера</title><pubDate>Mon, 06 Jul 2020 11:07:15 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/e4/d1/e4d1985d-f09b-4343-92da-f1570e70ab7a.png"></media:content><tt:hashtag>wifi</tt:hashtag><tt:hashtag>hack</tt:hashtag><tt:hashtag>security</tt:hashtag><description><![CDATA[<img src="https://habrastorage.org/getpro/geektimes/post_images/176/612/4dc/1766124dc22f5c2fba14877a62707c6d.png"></img>Трафик проходящий по витой паре может быть прослушан абсолютно незаметно для участников соединения.
В этом посте будет показано как изготовить автономный сниффер с возможностью сохранения дампа на диск и управляемый по Wi-Fi.]]></description><content:encoded><![CDATA[
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/geektimes/post_images/176/612/4dc/1766124dc22f5c2fba14877a62707c6d.png" width="891" />
  </figure>
  <p>Трафик проходящий по витой паре может быть прослушан абсолютно незаметно для участников соединения.<br />В этом посте будет показано как изготовить автономный сниффер с возможностью сохранения дампа на диск и управляемый по Wi-Fi.</p>
  <h4>Теория</h4>
  <p>В сетях стандарта 10/100Base-T передача сигнала происходит по двум парам жил.<br />Tx — отправка<br />Rx — прием<br />Задача состоит в том, чтобы подключить прослушиваемую пару к принимающей паре сниффера.</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/geektimes/post_images/821/b14/209/821b14209948db3296c2cff701427721.png" width="400" />
  </figure>
  <h4>Практика</h4>
  <p>Подойдет любой роутер на который можно установить прошивку <a href="http://dd-wrt.com/site/index" target="_blank">DD-WRT</a> (или <a href="http://openwrt.org/" target="_blank">OpenWRT</a>) с возможностью подключения диска.<br /><a href="http://www.dd-wrt.com/wiki/index.php/Supported_Devices" target="_blank">Список поддерживаемых моделей.</a></p>
  <p>Например старый Linksys WRT-54GL.</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/geektimes/post_images/061/9f7/99e/0619f799efb01f5fd699d6b23c2c1cf7.jpg" width="500" />
  </figure>
  <p>В нем штатно нет возможности подключения флешек, но довольно просто <a href="http://www.the-mesh.org/tiki-index.php?page=LinksysSDCard#Solder_points" target="_blank">можно впаять SD или MMC карту</a>. Замечу только, что карту перед пайкой лучше отформатировать на компьютере в файловой системе ext2 и GPIO выставлять вручную как в <a href="http://tdomhan.wordpress.com/2008/05/17/wrt54gl-sd-card-mod/" target="_blank">этой инструкции</a>. Я припаял контакты напрямую к карточке, но для сохранения возможности извлекать карту можно использовать гнездо от картридера или переходник microSD-&gt;SD</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/geektimes/post_images/721/831/825/72183182558fdc560e9c6681487f9a75.jpg" width="800" />
  </figure>
  <p>Прошивка DD-WRT — это миниатюрный Linux. Который при наличии свободно места на диске легко превращается в полнофункциональную систему с менеджером пакетов.</p>
  <p>На роутерах с объемом памяти мене 32мб (как в моем случаи 16мб), ядро урезанно и процесс установки менеджера пакетов несколько отличается от <a href="http://www.dd-wrt.com/wiki/index.php/Ipkg" target="_blank">такового в полных версиях прошивки с поддержкой jffs</a>.</p>
  <p>Далее подрозумевается, что роутер уже прошит (без поддержки jffs), карта памяти или USB-флешка уже установлена и смонитрованна в /mmc. Подключаемся telnet-ом, логин root, пароль установленный на веб-морду.</p>
  <p>Создаем папку:</p>
  <pre>mkdir /mmc/opt</pre>
  <p>Монтируем ее на карту(эту команду необходимо добавить в стартовый скрипт через веб-интерфейс):</p>
  <pre>mount -o bind /mmc/opt /opt</pre>
  <p>Запускаем установщик ipkg-opt (нужен интернет):</p>
  <pre>cd /mmc </pre>
  <pre>wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh</pre>
  <pre>sh ./optware-install-ddwrt.sh</pre>
  <p>Установка займет несколько минут. Далее:</p>
  <pre>ipkg-opt install libuclibc++</pre>
  <p>Теперь менджер пакетов готов к работе. Обновить список пакетов: <em>ipkg-opt update</em>. Вывести список доступных пакетов: <em>ipkg-opt list</em>.<br />Для сбора трафика необходим tcpdump:</p>
  <pre>ipkg-opt install tcpdump</pre>
  <p>Слушающим портом будет WAN, в системе он eth0. Подсоединяем крокодильчики к интересующей паре (обычно Tx интересней) и запускаем дамп:</p>
  <pre>tcpdump -i eth0</pre>
  <p>В зависимости от схемы обжима, цвета пар могут быть разными. Определить нужную можно только экспериментально, по значению destination и source.<br />Крокодильчики лучше припаять к многожильному гибкому кабелю, иначе хрупкие жилы будут отламываться.</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/geektimes/post_images/a51/dd9/4b8/a51dd94b835178f20be288485bb2fc82.jpg" width="600" />
  </figure>
  <p>Запуск tcpdump можно так же добавить в стартовый скрипт системы для автоматического запуска после перезагрузок.<br />К роутерму можно подключаться по wi-fi и скачивать файлы например по sftp (нужно включить SSH в веб-интерфейсе).Теги:</p>
  <p></p>
  <hr />
  <p></p>
  <p>Статья была изначально опубликована на Хабре <a href="https://habr.com/ru/post/90678/" target="_blank">https://habr.com/ru/post/90678/</a></p>
  <tt-tags>
    <tt-tag name="wifi">#wifi</tt-tag>
    <tt-tag name="hack">#hack</tt-tag>
    <tt-tag name="security">#security</tt-tag>
  </tt-tags>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/OpenPGP-Card-Factory-Reset</guid><link>https://blog.zhovner.com/OpenPGP-Card-Factory-Reset?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/OpenPGP-Card-Factory-Reset?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>OpenPGP Card V2.0 Factory Reset</title><pubDate>Sun, 05 Jul 2020 00:25:13 GMT</pubDate><category>Tools</category><description><![CDATA[Если от OpenPGP был утерян PIN код, или требуется полностью стереть все ключи и настройки, можно вернуть карту к заводскому состоянию. Вероятно, эта поцедура может помочь починить брикнутую карту.]]></description><content:encoded><![CDATA[
  <p>Если от OpenPGP был утерян PIN код, или требуется полностью стереть все ключи и настройки, можно вернуть карту к заводскому состоянию. Вероятно, эта поцедура может помочь починить брикнутую карту.</p>
  <p>Я использую OpenPGP карту на устройстве <a href="https://www.yubico.com/products/yubikey-hardware/yubikey-neo/" target="_blank">Yubikey Neo</a><br />И GPG для OS X из пакета <a href="https://gpgtools.org/" target="_blank">GPGtools.org</a></p>
  <p>Описанное ниже справедливо только для OpenPGP Card V2.0</p>
  <p>Процедура представляет из себя посылку APDU команд карте с помощью <code>gpg-connect-agent</code>.<br />В маке он он находится в <code>/usr/local/MacGPG2/bin/gpg-connect-agent</code></p>
  <p>Перед началом нужно убедиться, что карта отвечает на APDU.</p>
  <p>Запрос версии прошивки:</p>
  <p>Возврат к заводскому состоянию:</p>
  <pre># /usr/local/MacGPG2/bin/gpg-connect-agent -r ./openpgpcard_reset_apdu.scd
</pre>
  <p>Содержимое файла <code>openpgpcard_reset_apdu.scd</code>:</p>
  <pre>/hex
scd reset
scd serialno undefined
scd apdu 00 A4 04 00 06 D2 76 00 01 24 01
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 e6 00 00
scd reset
scd serialno undefined
scd apdu 00 A4 04 00 06 D2 76 00 01 24 01
scd apdu 00 44 00 00
/echo Card has been reset to factory defaults 
/bye
</pre>
  <p>Карта после очистки:</p>
  <pre>$ gpg --card-status
Application ID ...: D3740021040118000002040210340000
Version ..........: 2.0
Manufacturer .....: Yubico
Serial number ....: 02961802
Name of cardholder: [not set]
Language prefs ...: [not set]
Sex ..............: unspecified
URL of public key : [not set]
Login data .......: [not set]
Signature PIN ....: forced
Key attributes ...: 2048R 2048R 2048R
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 3 3
Signature counter : 0
Signature key ....: [none]
Encryption key....: [none]
Authentication key: [none]
General key info..: [none]
</pre>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/universal-ikev2-server-configuration</guid><link>https://blog.zhovner.com/universal-ikev2-server-configuration?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/universal-ikev2-server-configuration?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>Universal IKEv2 Server Configuration</title><pubDate>Sun, 05 Jul 2020 00:23:40 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/f1/a7/f1a70884-69e3-4dc2-a457-ca5004ec20ea.png"></media:content><description><![CDATA[<img src="https://hub.zhovner.com/img/ikev2_vs_othervpn.png"></img>IKEv2 is a modern protocol developed by Microsoft and Cisco which was chosen as a default VPN type in OS X 10.11 (El Capitan) and Windows since 7. It supports strong encryption, auto reconnection on network change (MOBIKE), easy configuration and more.]]></description><content:encoded><![CDATA[
  <figure class="m_original">
    <img src="https://hub.zhovner.com/img/ikev2_vs_othervpn.png" width="900" />
  </figure>
  <p>IKEv2 is a modern protocol developed by Microsoft and Cisco which was chosen as a default VPN type in OS X 10.11 (El Capitan) and Windows since 7. It supports strong encryption, auto reconnection on network change (<a href="https://tools.ietf.org/html/rfc4555" target="_blank">MOBIKE</a>), easy configuration and more.</p>
  <p>This manual describes minimal IKEv2 server configuration for the most simple client setup based on username/password authentication.</p>
  <p><strong>No 3rd party software required on client side</strong> Only native OS tools used on client devices with Windows, MacOS, iOS.</p>
  <p><strong>No certificates importing on client</strong> Simple configuration. Just type login/passowrd and server address like any other VPN connection.</p>
  <p><em>IKEv2 supported platforms</em></p>
  <figure class="m_column">
    <img src="https://teletype.in/files/21/51/2151e460-ef75-467a-bbf4-39627a6c12c8.png" width="1096" />
  </figure>
  <h2>X.509 Certificates intro</h2>
  <p>In order to prevent man-in-the-middle attacks IPsec IKEv2 server always authenticates itself with an X.509 certificate using a strong RSA or ECDSA signature. After a secure communication channel has been established, clients authenticate themselves using the EAP-MSCHAPv2 protocol based on user name and password (or other authentication protocol). This means that client needs to verify X.509 certificate authenticity using <a href="https://en.wikipedia.org/wiki/Certificate_authority" target="_blank">CA</a> in system keychan. Just as for HTTPS connections in a web browser. Server certificate must be valid for successful client authentication.</p>
  <p>There are two ways of getting server certificate:</p>
  <p><strong>1.</strong> Use certificate issued by CA trusted by most operating systems. <strong>2.</strong> Issue self-signed certificate and distribute your own CA to every clients’ system.</p>
  <p>The First way makes connection setup much easier on client side because it does not require importing any certificates in the system. This way is recommended. Self-signed certificates are more complicated. Follow this way only if you know exactly what you need them for and how to manage your own PKI.</p>
  <h3>Issue certificate from one of Ceritifaces Authorities</h3>
  <p>Fortunately X.509 certificates that we used to deploy as SSL certificates for HTTPS web servers are also suitable for IKEv2. You can get free certificate from <a href="https://buy.wosign.com/free/" target="_blank">Wosign</a>, <a href="https://www.startssl.com/" target="_blank">StartSSL</a>, or <a href="https://letsencrypt.org/" target="_blank">LetsEncrypt</a>, or any of your favorite CA.</p>
  <p>The only few requirements wich certificate must comply with:</p>
  <ul>
    <li>Have an Extended Key Usage (EKU) flag explicitly allowing the certificate to be used for authentication purposes. OID 1.3.6.1.5.5.7.3.1 (often called TLS server authentication) All certificated issued for web servers authenitcation have this flag.</li>
    <li>Subdomain wich will be used as IKEv2 server adress must be in Subject Alternative Name. Needed domain must be added as a additional domain, not as general one when issuing SSL certificate. I will use <code>tunnel.zhovner.com</code> as example.</li>
    <li><em>(Optional)</em> If possible choose SHA-256 instead of SHA-1 signature algorithm, because SHA-1 is weak and deprecated.</li>
  </ul>
  <figure class="m_original">
    <img src="https://hub.zhovner.com/img/ipsec_x509.png" width="484" />
  </figure>
  <h3>Selfsigned certificates</h3>
  <p>Selfsigned certificates requires to deploy complete <a href="https://en.wikipedia.org/wiki/Public_key_infrastructure" target="_blank">PKI</a>. Issue your own Root Certificate Authority (CA), destribute this CA to all clients systems, issue server certificate, manage CLR (Certificate Revocation List) and OCSP. This subject is very complicated and goes out this manual, so I won’t describe it here. In most cases you don’t need selfsigned certificates. It is required only if you are planning to use client certificate authentication (without username/password). If you decided to use selfsigned certificates, take a look at <a href="https://github.com/ValdikSS/easy-rsa-ipsec" target="_blank">EasyRSA fork</a> than allows to issue certificates suitable both for OpenVPN and IKEv2 and simplifies PKI management.</p>
  <hr />
  <h2>Server configuration</h2>
  <p><a href="https://www.strongswan.org/" target="_blank">strongSwan</a> - powerfull and open source IPsec/IKEv2 server and client solution. You will need any Linux box with 2.6 or 3.x kernel to run strongSwan server. Check that your favorite distro have strongSwan ≥ 5.x package in repo. If you run Linux in virtual container, make sure that you have XEN or KVM virtualization but not OpenVZ, because OpenVZ not supporting kernel IPsec.</p>
  <p>I recommend <a href="https://www.linode.com/?r=f29232fc46afc280fceac66c08d46ebfec507fb9" target="_blank">Linode</a> as VPS hosting bacause they provide additional /64 IPv6 routable subnet that easely can be assigned to IPsec clients.</p>
  <p>In this example I will use <code>Debian 8.2 jessie</code> as most common distro. Make sure that your stongSwan package not older than <code>5.2.1-6+deb8u2</code></p>
  <p>Installing strongSwan and extra plugins:</p>
  <p><code>apt-get install strongswan libcharon-extra-plugins</code></p>
  <p>On this step you must have all necessary certificates and key files.</p>
  <p>List of required files:</p>
  <p><strong>privatekey.pem</strong> — RSA private key which was used for CSR when issuing certificate. Key must be non-encrypted.</p>
  <p><strong>CA.crt</strong> — Root Certificate of your Certificate Authority. It can be downloaded from web or exported from system keychain.</p>
  <p><strong>intermediate1.crt</strong> — intermediate certificate of your Certificate Authority. If you get certificate from WoSign look at <em>for Other Server.zip</em> archive.</p>
  <p><strong>intermediate2.crt</strong> — <em>(optional)</em> Number of intermediate certificates may be varied, depending on your CA.</p>
  <p><strong>my.crt</strong> — your certificate. In the example this file will be named <strong>tunnel.zhovner.com.crt</strong></p>
  <p><em>How this chain looks from Google Chrome certificate information</em></p>
  <figure class="m_original">
    <img src="https://hub.zhovner.com/img/x509_chain.png" width="484" />
  </figure>
  <p>Place each file to the proper path:</p>
  <pre>/etc/ipsec.d/private/privatekey.pem
/etc/ipsec.d/cacerts/ca.crt
/etc/ipsec.d/cacerts/intermediate1.crt
/etc/ipsec.d/cacerts/intermediate2.crt
/etc/ipsec.d/certs/tunnel.zhovner.com.crt
</pre>
  <p>Edit <code>/etc/ipsec.secrets</code> that contains users and private keys credentionals:</p>
  <p>Edit <code>/etc/ipsec.conf</code>:</p>
  <p>Restart strongSwan to read new config files:</p>
  <p><code>systemctl restart strongswan</code></p>
  <p>Verify that all cerifitaces configured correctly by executing <code>ipsec listall</code> Notice that output is very long and must be readed from the top. Full certificates chain must be presented and Entity Certificate must contain “has private key”.</p>
  <pre>List of X.509 End Entity Certificates:

  altNames:  zhovner.com, www.zhovner.com, hub.zhovner.com, tunnel.zhovner.com, ....
  subject:  &quot;CN=zhovner.com&quot;
  issuer:   &quot;C=CN, O=WoSign CA Limited, CN=CA CA 沃通免费SSL证书 G2&quot;
  serial:    11:eb:85:14:5b:e2:56:96:0d:b4:fe:f2:4a:88:48:21
  validity:  not before Apr 22 17:19:27 2015, ok
             not after  Apr 22 18:19:27 2018, ok
  pubkey:    RSA 2048 bits,

&lt;font color=&quot;red&quot;&gt;&lt;b&gt;has private key&lt;/b&gt;&lt;/font&gt;
  keyid:     0a:c6:c8:96:59:73:2c:6c:6f:7d:03:d0:35:da:e8:49:db:86:6e:fb
  subjkey:   f8:b0:bb:e9:9b:2c:8c:a2:90:b2:c0:77:b5:2b:c1:1f:d0:98:7e:d7
  authkey:   30:da:74:86:f3:28:90:56:9e:d7:31:31:c2:bd:59:cd:93:12:39:1d

List of X.509 CA Certificates:

  subject:  &quot;C=CN, O=WoSign CA Limited, CN=CA 沃通免费SSL证书 G2&quot;
  issuer:   &quot;C=CN, O=WoSign CA Limited, CN=CA 沃通根证书&quot;
  serial:    01:58:8c:3a:35:07:b3:f8:97:23:1c:76:b7:ef:85:dd
  validity:  not before Nov 08 03:58:58 2014, ok
             not after  Nov 08 03:58:58 2029, ok
  pubkey:    RSA 2048 bits
  keyid:     7b:07:23:98:e4:9f:25:2f:19:3f:76:4d:cd:0f:70:f6:4b:fc:b0:e6
  subjkey:   30:da:74:86:f3:28:90:56:9e:d7:31:31:c2:bd:59:cd:93:12:39:1d
  authkey:   e0:4d:bf:dc:9b:41:5d:13:e8:64:f0:a7:e9:15:a4:e1:81:c1:ba:31
  pathlen:   0

  subject:  &quot;C=CN, O=WoSign CA Limited, CN=CA 沃通根证书&quot;
  issuer:   &quot;C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom Certification Authority&quot;
  serial:    1f:ce:a7:f6:a9:7f:e9
  validity:  not before Sep 18 02:46:36 2006, ok
             not after  Jan 01 02:59:59 2020, ok
  pubkey:    RSA 4096 bits
  keyid:     c2:06:fb:d5:3b:ba:0c:ee:f2:d2:d2:45:3d:07:52:26:3a:9f:e7:5f
  subjkey:   e0:4d:bf:dc:9b:41:5d:13:e8:64:f0:a7:e9:15:a4:e1:81:c1:ba:31
  authkey:   4e:0b:ef:1a:a4:40:5b:a5:17:69:87:30:ca:34:68:43:d0:41:ae:f2
  pathlen:   2

  subject:  &quot;C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom Certification Authority&quot;
  issuer:   &quot;C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom Certification Authority&quot;
  serial:    01
  validity:  not before Sep 17 23:46:36 2006, ok
             not after  Sep 17 22:46:36 2036, ok
  pubkey:    RSA 4096 bits
  keyid:     23:4b:71:25:56:13:e1:30:dd:e3:42:69:c9:cc:30:d4:6f:08:41:e0
  subjkey:   4e:0b:ef:1a:a4:40:5b:a5:17:69:87:30:ca:34:68:43:d0:41:ae:f2
</pre>
  <p>That’s all. If everything looks right try connect to server. For debbuging connection problems run live logs stream <code>journalctl -f -u strongswan</code></p>
  <h4>NAT</h4>
  <p>For let out VPN clients into Internet you need configure NAT. This subject is not covered in this manual.</p>
  <p>For testing porpose <em>(insecure)</em>:</p>
  <p><code>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</code> <code>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</code></p>
  <h4>IPv6 issues</h4>
  <p>It is possible to assign native IPv6 addresses as well as IPv4 to VPN clients. For this you will need additional IPv6 subnet routed to you machine but not assigned on server interface. Unfortunately from lots of VPS providers that I’ve used, only <a href="https://www.linode.com/?r=f29232fc46afc280fceac66c08d46ebfec507fb9" target="_blank">Linode</a> provide additional /64 IPv6 subnet for free.</p>
  <p>For DigitalOcean and others providers you will need setup NDP proxy. Related thread <a href="https://lists.strongswan.org/pipermail/users/2015-July/008365.html" target="_blank">https://lists.strongswan.org/pipermail/users/2015-July/008365.html</a></p>
  <hr />
  <h2>Client configuration</h2>
  <h3>macOS &gt;10.11 and iOS 9 autconfiguration profile</h3>
  <p>A configuration profile is an XML file that allows you to distribute configuration information. If you need to configure a large number of devices or to provide lots of custom email settings, VPN profiles, network settings, or certificates to a large number of devices, configuration profiles are an easy way to do it. In our case we will use VPN payload for one click configuration. For IKEv2 VPN connections the configuration profile is the only way to set advanced options like ciphers, DH groups, PFS, rekey timeout and so on. More about it <a href="https://developer.apple.com/library/ios/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html" target="_blank">https://developer.apple.com/library/ios/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html</a></p>
  <p>Configuration profile can be created manually or via <a href="https://itunes.apple.com/gb/app/apple-configurator-2/id1037126344?mt=12" target="_blank">Apple Configurator 2</a> utility. Syntax is same for OS X and iOS. Profile can be distributed as mail attachments or via http link. Profile name must end with <code>.mobileconfig</code> and if you plan to share it over HTTP web server should response with Content-Type <code>application/octet-stream</code>.</p>
  <h3>Always On Mode</h3>
  <p>In Apple terms “Always On” mode prevents user from disconnect VPN manually. This mode can be configured only on device that in supervision mode. But you can do the same without supervision mode in more flexible way by usign rule that connects VPN automatically every time when you have internet connection. And reconnect it when connection lost. “On demand” mode can be configured only via <code>.mobileconfig</code> profile.</p>
  <p>This mode can cause a problems when you can’t connect to the VPN server, becuase it will block internet access without VPN connection. To disable <code>Always On</code> mode unchek <code>On Demand</code> options in VPN connection preferences.</p>
  <figure class="m_original">
    <img src="https://hub.zhovner.com/img/always_on_ondemand_ikev2.png" width="800" />
  </figure>
  <h3>Debug log in macOS</h3>
  <p>If your connection doesn’t work in macOS, it silently disconnect without any error code. Debug log can be viewed in system utility <code>Console.app</code>. Type <code>networkextension</code> in search and try to connect.</p>
  <p>To <strong>increase</strong> verbosity: <code>sudo defaults write /Library/Preferences/com.apple.networkextension.control.plist LogLevel 6</code> Back to default: <code>sudo defaults write /Library/Preferences/com.apple.networkextension.control.plist LogLevel 5</code></p>
  <p>Also read this: <a href="https://forums.developer.apple.com/thread/31375" target="_blank">https://forums.developer.apple.com/thread/31375</a></p>
  <h3>Autoconfig profile template</h3>
  <p>The easiest way to get working profile is to edit 4 variables in this template: RemoteAddress, RemoteIdentifier, AuthName, AuthPassword. Edit the rest of template following comments. Example profile of our VPN server <code>supervpn.mobileconfig</code>:</p>
  <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
    &lt;key&gt;PayloadContent&lt;/key&gt;
    &lt;array&gt;
        &lt;dict&gt;
            &lt;key&gt;IKEv2&lt;/key&gt;
            &lt;dict&gt;

                &lt;!-- Username and password from ipsec.secrets --&gt;
                &lt;key&gt;AuthName&lt;/key&gt;
                &lt;string&gt;obama&lt;/string&gt;
                &lt;key&gt;AuthPassword&lt;/key&gt;
                &lt;string&gt;SuperPassword123&lt;/string&gt;

                &lt;!-- Hostname or IP address of VPN server.
                 Chosing IP address instead of DNS name can avoid issues with client DNS resolvers and speed up connection process. --&gt;
                &lt;key&gt;RemoteAddress&lt;/key&gt;
                &lt;string&gt;43.12.22.134&lt;/string&gt;

                &lt;!-- leftid in ipsec.conf --&gt;
                &lt;key&gt;RemoteIdentifier&lt;/key&gt;
                &lt;string&gt;tunnel.zhovner.com&lt;/string&gt;

                &lt;key&gt;AuthenticationMethod&lt;/key&gt;
                &lt;string&gt;Certificate&lt;/string&gt;
                &lt;key&gt;ChildSecurityAssociationParameters&lt;/key&gt;
                &lt;dict&gt;

                &lt;!-- in ipsec.conf this proposal is: ike=aes256-sha256-modp2048 --&gt;
                    &lt;key&gt;DiffieHellmanGroup&lt;/key&gt;
                    &lt;integer&gt;14&lt;/integer&gt;
                    &lt;key&gt;EncryptionAlgorithm&lt;/key&gt;
                    &lt;string&gt;AES-256&lt;/string&gt;
                    &lt;key&gt;IntegrityAlgorithm&lt;/key&gt;
                    &lt;string&gt;SHA2-256&lt;/string&gt;
                    &lt;key&gt;LifeTimeInMinutes&lt;/key&gt;
                    &lt;integer&gt;1440&lt;/integer&gt;
                &lt;/dict&gt;
                &lt;key&gt;DeadPeerDetectionRate&lt;/key&gt;

                &lt;!--
                    None (Disable)
                    Low (keepalive sent every 30 minutes)
                    Medium (keepalive sent every 10 minutes)
                    High (keepalive sent every 1 minute)
                --&gt;
                &lt;string&gt;High&lt;/string&gt;
                &lt;key&gt;ExtendedAuthEnabled&lt;/key&gt;
                &lt;true/&gt;
                &lt;key&gt;IKESecurityAssociationParameters&lt;/key&gt;
                &lt;dict&gt;
                    &lt;key&gt;DiffieHellmanGroup&lt;/key&gt;
                    &lt;integer&gt;14&lt;/integer&gt;
                    &lt;key&gt;EncryptionAlgorithm&lt;/key&gt;
                    &lt;string&gt;AES-256&lt;/string&gt;
                    &lt;key&gt;IntegrityAlgorithm&lt;/key&gt;
                    &lt;string&gt;SHA2-256&lt;/string&gt;
                    &lt;key&gt;LifeTimeInMinutes&lt;/key&gt;
                    &lt;integer&gt;1440&lt;/integer&gt;
                &lt;/dict&gt;

                &lt;!--
                Always On OnDemand Rule
                Cen be disabled in connection preferences by &quot;On Demand&quot; checkbox
                http://www.v2ex.com/t/137653
                https://developer.apple.com/library/mac/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html
                https://github.com/iphoting/ovpnmcgen.rb
                --&gt;
                &lt;key&gt;OnDemandEnabled&lt;/key&gt;
                    &lt;integer&gt;1&lt;/integer&gt;
                    &lt;key&gt;OnDemandRules&lt;/key&gt;
                    &lt;array&gt;
                        &lt;dict&gt;
                            &lt;key&gt;Action&lt;/key&gt;
                            &lt;string&gt;Connect&lt;/string&gt;
                        &lt;/dict&gt;
                    &lt;/array&gt;
            &lt;/dict&gt;
            &lt;key&gt;IPv4&lt;/key&gt;
            &lt;dict&gt;
                &lt;key&gt;OverridePrimary&lt;/key&gt;
                &lt;integer&gt;1&lt;/integer&gt;
            &lt;/dict&gt;
            &lt;key&gt;PayloadDescription&lt;/key&gt;
            &lt;string&gt;Configures VPN settings&lt;/string&gt;
            &lt;key&gt;PayloadDisplayName&lt;/key&gt;
            &lt;string&gt;VPN&lt;/string&gt;
            &lt;key&gt;PayloadIdentifier&lt;/key&gt;
            &lt;string&gt;com.apple.vpn.managed.96C1C38F-D4D6-472E-BA90-9117ED8896B5&lt;/string&gt;
            &lt;key&gt;PayloadType&lt;/key&gt;
            &lt;string&gt;com.apple.vpn.managed&lt;/string&gt;
            &lt;key&gt;PayloadUUID&lt;/key&gt;
            &lt;string&gt;96C1C38F-D4D6-472E-BA90-9117ED8896B5&lt;/string&gt;
            &lt;key&gt;PayloadVersion&lt;/key&gt;
            &lt;integer&gt;1&lt;/integer&gt;

            &lt;!-- VPN connection name in Network Preferences --&gt;
            &lt;key&gt;UserDefinedName&lt;/key&gt;
            &lt;string&gt;London VPN&lt;/string&gt;
            &lt;key&gt;VPNType&lt;/key&gt;
            &lt;string&gt;IKEv2&lt;/string&gt;
        &lt;/dict&gt;
    &lt;/array&gt;

    &lt;!-- Set the name to whatever you like, it is used in the profile list on the device --&gt;
    &lt;key&gt;PayloadDisplayName&lt;/key&gt;
    &lt;string&gt;My Super IKEv2 VPN&lt;/string&gt;

    &lt;!-- A reverse-DNS style identifier (com.example.myprofile, for example) that identifies the profile. This string is used to determine whether a new profile should replace an existing one or should be added. --&gt;
    &lt;key&gt;PayloadIdentifier&lt;/key&gt;
    &lt;string&gt;com.zhovner.tunnel&lt;/string&gt;

    &lt;!-- A globally unique identifier, use uuidgen on Linux/Mac OS X to generate it --&gt;
    &lt;key&gt;PayloadUUID&lt;/key&gt;
    &lt;string&gt;F3FAD91C-019C-4A79-87A1-CF334C583339&lt;/string&gt;
    &lt;key&gt;PayloadType&lt;/key&gt;
    &lt;string&gt;Configuration&lt;/string&gt;
    &lt;key&gt;PayloadVersion&lt;/key&gt;
    &lt;integer&gt;1&lt;/integer&gt;
&lt;/dict&gt;
&lt;/plist&gt;
</pre>
  <h3>iOS manual configuration</h3>
  <figure class="m_custom">
    <img src="https://hub.zhovner.com/img/iosikev2.png" width="1000" />
  </figure>
  <h3>OS X 10.11 manual configuration</h3>
  <p>It’s impossible to set advanced options (like ciphers, DH groups, PFS, rekey timeout) via GUI. If you need it use configuration profile method.</p>
  <ol>
    <li>Create new VPN connection in network preferences</li>
    <li>Choose type IKEv2 and name of connection</li>
    <li>Set server address and RemoteID (leftid in ipsec.conf)</li>
    <li>Enter username and password from ipsec.secrets file</li>
    <li>Connect to VPN</li>
  </ol>
  <h3>Windows 7/8/10 IKEv2 manual configuration</h3>
  <p>In windows you can’t define RemoteID separately from server address, so FQDN should be used. Also keep in mind that IPv6 will not work in windows.</p>
  <figure class="m_original">
    <img src="https://hub.zhovner.com/img/windows_ikev2.png" width="800" />
  </figure>
  <h3>Linux roadwarrior client</h3>
  <p>This also works on MacOS/FreeBSD</p>
  <p><strong>Install strongswan</strong></p>
  <p><strong>Configure CA’s</strong></p>
  <p>Openssl and ca-certs must be installed.</p>
  <pre>rmdir /etc/ipsec.d/cacerts
ln -s /etc/ssl/certs /etc/ipsec.d/cacerts
</pre>
  <p><strong>Setup config /etc/ipsec.conf</strong></p>
  <pre>conn my-super-vpn

    keyexchange=ikev2
    #forceencaps=yes
    dpdaction = restart
    dpddelay = 30s
    keyingtries=%forever

    # start at boot
    auto=start

    rekey=no
    reauth=no
    fragmentation=yes
    #compress=yes

    # left - local  side
    left=%any
    eap_identity=x220
    leftsourceip=%any,%any6
    leftauth=eap-mschapv2

    # right - remote side
    right=q.zhovner.com
    rightsubnet=0.0.0.0/0,::/0
</pre>
  <p><strong>Connect to server</strong></p>
  <pre>ipsec restart</pre>

]]></content:encoded></item><item><guid isPermaLink="true">https://blog.zhovner.com/how-skype-fixes-security-vulnerabilities</guid><link>https://blog.zhovner.com/how-skype-fixes-security-vulnerabilities?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner</link><comments>https://blog.zhovner.com/how-skype-fixes-security-vulnerabilities?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=zhovner#comments</comments><dc:creator>zhovner</dc:creator><title>How Skype fixes security vulnerabilities</title><pubDate>Sat, 04 Jul 2020 20:02:54 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/bf/40/bf403b37-8a3f-4c8c-a7d3-9c3e85eb804b.png"></media:content><tt:hashtag>skype</tt:hashtag><tt:hashtag>security</tt:hashtag><tt:hashtag>scam</tt:hashtag><description><![CDATA[<img src="https://habrastorage.org/files/09a/f14/e02/09af14e02e2b40178b7f543e83707803.png"></img>This post describes my fruitless effort to convince Microsoft employees that their service is vulnerable, and the humiliation one has to go through should one’s account be blocked by a hacker. This is a story of ignorance, pain and despair.]]></description><content:encoded><![CDATA[
  <figure class="m_original">
    <img src="https://habrastorage.org/files/09a/f14/e02/09af14e02e2b40178b7f543e83707803.png" width="780" />
  </figure>
  <h3>In a nutshell: they don’t</h3>
  <p>This post describes my fruitless effort to convince Microsoft employees that their service is vulnerable, and the humiliation one has to go through should one’s account be blocked by a hacker. This is a story of ignorance, pain and despair.</p>
  <h4>TL;DR</h4>
  <ul>
    <li><strong>Anyone can block your account permanently</strong> and you can’t do anything about it. The only thing that a hacker needs to know is your Skype login. In most cases Skype support will refuse to unblock your account. Microsoft has known about the problem for years.</li>
    <li>8-digit authentication code (Microsoft Security Code) generation algorithm is vulnerable. These codes are used for password restore, and the hacker can just guess the code without an access to your email account.</li>
    <li>Skype tech support is vulnerable to social engineering, and Microsoft is perfectly OK with that.</li>
    <li>Skype tech support doesn’t even know what’s going on with your account and why it has been blocked in the first place. Regardless of the reason you’ll get a standard response that your account was blocked for “violating the terms and conditions” even if it was you who clicked “Block account” button in the web interface.</li>
    <li>Skype still discloses your public and private IP addresses (the one that’s on the local interface, behind NAT). In some cases it’s possible to obtain other Skype IDs that are using the same network (e. g. your family members using the same Wi-Fi)</li>
    <li>A hacker can hide an active Skype session from the session list (which is available via <code>/showplaces</code> command) using old SDK versions. This allows to stealthily read your messages if one has managed to obtain your password.</li>
  </ul>
  <h3>About me</h3>
  <p>I’ve been using Skype for 10 years. I used to be a Skype fanboy. When jira.skype.com (Skype’s public bug tracker) was still available, I’ve been trying to improve Skype and reporting bugs.</p>
  <p>For instance, there was SCW-2778 Remote DoS exploit. This vulnerability allowed an adversary to crash a desktop version of Skype, and break the local history so that the user had to clear it for Skype to work. Another example is SCW-3328 which allowed to remotely turn on your muted microphone during a call.</p>
  <p>Even at that time, I was worried by Skype’s approach to fixing bugs. I had to literally beg the developers to fix a problem that was there for years.</p>
  <p>I was using all Skype’s products, developer instruments (Skype4COM, SkypeKit), premium subscriptions, Skype For Business. I have created bots, a custom emoticon generation service, etc.</p>
  <p>But today I <strong>sincerely hate</strong> Skype. It’s a horrible service drowning in bureaucracy and ignorance of employees, that ignores real problems and adds 3D Emoticons™ as a major feature. Today Skype is not only insecure but <strong>hazardous to its users</strong> since security procedures are not only inefficient, they are working against them.</p>
  <h3>Chronology</h3>
  <p>Vulnerabilities that allow an adversary block an arbitrary Skype account are present for a few years. There is more than one, and some of them are actively exploited in the wild. Moreover, account blocking is provided as a service.</p>
  <p>I used to post a lot about Skype vulnerabilities, and some victims of the exploits contacted me, after finding me on Google.</p>
  <p>I have seen various Skype account blocking techniques. I have tried to help people restore access to their accounts and plead Skype to do something about it. Mostly the accounts were blocked via mass abuse reports. It is a well-known technique that’s been here for many years. It is so old it became a tool of children’ subculture for fighting against each other in Skype. But something outrageous has happened in the last year, which I absolutely have to speak about.</p>
  <h3>Technique 1 - mass abuse reports (classics)</h3>
  <p>A Skype account is blocked if sufficiently many abuse reports for this account are sent by other Skype members. Presumably, sufficiently many means more than 20. In order to send a report you don’t even need to add the target into contacts: it is possible to send a report from search results by clicking “<strong>Block —&gt; report an abuse</strong>” Thus the victim may stay completely unaware of all the reports being sent about him/her.</p>
  <p>This technique exists for many years. It’s been <a href="https://translate.google.com/translate?sl=ru&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fhabrahabr.ru%2Fpost%2F183302%2F&edit-text=&act=url" target="_blank">reported earlier</a>, even kids know about it: they unite into groups for coordinated mass reporting.<br />There is a list of VK.com groups (Russian Facebook-alike social network) created for that purpose (obtained by a quick search):<br /><a href="https://vk.com/block_pidaram_skype" target="_blank">vk.com/block<em>pidaram</em>skype</a><br /><a href="https://vk.com/skype_delete" target="_blank">vk.com/skype_delete</a><br /><a href="https://vk.com/blacklistskype" target="_blank">vk.com/blacklistskype</a><br /><a href="https://vk.com/blockskyp" target="_blank">vk.com/blockskyp</a><br /><a href="https://vk.com/eds_snos" target="_blank">vk.com/eds_snos</a><br /><a href="https://vk.com/club58649499" target="_blank">vk.com/club58649499</a><br /><a href="https://vk.com/club49404483" target="_blank">vk.com/club49404483</a></p>
  <p>Similar groups exist within Skype itself. There is a specific subculture of abusers, mostly composed of 12- to 19-year-olds, uniting into clans. The main purpose of their actions is to hurt a randomly chosen victim as hard as possible.</p>
  <p>The majority of attacks are conducted via verbal duels in group calls. The aim is to humiliate a person the more painfully the better and to record it on video.</p>
  <h4>Duel recordings (Warning: shouting and swearing in russian)</h4>
  <p><a href="https://www.youtube.com/watch?v=F3mDFk5m_Hs" target="_blank">youtube.com/watch?v=F3mDFk5m_Hs</a><br /><a href="https://www.youtube.com/watch?v=cwNixaAML4I" target="_blank">youtube.com/watch?v=cwNixaAML4I</a><br /><a href="https://www.youtube.com/watch?v=zWhCcqTnjxw" target="_blank">youtube.com/watch?v=zWhCcqTnjxw</a><br /><a href="https://www.youtube.com/watch?v=4vhy-J-kQtk" target="_blank">youtube.com/watch?v=4vhy-J-kQtk</a> (Skype account blocked at the end)</p>
  <p>Some clans of these abusers publish their own software designed for the malicious activity of mass abuse reporting.</p>
  <p><a href="https://www.youtube.com/watch?v=Uu9-4digVL8" target="_blank">Here is a video</a> demonstrating such software in work. It is a kind of a botnet resulting in contact list voluntarily sending reports for selected accounts. Remember that it is not necessary to add a victim into your own contact list, which means that you can be reported by a hundred of school kids you never talked to, and you’ll never know.</p>
  <p>I personally know ≈10 victims whose accounts were blocked this way. But all attempts to recover their accounts via Skype support result in a generic reply:</p>
  <blockquote>I understand that your Skype account was blocked. I apologize for any inconvenience that this may have caused, but I will be more than happy to look into this for you.Our automatic systems detected that activities which are contrary to Skype’s Terms and Conditions have taken place via your Skype account. As a result, your account has been restricted and will remain restricted until further notice.</blockquote>
  <p>Do you think this vulnerability is fixed by now? Of course it’s not.</p>
  <h3>Blocking through tech support</h3>
  <p>In fall, 2015, I started receiving messages from people that suffered from a new type of attack.</p>
  <p>This time, before account is blocked, victim received e-mails from Microsoft, containing 8-number code. The letters were sent from <strong>verifyme@microsoft.com</strong> and had valid DKIM signature, which meant there were sent by Microsoft itself.</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/habr/post_images/c3f/a93/594/c3fa93594abc59015f23a6324442f503.png" width="772" />
  </figure>
  <p>During our own investigation with my friends, we were able to spot the attacker. His announcements were everywhere at forums for young script kiddies.</p>
  <p>Here’s his info:</p>
  <ul>
    <li><strong>ICQ</strong>: 676061500</li>
    <li><strong>Skype</strong>: alaaasddsa1.as</li>
    <li><strong>Jabber</strong>: block_service@xmpp.jp</li>
  </ul>
  <p>And one of his announcement:</p>
  <figure class="m_custom">
    <img src="https://habrastorage.org/files/d38/d44/02a/d38d4402a0034a2eb54bb7335f8d92bb.png" width="995.9999999999999" />
  </figure>
  <p>In order to check account blocking process, I ordered complete disposal of my test account.<br />For integrity testing, I did the following:</p>
  <ul>
    <li>The account has been registered to the fresh e-mail account, which was not linked to the account itself. There was not even slightest possibility to guess or find this e-mail account in public sources.</li>
    <li>The password was strong, a combination of numbers and letters of different case.</li>
    <li>Only trusted accounts were added to contact list.</li>
    <li>Account did not participate in any conference and practically wasn’t used for messaging or calls.</li>
  </ul>
  <p>Throughout the blocking process, I’ve been monitoring the e-mail account and kept desktop Skype client authorized.</p>
  <p>In several hours after payment, I started receiving letters with Microsoft Security Code, just as on screenshots above.</p>
  <p>I received total of 24 letters in 10 hours. Leaping ahead, let me tell you that attacker successfully guessed the confirmation code.</p>
  <p>Here are all secret codes that I received in time of attack, with timestamps. As we see here, sending was performed with short bursts in few minutes.</p>
  <pre>Microsoft Support Code: 41917837 Fri, 26 Feb 2016 04:25:54 -0800 (PST)  
Microsoft Support Code: 14793784 Fri, 26 Feb 2016 04:27:32 -0800 (PST)  
Microsoft Support Code: 58837293 Sat, 27 Feb 2016 03:29:18 -0800 (PST)  
Microsoft Support Code: 68871688 Sat, 27 Feb 2016 03:29:33 -0800 (PST)  
Microsoft Support Code: 38424446 Sat, 27 Feb 2016 03:30:33 -0800 (PST)  
Microsoft Support Code: 25068066 Sat, 27 Feb 2016 03:35:39 -0800 (PST)  
Microsoft Support Code: 27311897 Sat, 27 Feb 2016 03:58:58 -0800 (PST)  
Microsoft Support Code: 93194445 Sat, 27 Feb 2016 04:02:43 -0800 (PST)  
Microsoft Support Code: 32506812 Sat, 27 Feb 2016 04:03:36 -0800 (PST)  
Microsoft Support Code: 33627494 Sat, 27 Feb 2016 04:05:40 -0800 (PST)  
Microsoft Support Code: 98350414 Sat, 27 Feb 2016 09:00:03 -0800 (PST)  
Microsoft Support Code: 12437217 Sat, 27 Feb 2016 11:41:04 -0800 (PST)  
Microsoft Support Code: 42078695 Sat, 27 Feb 2016 11:42:45 -0800 (PST)  
Microsoft Support Code: 41321028 Sat, 27 Feb 2016 11:43:09 -0800 (PST)  
Microsoft Support Code: 44964659 Sat, 27 Feb 2016 11:43:19 -0800 (PST)  
Microsoft Support Code: 90692933 Sat, 27 Feb 2016 12:50:21 -0800 (PST)  
Microsoft Support Code: 23696204 Sat, 27 Feb 2016 12:55:18 -0800 (PST)  
Microsoft Support Code: 60212551 Sat, 27 Feb 2016 12:55:25 -0800 (PST)  
Microsoft Support Code: 81725942 Sat, 27 Feb 2016 12:58:04 -0800 (PST)  
Microsoft Support Code: 29172590 Sat, 27 Feb 2016 14:26:54 -0800 (PST)  
Microsoft Support Code: 28091548 Sat, 27 Feb 2016 14:30:38 -0800 (PST)  
Microsoft Support Code: 55969586 Sat, 27 Feb 2016 14:54:21 -0800 (PST)  
Microsoft Support Code: 12424717 Sat, 27 Feb 2016 14:57:59 -0800 (PST)  
Microsoft Support Code: 36300450 Sat, 27 Feb 2016 14:58:16 -0800 (PST)  
</pre>
  <p>After e-mails stopped, the private information (such as name, surname, sex) disappeared from account profile. The login was only one that remained. My main e-mail account on skype.com website changed to deleted@skype.com. I was disconnected from desktop client.</p>
  <p>We had the following info at that time:</p>
  <ul>
    <li>The attacker didn’t know the real e-mail address of account. Taking last attacks with known e-mail address into consideration, we thought the same method would be used.</li>
    <li>Bruteforce is no-go as the password used was strong.</li>
    <li>There were no authorization requests from unknown contacts. There also was no activity in Skype client. The attacker has never been in contact with the victim.</li>
  </ul>
  <p>We couldn’t understand the process of deleting the account. We couldn’t find the form that would generate the e-mails with Microsoft Security Code. So the best option we had is to get some information from the hacker. I and my friends continued to order attacks for test accounts and in one moment, the hacker sent us the screenshot as the confirmation that account has been deleted successfully. On this screenshot, the tech support confirms this information:</p>
  <figure class="m_original">
    <img src="https://habrastorage.org/getpro/habr/post_images/fec/2ff/787/fec2ff787f245cd7203c7d585371b7a8.png" width="335" />
  </figure>
  <p>That was Live Chat Support form that can be accessed only by accounts with subscription. You can find it on skype.com website, going through troubleshooting master few times. If you always choose “problem is not solved” option, the last step would give you a confirmation window with live chat prompt.</p>
  <p>The chat is opened from <strong>https://sales.liveperson.net</strong>, a side domain. The information on the website states that this is side company, which offers tech support for your product.</p>
  <p>In conclusion, the attack process through live chat support seemed to be like the following:</p>
  <ol>
    <li>Attacker asks tech support to “delete my account &lt;accountname&gt; because I made a new one.”</li>
    <li>The tech support operator asks to confirm the rights to an account by telling the code that was sent to e-mail address which is connected to account. The operator doesn’t mention the e-mail account itself but waits for the right code.</li>
    <li>Operator receives the right code and account is deleted. Also, operator agrees to send code few times and does nothing if the code is incorrect.</li>
  </ol>
  <p>Funny thing, the live support chat form receives the login which has been logged in on skype.com. So the operator, in theory, should see the login of the user he/she talks with. And the strange thing is that operator would accept any account named by anyone and start the procedure.</p>
  <p>At this moment we don’t know for sure, how the attacker completes the deleting procedure.</p>
  <h3>Hey, Microsoft!</h3>
  <p>It is obvious that the vulnerability exists. Let’s report the problem to Skype.<br />Such an important vulnerability should be fixed ASAP, shouldn’t it?</p>
  <p>Due to the fact that Skype doesn’t have any public contacts for vulnerability reports, I have tried to write on the forum: <a href="https://community.skype.com/t5/Security-Privacy-Trust-and/Vulnerability-allows-to-permanently-delete-any-skype-account-by/td-p/4222445" target="_blank">community.skype.com/t5/Security-Privacy-Trust-and/Vulnerability-allows-to-permanently-delete-any-skype-account-by/td-p/4222445</a><br />There was no reaction, but there emerged other victims of this attack.</p>
  <p>With the help of my friends, I was able to contact directly with Microsoft employees. I reported them all details about the vulnerability, attached screenshots and code listings. I was then assured that an internal investigation was started. That is Microsoft - a serious company.</p>
  <p>However, next month other victims of the same vulnerability contacted me again. Microsoft employees reported that investigation hasn’t been finished yet.</p>
  <p>I have tried to report to <strong>secure@microsoft.com</strong>. It is special email for prompt reaction on critical vulnerabilities. It guarantees 24 hours reply. In the report, I explain all the details of account deletion with attached screenshots.</p>
  <p>The answer of Microsoft Security Response Center:</p>
  <figure class="m_custom">
    <img src="https://habrastorage.org/getpro/habr/post_images/f3d/4ae/d26/f3d4aed268ea20caf35fe040da0a4806.png" width="939" />
  </figure>
  <p>I kept asking about Microsoft internal investigation from their employees. The answer didn’t change. It was constantly no. The story was the same for <strong>SIX MONTH!!!</strong></p>
  <p>It was known for sure that hacker provides operator with the code. Sometimes with the second or the third attempt. It is a shame but I still don’t know all the details of this process. Firstly I have thought that the code is time dependent and thus hacker tries to request as many codes per minute as possible (it could be seen from email timestamps). However, I couldn’t find a relationship between code and time. It is possible that <code>liveperson.net</code> service was vulnerable.</p>
  <p>Recently Skype dropped <code>liveperson.net</code> service and chat with support agent now is on <code>microsoft.com</code> domain. The procedure of Skype account deletion cannot be handled by operator anymore. It should be done manually using web form.</p>
  <p>One can think that the vulnerability has been fixed. It isn’t so.</p>
  <h3>Experiment: I’ll die for your sins</h3>
  <p>Aforementioned Skype account deleter’s victims contacted me one year after. Emails with Security Code were not sent this time, it was apparently a new method.</p>
  <p>Frankly speaking, I’d been fed up with all of this. I’d been tired to implore, eat the dust and beg for fixing the vulns for so many months.</p>
  <p>As I wrote before, I’d been using Skype for about ten years. My primary account <strong>zhovner</strong> is quite the same old. I felt that it’s unfair to witness to other people’s suffering not having walked in the same shoes. Then I decided to conduct an experiment and order the deletion of my own account.</p>
  <figure class="m_column">
    <img src="https://habrastorage.org/files/01b/1f8/11d/01b1f811d6d9494a9178e9f77f413098.png" width="963" />
  </figure>
  <p>It cost me 2000 RUB (about $30). This time the deleter asked for three days to finish the work. Indeed, I was logged out from Skype in several days and I’ve been never able to log in back.</p>
  <figure class="m_column">
    <img src="https://habrastorage.org/files/8df/a14/d88/8dfa14d88a9e425ab9566867ecdefa1e.png" width="927" />
  </figure>
  <h3>Chatting with Skype Support</h3>
  <p>As soon as I got banned, I immediately wrote to the Skype Support. Assuming that my account was blocked using well-known trick with mass spam of report messages, I tried to describe it to tech support staff.</p>
  <p>You can see the original of the conversation <a href="https://telegra.ph/SRX1365288845ID---Account-blocked-by-mass-abuse-reporting-12-19" target="_blank">here</a><br />(read from top to bottom). I recommend you to read the original to feel all the humiliation the innocent victims are experiencing.</p>
  <h3>Short recap </h3>
  <p>not real conversation, just my rough retelling! Full conversation here <a href="https://blog.zhovner.com/Account-blocked-by-mass-abuse-reporting" target="_blank">https://blog.zhovner.com/Account-blocked-by-mass-abuse-reporting</a></p>
  <blockquote>&lt;Me&gt;Why my account is blocked? I think it is the result of massive fake abuse report spam.</blockquote>
  <blockquote>&lt;Skype&gt;Our automated system has blocked your account due to a violation of Skype Terms of Use.</blockquote>
  <blockquote>&lt;Me&gt;You have a vulnerability in the system, anyone’s account could be blocked with mass abuse reports, even if there are no violation of rules. My personal account was banned exactly using this scenario. Could you please double check it?</blockquote>
  <blockquote>&lt;Skype&gt;We already did the check, our system is perfect and never makes mistakes, we are sure that you had violated the rules. Our system is very precise and all the actions are being tracked, that means that it is definitely your fault, therefore your account will be never unbanned. If you want to continue using the service, just create a new account.</blockquote>
  <blockquote>&lt;Me&gt;I have evidence that your system is vulnerable to mass abuse report attacks.</blockquote>
  <blockquote>&lt;Skype&gt;No, our system always right, 100% sure.</blockquote>
  <blockquote>&lt;Me&gt;OK, could you please tell me the particular actions from my account which lead to the blocking?</blockquote>
  <blockquote>&lt;Skype&gt;You have already described the actions in your previous e-mails. You are right, that is the reason why your account was blocked.</blockquote>
  <blockquote>&lt;Me&gt;Are you crazy? So now you are admitting that anyone could delete any account just by submitting enough reports? Even if you do not know what are the reasons for the report? You know that these abuses could be made even without adding the person to the contact list. So you can send a report from the account which had never had a conversation with the person, who is he reporting. You are admitting that this kind of vulnerability. Is this even legal? I am planning to go to the court.</blockquote>
  <blockquote>&lt;Skype&gt;We think that we gave enough information. You are piece of shit, live with it.</blockquote>
  <blockquote>&lt;Me&gt;This vulnerability is totally serious. I believe that you should thoroughly investigate it. I have enough data to reproduce the vulnerability. We can repeat it with your a priori clean account, which does not violate the rules, which you have complete control on. I’ll pay for the removal of this account and you will be able to investigate the problem.</blockquote>
  <blockquote>&lt;Skype&gt;We understand that you want to find out the exact reason for deletion of your account. We have already informed you earlier that our automatic assholes detection system is very accurate. Now, you’re an asshole. We have all the logs!</blockquote>
  <blockquote>&lt;Me&gt;Well, what if I want to report a vulnerability? Here is a detailed description…</blockquote>
  <blockquote>&lt;Skype&gt;Yes, we do not care at all, go to court or police.</blockquote>
  <h3>Resume</h3>
  <p>It is already 15 days since my Skype account was banned. With the chat with support log, it is clear that nobody is trying to return my account back. I am really looking forward to recover my account back and call for apology from Skype for all the humiliations I need to get through, trying to make their services more secure.</p>
  <p>Unfortunately, Skype is a big bureaucratic machine, which is not able to detect and react to the problems in their service due to poor organization, big and complex management structure. I have no doubt that nothing will change here in the nearest future.</p>
  <p>In this article, I have described only problems which I know. I can assume that there exist much more exploits, which are in use, but I have no clue about them.</p>
  <p>It is essential to understand that it is not ONLY Skype problem. These issues could be applied to ANY messenger with centralized control, where all security is based upon trust and authority of administration.<br />If you think that your lovely messenger is much more secure than Skype just because the employees are “good guys”, you are just fooling yourself.<br />People who have infinite access to the user information could be vulnerable to different kinds of pressure, blackmailing or deception. No one is ready to go to jail or even to give their lives for the safety of users’ messages. As far as unlimited access exists, there will always be a temptation to use this access wrongfully.</p>
  <p>Truly secure messenger must be built on the impossibility of unauthorized access on a specification level, not on a trust to any group of people.</p>
  <hr />
  <tt-tags>
    <tt-tag name="skype">#skype</tt-tag>
    <tt-tag name="security">#security</tt-tag>
    <tt-tag name="scam">#scam</tt-tag>
  </tt-tags>
  <p><strong>На русском &quot;Как Skype уязвимости чинил&quot;</strong> <a href="https://habr.com/ru/post/316912/" target="_blank">https://habr.com/ru/post/316912/</a></p>
  <p><strong>Discussion on HN</strong> <a href="https://news.ycombinator.com/item?id=13227480" target="_blank">https://news.ycombinator.com/item?id=13227480</a></p>

]]></content:encoded></item></channel></rss>