개인 서버 CLI에 Claude Code + Discord - #2 Session 추가
·
Dev
목표귀찮은 prefix 삭제: ex) !claude show me the last commitChatting history + multi-channel을 위한Session 추가Chatting history 추가코드코드 링크: https://github.com/ybjeon/claude-discord-bot버전: tag/v1.0.1 Claude code에는 session 개념이 있다. 이를 이용하면 앞에서 한 얘기를 연속해서 기억할 수 있고, 다른 채널에서 병렬적으로 Session이 holding 되어 편리하다. index.jsclaude 명령어 session flag이용function runClaude(prompt, sessionEntry) { return new Promise((resolve, re..
LLM AI Agent Security toy project - #1 Indirect Prompt Injection
·
AI Agent Security
목표IPI (Indirect Prompt Injection)을 시뮬레이션하여 Tool call에 의해 LLM이 의도하지 않은 행동을 하는 시나리오를 시뮬레이션코드코드 링크: https://github.com/ybjeon/ai-agent-security-toyproject/blob/main/test_planner_ipi.py시나리오: 현재 Agent 모델은 Planner-ExecutorUser > Agent: Read my last text message and read it.Agent: Tool-call 안읽은 메시지 읽기 (악성 문자)Agent > User: Do itAgent: (Tool-call) 악성 행동 실행$ python test_planner_ipi.pyPROMPT_INJECTION_STRI..
Threat modeling (위협 모델링)
·
Security
Thraet modeling: 시스템의 보안 위협을 식별하고, 우선순위를 정하며, 적절한 대응책을 수립하기 위한 체계적인 프로세스.매번 필요할 때 마다 다시 공부하는데 공부할 때 마다 이해하는게 달라 이번 기회에 제대로 다시 정리해본다.혹시 틀린 부분이 있다면 언제든 댓글 환영시작하기 전에헷갈리는 용어 - Threat vs Vulnerability: 취약점(Vulnerability) 은 시스템에 존재하는 약점이다. 예를 들어 패치되지 않은 소프트웨어, 입력값 검증 누락 등이 있다. 위협(Threat) 은 그 약점을 악용하여 피해를 일으킬 수 있는 잠재적 행위나 사건이다. 예를 들어 공격자가 SQL Injection을 수행하는 경우가 있다. 간단히 말하면, 취약점은 결함이고 위협은 그 결함을 악용하는 것이..
LLM 출력에서 자주 보이는 <think> 태그
·
LLM AI Agent
LLM을 직접 다루다 보면 종종 이런 형태의 출력을 보게 된다.문제를 단계별로 분석해보면...먼저 사용자의 의도를 파악하고...그다음 답변 구조를 정하면...최종 답변은 다음과 같습니다. 처음 보면 가 뭔가 특별한 시스템 명령어처럼 보인다.하지만 실제로는 공식 표준 태그라기보다는, 모델의 추론 과정을 구분하기 위해 쓰는 관습적인 마커에 가깝다. ex) Qwen3 계열은 크게 Thinking mode와 Non-thinking mode를 지원한다. Thinking mode에서는 모델이 답변 전에 추론을 수행하고, 일부 모델·설정에서는 그 추론 내용이 ... 블록으로 출력됨. Non-thinking mode에서는 보통 바로 답만 내며 블록을 만들지 않는다.1. 태그?는 보통 LLM의 추론 과정, 즉 r..
LLM AI Agent toy project - #2 Tool call
·
LLM AI Agent
목표LLM이 필요한 도구를 직접 골라 실행할 수 있게끔 Agent 설계 코드코드 링크: https://github.com/ybjeon/ai-agent-toyproject/blob/main/test_toolcall.py 1) test_toolcall.py - get_today_schedule() Tool call 정의 from langchain_core.tools import tool@tooldef get_today_schedule() -> dict: """Retrieve today's calendar schedule.""" today = TODAY # str(date.today()) events = FAKE_CALENDAR.get(today, []) return { "d..
LLM AI Agent toy project - #1 기본 LLM 테스트
·
LLM AI Agent
목표Single-turn 테스트Multi-turn 테스트Embedding vector 테스트코드코드 링크: https://github.com/ybjeon/ai-agent-toyproject/blob/main/test_llm.py$ python test_llm.py결과Single-turn 테스트=== Single Turn Test ===>>>>>>> User: Hello! Introduce yourself briefly.Assistant: Hello there! I am a large language model trained by Mistral AI, designed to assist with a wide range of tasks and provide engaging conversation. I don..
LLM AI Agent toy project - #3 MCP Server 예제 (python FastMCP)
·
LLM AI Agent
목표FastMCP를 이용해서 LLM에 MCP server 연결해보기코드코드 링크: https://github.com/ybjeon/ai-agent-toyproject$ python mcp_server.py - MCP 서버 실행$ python test_mcp.py- MCP 클라 실행 mcp_server.pyfrom mcp.server.fastmcp import FastMCPmcp = FastMCP("example-server")@mcp.tool()def add(a: int, b: int) -> int: """ Add two numbers. Args: a: first number b: second number """ return a + bmcp server에..
OpenClaw의 등장과 Claw-like Agent의 보안 문제
·
AI Agent Security
참고 자료SafeClawBench: An Operating-System Perspective on Evaluating the Security of Claw-like Agent Systems, https://openreview.net/forum?id=pJJLXWy0MC SafeClawBench: An Operating-System Perspective on Evaluating the...Claw-like AI agents (e.g., OpenClaw) are always-on processes running inside the user's environment with persistent access to credentials, files, tools, and external services, functi..
개인 서버 CLI에 Claude Code + Discord - #1 기본 연결
·
Dev
목표IP 사람들이 많이 쓰고 있다는 "CLI에 Coding agent 연결하기"코드코드 링크: https://github.com/ybjeon/claude-discord-bot버전: tag/v1.0.01. Claude code 설치# 공식 설치 스크립트curl -fsSL https://claude.ai/install.sh | zsh# 또는 npm 방식npm install -g @anthropic-ai/claude-code1. Account로 로그인 선택https://code.claude.com/docs/en/security)*추후 관련글 (AI Agent Security) 작성 예정 #todo간단하게 명령 실행: what's my last commit?2. Discord 연결출처: https://disco..
26.05.12 트로이목마 실제 해킹 사례: Trojan:Script/Wacatac.B!ml
·
Security
26.05.12 지인으로부터 자신의 인스타와 디스코드가 해킹 당했다는 얘기를 들었다.똑똑한 개발자 친구인데 왜 해킹을 당했을까 하니.. 개발하다 심신이 지쳐 게임 분석 데이터를 무료로 다운받을 수 있다는 말에 혹해 자신의 Powershell에 코드를 입력한게 화근이였을거라고 추측했다. 아마 디스코드나 인스타에 이런거를 올리지 않았으면 친구도 해킹당한거 눈치채지 못했을텐데 한편으로 해커가 바보같다는 생각도 든다. 우선 급하게 랜선 뽑고 컴퓨터를 끄라고 하라고 일렀다. 그리고, 마음을 가다듬고 히스토리를 정리해서 달라고 했다.친구 히스토리05/11 17:34 검은사막 인벤 댓글에 위험 사이트 URL 확인05/11 17:35 위험 사이트 접속 05/11 17:36~40 사이트 지시대로 파워 쉘 명령어 입력 (..